Comp.Pattern
External computation-level patterns.
type t =
| Variable of {
location : Syncom.Location.t;
identifier : Syncom.Identifier.t;
}
| Constructor of {
location : Syncom.Location.t;
identifier : Syncom.Qualified_identifier.t;
}
Constructor { identifier = "c"; _ }
is the computation-level constructor pattern "c"
.
| Meta_object of {
location : Syncom.Location.t;
meta_pattern : Synext__.Synext_definition.Meta.Pattern.t;
}
| Tuple of {
location : Syncom.Location.t;
elements : t Support.List2.t;
}
| Application of {
location : Syncom.Location.t;
applicand : t;
arguments : t Support.List1.t;
}
Application { applicand; arguments; _ }
the application of applicand
with arguments
.
If applicand = Term.Constant _
with resolved operator description operator
, then List1.length arguments = Operator.arity operator
.
| Type_annotated of {
location : Syncom.Location.t;
pattern : t;
typ : Typ.t;
}
| Wildcard of {
location : Syncom.Location.t;
}