Module Backend_common

module Backend_common: sig .. end
Functions used by multiple backends

val def_add_location_comment_flag : bool Pervasives.ref
def_add_location_comment_flag controls whether def_add_location_comment.
val def_add_location_comment : Typed_ast.def -> Output.t * Typed_ast.def_aux
If def_add_location_comment_flag is set, def_add_location_comment d adds a comment with location information before definition d. This may require changing the initial whitespace before the definition. Therefore, the def_aux of d with changed whitespace as well as the output that should be added before d is returned.
val inline_exp_macro : Target.non_ident_target ->
Typed_ast.env ->
Macro_expander.macro_context -> Typed_ast.exp -> Typed_ast.exp option
inline_exp_macro target env does the inlining of target specific constant definitions
val inline_pat_macro : Target.non_ident_target ->
Typed_ast.env -> 'a -> 'b -> Typed_ast.pat -> Typed_ast.pat option
inline_pat_macro target env does the inlining of target specific constant definitions
val component_to_output : Ast.component -> Output.t
component_to_output c formats component c as an output
val get_module_name : Typed_ast.env -> -> Name.t list -> Name.t -> Name.t
get_module_name env targ mod_path mod_name looks up the name of module mod_path.mod_name in environment env for target targ.
val get_module_open_string : Typed_ast.env -> -> string -> Path.t -> string
get_module_open_string l env targ dir mod_path looks up how to represent this module in import / open statements.
val get_imported_target_modules : Typed_ast.def list * Ast.lex_skips -> Typed_ast.imported_modules list
get_imported_target_modules env targ defs extracts a list of module that should be imported. The exact names of these modules depend on the environment and the target. Therefore, they get extracted in an abstract from and converted (after possible changes to the environment) by imported_modules_to_strings.
val imported_modules_to_strings : Typed_ast.env -> -> string -> Typed_ast.imported_modules list -> string list
imported_modules_to_strings env targ dir imported_mods is used together with get_imported_target_modules. Please see there.
module Make: 
functor (A : sig
val env : Typed_ast.env
val target :
val dir : string
val id_format_args : (bool -> Output.id_annot -> Ulib.Text.t -> Output.t) * Ulib.Text.t
end) -> sig .. end