Merlin_analysis.Locate
Sourcetype config = {
mconfig : Merlin_kernel.Mconfig.t;
ml_or_mli : [ `ML | `MLI ];
traverse_aliases : bool;
}
type result = {
uid : Ocaml_typing.Shape.Uid.t;
decl_uid : Ocaml_typing.Shape.Uid.t;
file : string;
location : Ocaml_parsing.Location.t;
approximated : bool;
}
val uid_of_result :
traverse_aliases:bool ->
Ocaml_typing.Shape_reduce.result ->
Ocaml_typing.Shape.Uid.t option * bool
val find_source :
config:Merlin_kernel.Mconfig.t ->
Ocaml_utils.Warnings.loc ->
string ->
[> `File_not_found of string | `Found of string * Ocaml_parsing.Location.t ]
val 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 ]
val 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 ]
val 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 ]