package merlin-lib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

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. nopervasives : bool;
  12. strict_formats : bool;
  13. open_modules : string list;
  14. ppx : string Merlin_utils.Std.with_workdir list;
  15. pp : string Merlin_utils.Std.with_workdir option;
  16. warnings : Ocaml_utils.Warnings.state;
}
val dump_ocaml : ocaml -> Merlin_utils.Std.json

Merlin high-level settings

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. log_sections : string list;
  12. config_path : string option;
  13. use_ppx_cache : bool;
  14. exclude_query_dir : bool;
  15. flags_to_apply : string list Merlin_utils.Std.with_workdir list;
  16. flags_applied : string list Merlin_utils.Std.with_workdir list;
  17. failures : string list;
  18. extension_to_reader : (string * string) list;
  19. cache_lifespan : int;
}
val dump_merlin : merlin -> Merlin_utils.Std.json

Some flags affecting queries

module Verbosity : sig ... end
type query = {
  1. filename : string;
  2. directory : string;
  3. printer_width : int;
  4. verbosity : Verbosity.t;
}

Main configuration

type t = {
  1. ocaml : ocaml;
  2. merlin : merlin;
  3. query : query;
}
val initial : t
val dump : t -> Merlin_utils.Std.json
val get_external_config : string -> t -> t
val normalize : t -> t
val is_normalized : t -> bool
val parse_arguments : wd:string -> warning:(string -> unit) -> 'a Merlin_utils.Marg.spec list -> string list -> t -> 'a -> t * 'a
val flags_for_completion : unit -> string list
val document_arguments : out_channel -> unit

Computing project paths

val source_path : t -> string list
val build_path : t -> string list
val cmt_path : t -> string list
val global_modules : ?include_current:bool -> t -> string list

Accessors for other information

val filename : t -> string
val unitname : t -> string
OCaml

Innovation. Community. Security.