mte/unikernel/duniverse/ppxlib/astlib/longident.mli

20 lines
536 B
OCaml
Raw Normal View History

2025-11-11 02:07:51 +01:00
(** Long identifiers, used in parsetrees. *)
(** The long identifier type *)
type t =
(*IF_NOT_AT_LEAST 504 Ocaml_common.Longident.t = *)
| Lident of string
| Ldot of t * string
| Lapply of t * t
val flatten : t -> string list
(** Flatten a long identifier built upon [Lident] and [Ldot]. Raise when hitting
[Lapply].*)
val parse : string -> t
(** Parse a string into a long identifier built upon [Lident] and [Ldot]. *)
val to_compiler : t -> Ocaml_common.Longident.t
val from_compiler : Ocaml_common.Longident.t -> t