Patterns.Head
type desc =
| Any
| Construct(Types.constructor_description)
| Constant(Asttypes.constant)
| Tuple(int)
| Record(list(Types.label_description))
| Variant of {
tag: Asttypes.label,
has_arg: bool,
cstr_row: Stdlib.ref(Types.row_desc),
type_row: unit => Types.row_desc,
}
| Array(int)
| Lazy
;
type t = Typedtree.pattern_data(desc);
let arity: t => int;
let deconstruct: Simple.pattern => (t, list(Typedtree.pattern));
deconstruct p
returns the head of p
and the list of sub patterns.
let to_omega_pattern: t => Typedtree.pattern;
reconstructs a pattern, putting wildcards as sub-patterns.
let omega: t;