package merlin-lib
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=cc3c7c01f19a454c96f6bc8a39538023e01042519f001a895fd61488e2b49fb5
sha512=4268a932a8494023699abd98e0d52deb6f201f656863849db230dc8692050e0fe00cc25a50d70e902410f17a27268fd8335c32636f616ef012cf86fc9a43e019
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.