package merlin-lib
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=a3047606d06580e251ee8acbeb67f80f1d059238f879e187e10de40b4ec61be7
sha512=871f4e8f1111d086985172a9157812d5e22fd746edeffa8bdb5363f5c8cef2308da36a57d989ae77becec32eaa6ea4e8ef67f9b0247cbd409537701644db563f
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.