jon.recoil.org

Module Instantiator

module CU := Compilation_unit
type unit_info = {
  1. ui_unit : CU.t;
  2. ui_arg_descr : Lambda.arg_descr option;
  3. ui_format : Lambda.main_module_block_format;
}
val instantiate : src:Misc.filepath -> args:Misc.filepath list -> Misc.filepath -> expected_extension:string -> read_unit_info:(Misc.filepath -> Instantiator.unit_info) -> compile: (source_file:Misc.filepath -> output_prefix:string -> compilation_unit:CU.t -> runtime_args:Translmod.runtime_arg list -> main_module_block_repr:Lambda.module_representation -> arg_descr:Lambda.arg_descr option -> unit) -> unit
type error =
  1. | Not_compiled_as_argument of {
    1. compilation_unit : CU.t;
    2. filename : Misc.filepath;
    3. base_unit : CU.t;
    }
  2. | Incorrect_target_filename of {
    1. expected_basename : Misc.filepath;
    2. expected_extension : string;
    3. actual_basename : Misc.filepath;
    4. compilation_unit : CU.t;
    }
  3. | Not_parameterised of {
    1. compilation_unit : CU.t;
    2. filename : Misc.filepath;
    }
  4. | Missing_argument of {
    1. param : Global_module.Parameter_name.t;
    }
  5. | No_such_parameter of {
    1. base_unit : CU.t;
    2. available_params : Global_module.Parameter_name.t list;
    3. param : Global_module.Parameter_name.t;
    4. arg : Global_module.Name.t;
    }
  6. | Repeated_parameter of {
    1. param : Global_module.Parameter_name.t;
    2. arg1 : CU.t;
    3. arg2 : CU.t;
    }
exception Error of Instantiator.error
val report_error : Stdlib.Format.formatter -> Instantiator.error -> unit