package ocaml-solo5-cross-aarch64

  1. Overview
  2. Docs
OCaml cross-compiler to the freestanding 64-bit ARM Solo5 backend

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v1.2.0.tar.gz
md5=4d07934aea2d32b77ba1b8bb062c6594
sha512=2ec008da088f7998d024b790679605813f1954de36b999031db0b003706e67f3f13554e93fa07be00f26633ea27c2b2f9f987e8b08f85c63f956bfbc306bd620

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.

type t =
  1. | Lident of string
  2. | Ldot of t Location.loc * string Location.loc
  3. | Lapply of t Location.loc * t Location.loc
val same : t -> t -> bool

same t t' compares the longidents t and t' without taking locations into account.

val flatten : t -> string list
val unflatten : string list -> t option

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.

val last : t -> string
val parse : string -> t

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.

  • deprecated this function may misparse its input, use "Parse.longident" or "Longident.unflatten"