package ocaml-base-compiler

  1. Overview
  2. Docs
type desc =
  1. | Any
  2. | Construct of Types.constructor_description
  3. | Constant of Asttypes.constant
  4. | Tuple of int
  5. | Record of Types.label_description list
  6. | Variant of {
    1. tag : Asttypes.label;
    2. has_arg : bool;
    3. cstr_row : Types.row_desc ref;
    4. type_row : unit -> Types.row_desc;
    }
  7. | Array of int
  8. | Lazy
type t
val desc : t -> desc
val env : t -> Env.t
val loc : t -> Location.t
val typ : t -> Types.type_expr
val deconstruct : Typedtree.pattern -> t * Typedtree.pattern list

deconstruct p returns the head of p and the list of sub patterns.

  • raises [Invalid_arg

    _] if p is an or- or an exception-pattern.

val to_omega_pattern : t -> Typedtree.pattern

reconstructs a pattern, putting wildcards as sub-patterns.

val make : loc:Location.t -> typ:Types.type_expr -> env:Env.t -> desc -> t
val omega : t
OCaml

Innovation. Community. Security.