Meta.Schema
External context schemas.
type t =
| Constant of {
location : Syncom.Location.t;
identifier : Syncom.Qualified_identifier.t;
}
Constant { identifier = "ctx"; _ }
is the schema having identifier "ctx"
declared elsewhere in the signature.
A tuple term has a block type t
matching against this schema if t
matches against the schema referred to as `identifier'.
| Alternation of {
location : Syncom.Location.t;
schemas : t Support.List2.t;
}
Alternation { schemas = [g1; g2; ...; gn]; _ }
is the schema g1 + g2 + ... + gn
.
A tuple term has a block type t
matching against this schema if t
matches against at least one of g1
, g2
, ..., gn
.
| Element of {
location : Syncom.Location.t;
some : (Syncom.Identifier.t * Synext__.Synext_definition.LF.Typ.t)
Support.List1.t
Support.Option.t;
block : [ `Unnamed of Synext__.Synext_definition.LF.Typ.t
| `Record of
(Syncom.Identifier.t * Synext__.Synext_definition.LF.Typ.t)
Support.List1.t ];
}
Element { some = [("x1", p1); ("x2", p2); ...; ("xn", pn)]; block = `Unnamed t; _ }
is the schema some [x1 : p1, x2 : p2, ..., xn : pn] block t
.Element { some = [("x1", p1); ("x2", p2); ...; ("xn", pn)]; block = `Record [("y1", q1); ("y2", q2); ...; ("yn", qn)]; _ }
is the schema some [x1 : p1, x2 : p2, ..., xn : pn] block (y1 : q1, y2 : q2, ..., yn : qn)
.A tuple term has a block type t
matching against this schema if there exist terms having types in p
in the context, and if the elements in t
match against those in q
.