File: longident.mli

package info (click to toggle)
ppxlib 0.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 1,284 kB
  • sloc: ml: 17,184; sh: 149; makefile: 36; python: 36
file content (25 lines) | stat: -rw-r--r-- 628 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
(** Overrides the Longident module of OCaml *)

open! Import

type t = longident =
    Lident of string
  | Ldot of t * string
  | Lapply of t * t

val compare : t -> t -> int
val sexp_of_t : t -> Sexp.t

val flatten_exn : t -> string list
val last_exn : t -> string

(** Parses the given string as a longident, properly handling infix operators
    which may contain '.'.
    Note that it does not parse [Lapply _] longidents and will raise
    [Invalid_argument _] if passed values such as ["A(B)"]. *)
val parse : string -> t

val name : t -> string

module Map : Map.S with type key = t
module Set : Set.S with type elt = t