package merlin-lib
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=de395dd37d246e3ec303e1af35ff8421665fa4f0f0005d95732124b22e3417ac
sha512=74756b28767cdfe10288720540582e818a9d946dd2406606724ebc7b68d1cf6623142e56a1e457f7862839732e7add365aec056930c7ac89be7036c22e5f29ae
doc/merlin-lib.kernel/Merlin_kernel/Mtyper/index.html
Module Merlin_kernel.MtyperSource
Result of typechecker
Mtyper essentially produces a typedtree, but to make sense of it the OCaml typechecker need to be in a specific state.
The result type wraps a snapshot of this state with the typedtree to ensure correct accesses.
type typedtree = [ | `Interface of Ocaml_typing.Typedtree.signature| `Implementation of Ocaml_typing.Typedtree.structure
]val set_index_items :
(index ->
Mconfig.t ->
[ `Impl of Ocaml_typing.Typedtree.structure_item list
| `Intf of Ocaml_typing.Typedtree.signature_item list ] ->
index) ->
unitval node_at :
?disambiguate:Mbrowse.Tie_breaker.t ->
?skip_recovered:bool ->
result ->
Lexing.position ->
Mbrowse.tHeuristic to find suitable environment to complete / type at given position. * 1. Try to find environment near given cursor. * 2. Check if there is an invalid construct between found env and cursor : * Case a. * > let x = valid_expr || * The env found is the right most env from valid_expr, it's a correct * answer. * Case b. * > let x = valid_expr * > let y = invalid_construction|| * In this case, the env found is the same as in case a, however it is * preferable to use env from enclosing module rather than an env from * inside x definition. * * disambiguate argument is used to select the node at cursor when multiple * nodes share the same location.