package ocaml-webworker

  1. Overview
  2. Docs

OCaml commandline parsing

type ocaml = {
  1. include_dirs : string list;
  2. no_std_include : bool;
  3. unsafe : bool;
  4. classic : bool;
  5. principal : bool;
  6. real_paths : bool;
  7. threads : [ `None | `Threads | `Vmthreads ];
  8. recursive_types : bool;
  9. strict_sequence : bool;
  10. applicative_functors : bool;
  11. unsafe_string : bool;
  12. nopervasives : bool;
  13. strict_formats : bool;
  14. open_modules : string list;
  15. ppx : string list;
  16. pp : string;
  17. warnings : Warnings.state;
}
val dump_ocaml : ocaml -> [> `Assoc of (string * [> `Bool of bool | `List of [> `String of string ] list | `String of string ]) list ]

Some paths can be resolved relative to a current working directory

val cwd : string option Pervasives.ref
val resolve_relative_path : ?cwd:string -> (unit -> 'a) -> 'a
val canonicalize_filename : 'a -> string
val marg_path : (string -> 'a -> 'a) -> 'a Marg.t
val marg_exec_path : (string -> 'a -> 'a) -> 'a Marg.t

Findlib configuration

type findlib = {
  1. conf : string option;
  2. path : string list;
}
val dump_findlib : findlib -> [> `Assoc of (string * [> `List of [> `String of string ] list | `Null | `String of string ]) list ]
val findlib_flags : (string * findlib Marg.t * string) list

Merlin high-level settings

type flag_list = {
  1. flag_cwd : string option;
  2. flag_list : string list;
}
val flag_list : ?cwd:string option -> string list -> flag_list
type merlin = {
  1. build_path : string list;
  2. source_path : string list;
  3. cmi_path : string list;
  4. cmt_path : string list;
  5. extensions : string list;
  6. suffixes : (string * string) list;
  7. stdlib : string option;
  8. reader : string list;
  9. protocol : [ `Json | `Sexp ];
  10. log_file : string option;
  11. trace : bool;
  12. flags_to_apply : flag_list list;
  13. dotmerlin_to_load : string list;
  14. packages_to_load : string list;
  15. flags_applied : flag_list list;
  16. dotmerlin_loaded : string list;
  17. packages_loaded : string list;
  18. packages_path : string list;
  19. failures : string list;
}
val dump_merlin : merlin -> [> `Assoc of (string * [> `Bool of bool | `List of [> `Assoc of (string * [> `List of [> `String of string ] list | `Null | `String of string ]) list | `String of string ] list | `Null | `String of string ]) list ]
val merlin_flags : (string * merlin Marg.t * string) list
type query = {
  1. filename : string;
  2. directory : string;
  3. printer_width : int;
  4. verbosity : int;
}
val dump_query : query -> [> `Assoc of (string * [> `Int of int | `String of string ]) list ]
val query_flags : (string * query Marg.t * string) list
type t = {
  1. ocaml : ocaml;
  2. findlib : findlib;
  3. merlin : merlin;
  4. query : query;
}
val ocaml_ignored_flags : string list
val ocaml_ignored_parametrized_flags : string list
val ocaml_warnings_spec : error:bool -> ocaml Marg.t
val ocaml_flags : (string * ocaml Marg.t * string) list

Main configuration

val initial : t
val dump : t -> [> `Assoc of (string * [> `Assoc of (string * [> `Bool of bool | `Int of int | `List of [> `Assoc of (string * [> `List of [> `String of string ] list | `Null | `String of string ]) list | `String of string ] list | `Null | `String of string ]) list ]) list ]
val stdlib : t -> string
val arguments_table : (string, t Marg.t) Std.Hashtbl.t
val flags_for_completion : unit -> string list
val try_parse_argument : warning:(string -> 'a) -> string list -> t -> (string list * t) option
val parse_arguments : warning:(string -> 'a) -> string list -> t -> t
val document_arguments : Pervasives.out_channel -> unit
val source_path : t -> string list
val build_path : t -> string list
val cmt_path : t -> string list
val is_normalized : t -> bool
OCaml

Innovation. Community. Security.