package ocaml-solo5-cross-aarch64
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=00e5f51d0ce72f7517f3b2a7f910c572
sha512=91f349384a8864076c3d1b0ce3f4e94aa54900cf51e2471d21427bb25cbffac606bcd754fa545f4b2c4516ea2b0731cb580ab30bdf1911c9e47ee24d7c88c863
doc/compiler-libs.common/Longident/index.html
Module Longident
Long identifiers, used in parsetree.
Warning: this module is unstable and part of compiler-libs.
To print a longident, see Pprintast.longident, using Format.asprintf to convert to a string.
val flatten : t -> string listval unflatten : string list -> t optionFor 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.
val last : t -> stringval parse : string -> tThis 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.