package merlin-lib

  1. Overview
  2. Docs
Merlin's libraries

Install

dune-project
 Dependency

Authors

Maintainers

Sources

merlin-5.6-503.tbz
sha256=b0dcad092aaaf7a23f65ab9a089e8761bd665cc72357909e0ac6c2182f4fc2d4
sha512=9987baf2b2e82bab4c90a328bfcba9945e797e0f3d947156f04435ee84b49542844b379e35a79027c3ffe81f4b7a8f1c60803233999b4c039d4598033371880d

doc/merlin-lib.analysis/Merlin_analysis/Locate/index.html

Module Merlin_analysis.LocateSource

Sourcetype config = {
  1. mconfig : Merlin_kernel.Mconfig.t;
  2. ml_or_mli : [ `ML | `Smart | `MLI ];
    (*

    When ml_or_mli is `Smart, if locate blocks on an interface uid, it will use the cmt_declaration_dependencies to try finding a unique corresponding definition in the implementation.

    *)
  3. traverse_aliases : bool;
}
Sourcetype result = {
  1. uid : Ocaml_typing.Shape.Uid.t;
  2. decl_uid : Ocaml_typing.Shape.Uid.t;
  3. file : string;
  4. location : Ocaml_parsing.Location.t;
  5. approximated : bool;
}
Sourceval uid_of_result : traverse_aliases:bool -> Ocaml_typing.Shape_reduce.result -> Ocaml_typing.Shape.Uid.t option * bool

Lookup the delcaration of the given Uid in the appropriate cmt file

Sourceval get_linked_uids : config:config -> comp_unit:string -> Ocaml_typing.Shape.Uid.t -> Ocaml_typing.Shape.Uid.t list

get_linked_uids queries the cmt_declaration_dependencies table and returns udis related to the one passed as argument. TODO right now this function only returns simple links tagged with Definition_to_declaration

Sourceval find_source : config:Merlin_kernel.Mconfig.t -> Ocaml_utils.Warnings.loc -> string -> [> `File_not_found of string | `Found of string * Ocaml_parsing.Location.t ]
Sourceval from_path : config:config -> env:Ocaml_typing.Env.t -> local_defs:Merlin_kernel.Mtyper.typedtree -> namespace:Env_lookup.Namespace.t -> Ocaml_typing.Path.t -> [> `File_not_found of result | `Found of result | `Builtin of Ocaml_typing.Shape.Uid.t * string | `Not_in_env of string | `Not_found of string * string option ]
Sourceval from_string : config:config -> env:Ocaml_typing.Env.t -> local_defs:Merlin_kernel.Mtyper.typedtree -> pos:Lexing.position -> ?namespaces:Env_lookup.Namespace.inferred_basic list -> string -> [> `File_not_found of result | `Found of result | `Builtin of Ocaml_typing.Shape.Uid.t * string | `Missing_labels_namespace | `Not_found of string * string option | `Not_in_env of string | `At_origin ]
Sourceval get_doc : config:Merlin_kernel.Mconfig.t -> env:Ocaml_typing.Env.t -> local_defs:Merlin_kernel.Mtyper.typedtree -> comments:(string * Ocaml_parsing.Location.t) list -> pos:Lexing.position -> [ `User_input of string | `Completion_entry of Env_lookup.Namespace.t * Ocaml_typing.Path.t * Ocaml_parsing.Location.t ] -> [> `Found of string | `Builtin of string | `Not_found of string * string option | `Not_in_env of string | `No_documentation ]