package merlin-lib
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=5642cde8486a84aad98fa5c590b70e8dcc6074d7fbdb3b9b8c46b2c5b42f653b
sha512=1d7a7751157e393d3ae248ef5ae24a6b4e81430666c61cc51a3d0ec35804523317036f3d7a3c7f18a7554337f4e5f5989fb677865b261ece3fd2b317903570ba
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.