Module Melange_compiler_libs.Path

type t =
  1. | Pident(Ident.t)
    /*

    Examples: x, List, int

    */
  2. | Pdot(t, string)
    /*

    Examples: List.map, Float.Array

    */
  3. | Papply(t, t)
    /*

    Examples: Set.Make(Int), Map.Make(Set.Make(Int))

    */
  4. | Pextra_ty(t, extra_ty)
    /*

    Pextra_ty (p, extra) are additional paths of types introduced by specific OCaml constructs. See below.

    */
;
and extra_ty =
  1. | Pcstr_ty(string)
    /*

    Pextra_ty (p, Pcstr_ty c) is the type of the inline record for constructor c inside type p.

    For example, in

    type 'a t = Nil | Cons of {hd : 'a; tl : 'a t}

    The inline record type {hd : 'a; tl : 'a t} cannot be named by the user in the surface syntax, but internally it has the path Pextra_ty (Pident `t`, Pcstr_ty "Cons").

    */
  2. | Pext_ty
    /*

    Pextra_ty (p, Pext_ty) is the type of the inline record for the extension constructor p.

    For example, in

    type exn += Error of {loc : loc; msg : string}

    The inline record type {loc : loc; msg : string} cannot be named by the user in the surface syntax, but internally it has the path Pextra_ty (Pident `Error`, Pext_ty).

    */
;
let same: t => t => bool;
let compare: t => t => int;
let compare_extra: extra_ty => extra_ty => int;
let find_free_opt: list(Ident.t) => t => option(Ident.t);
let exists_free: list(Ident.t) => t => bool;
let scope: t => int;
let flatten: t => [ `Contains_apply | `Ok((Ident.t, list(string))) ];
let name: ?paren:(string => bool) => t => string;
let head: t => Ident.t;
let print: Stdlib.Format.formatter => t => unit;
let heads: t => list(Ident.t);
let last: t => string;
let is_constructor_typath: t => bool;
module Map: Stdlib.Map.S with type key = t;
module Set: Stdlib.Set.S with type elt = t;