Module Js_of_ocaml_compiler.Linker

type fragment_ = {
provides : (Parse_info.t option * string * Primitive.kind * Primitive.kind_arg list option) option;
requires : string list;
version_constraint : ((int -> int -> bool) * string) list list;
weakdef : bool;
always : bool;
code : Javascript.program;
ignore : [ `No | `Because of Primitive.condition ];
}
type fragment = [
| `Always_include of Javascript.program
| `Some of fragment_
]
val parse_file : string -> fragment list
val parse_string : string -> fragment list
val parse_builtin : Builtins.File.t -> fragment list
val load_files : string list -> unit
val load_fragment : filename:string -> fragment -> unit
type state
type always_required = {
filename : string;
program : Javascript.program;
requires : string list;
}
type output = {
runtime_code : Javascript.program;
always_required_codes : always_required list;
}
val init : unit -> state
val resolve_deps : ?⁠linkall:bool -> state -> Stdlib.StringSet.t -> state * Stdlib.StringSet.t
val get_provided : unit -> Stdlib.StringSet.t
val all : state -> string list
val origin : name:string -> string option