package merlin-lib
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=c5e91975f3df56849e1b306f356c31709a2b139d7d57634b8d21e473266fcf2d
sha512=1d2db379b496dc0b95874f312011cce1a48f6808e098f1aff768de0eef0caff222adc17ab61b85c7aac8d889bf9d829fb5d0211267c7a85572ce201c1cbcb990
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
]
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.