package merlin-lib
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=2cea46f12397fa6e31ef0c0d4f5e11c1cfd916ee49420694005c95ebb3aa24bc
sha512=e94abb9ae38149245337db033e2c3891c7ec772168e99abf1bda0216a894c0854e7170b56fe88eba83ec98f2ebc0f5c7c723e8db14f59eeb6dd348bec12c6d62
doc/merlin-lib.kernel/Merlin_kernel/Mtyper/index.html
Module Merlin_kernel.Mtyper
Source
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
]
type index_tbl =
(Ocaml_typing.Shape.Uid.t
* Ocaml_parsing.Longident.t Ocaml_parsing.Location.loc,
unit)
Merlin_utils.Stamped_hashtable.t
val set_index_items :
(index:index_tbl ->
stamp:int ->
Mconfig.t ->
[ `Impl of Ocaml_typing.Typedtree.structure_item list
| `Intf of Ocaml_typing.Typedtree.signature_item list ] ->
unit) ->
unit
Heuristic 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.