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;
code : Javascript.program;
ignore : [ `No | `Because of Primitive.condition ];
}
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;
}
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 link : Javascript.program -> state -> output
val get_provided : unit -> Stdlib.StringSet.t
val all : state -> string list