package merlin-lib
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=b8fb32bc0fc092af2fd6bdc831cb966057f2e3fd7b99a172b705e96ba8082583
sha512=01ca96f8167d062ba24036e43f650ff958fb157d44867bd52eb7999b7d19bf9fc97cdcd46c04b6979f0e1149d5041047723eed5913b03c4404d7acb116183bee
doc/merlin-lib.index_format/Merlin_index_format/Lid/Li/index.html
Module Lid.LiSource
include module type of struct include Ocaml_parsing.Longident end
type t = Ocaml_parsing.Longident.t = | Lident of string| Ldot of t Ocaml_parsing.Location.loc * string Ocaml_parsing.Location.loc| Lapply of t Ocaml_parsing.Location.loc * t Ocaml_parsing.Location.loc
same t t' compares the longidents t and t' without taking locations into account.
For a non-empty list l, unflatten l is Some lid where lid is the long identifier created by concatenating the elements of l with Ldot. unflatten [] is None.
head lid returns the leftmost part of lid, e.g., given String.Map.empty, returns String.
This function is broken on identifiers that are not just "Word.Word.word"; for example, it returns incorrect results on infix operators and extended module paths.
If you want to generate long identifiers that are a list of dot-separated identifiers, the function unflatten is safer and faster. unflatten is available since OCaml 4.06.0.
If you want to parse any identifier correctly, use the long-identifiers functions from the Parse module, in particular Parse.longident. They are available since OCaml 4.11, and also provide proper input-location support.