package catala

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Clerk_backendSource

Sourceval default_flags : code_coverage:bool -> trace:bool -> inplace:bool -> config:Clerk_cli.config -> include_dirs:string list -> Clerk_utils.Var.bindings
Sourcemodule type S = sig ... end
Sourcetype t = (module S)

Functions useful for the backend rules definitions. ~name is for the backend name here, for convenience

Sourceval static_base_rules : Ninja_utils.def list
Sourceval extern_src : filename:string -> name:string -> ext:string -> missing:string list -> string * string list

The missing argument is simply an accumulator, returned as snd with any missing files added

We use 3 types of pseudo-targets for compiled objets. The <modname> below is the normalised module name (using String.to_id)

  • @catala-obj/<modname> (catala_obj_target) is what is needed for Catala evaluation (an OCaml cmxs)
  • @<backend>/interface/<modname> (module_target) is the possibly compiled interface that dependent modules will need to be compiled (e,g, .h, .cmi)
  • @<backend>/obj/<modname> or @<backend>/obj/<filename> (obj_target) is the compiled object for linking, including all its dependencies. This allows transitive compilation of required objects before linking
Sourceval catala_obj_target : string -> Ninja_utils.Expr.elt

From a module name, gives the pseudo-target that builds the Catala object required for interpretation (i.e. actually the OCaml dynlink object, .cmxs or .cmo)

Sourceval target : ?name:string -> string -> Ninja_utils.Expr.elt
Sourceval interface_dep : name:string -> string -> Ninja_utils.Expr.elt

backend name, module name -> target name

Sourceval src_dep : name:string -> string -> Ninja_utils.Expr.elt

backend name, module name -> target name

Sourceval obj_dep : name:string -> Clerk_utils.Scan.item -> Ninja_utils.Expr.elt

backend name, source item -> target name

Pseudo-target that builds the item runtime dependencies for interpretation (cmxs for modules, or cmxs of all their dependencies for other items)

Sourceval install_target_files : name:string -> stdlib_subdir:string -> extensions:string list -> config:Clerk_cli.config -> info:Clerk_utils.Module_graph.info -> string -> Clerk_config.target -> copy_in:(src:Catala_utils.File.t -> dir:Catala_utils.File.t -> unit) -> unit

Helper function to copy all relevant files of the given target from the build dir to the target dir

Sourcemodule Make_backend (A : sig ... end) : sig ... end
Sourceval register : t -> unit
Sourceval all : unit -> t list
Sourceval name : t -> string
Sourcemodule OCaml : sig ... end
Sourcemodule C : sig ... end
Sourcemodule Java : sig ... end
Sourcemodule Python : sig ... end
Sourcemodule Backend_paths : sig ... end

/

Sourcemodule Flags : sig ... end