package merlin-lib
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=de395dd37d246e3ec303e1af35ff8421665fa4f0f0005d95732124b22e3417ac
sha512=74756b28767cdfe10288720540582e818a9d946dd2406606724ebc7b68d1cf6623142e56a1e457f7862839732e7add365aec056930c7ac89be7036c22e5f29ae
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.