Comp.Typ
External computation-level types.
type t =
| Inductive_typ_constant of {
location : Syncom.Location.t;
identifier : Syncom.Qualified_identifier.t;
}
Inductive_typ_constant { identifier = "c"; }
is the computation-level inductive type constant "c"
.
| Stratified_typ_constant of {
location : Syncom.Location.t;
identifier : Syncom.Qualified_identifier.t;
}
Stratified_typ_constant { identifier = "c"; }
is the computation-level stratified type constant "c"
.
| Coinductive_typ_constant of {
location : Syncom.Location.t;
identifier : Syncom.Qualified_identifier.t;
}
Coinductive_typ_constant { identifier = "c"; }
is the computation-level coinductive type constant "c"
.
| Abbreviation_typ_constant of {
location : Syncom.Location.t;
identifier : Syncom.Qualified_identifier.t;
}
Abbreviation_typ_constant { identifier = "c"; }
is the computation-level abbreviated type constant "c"
.
| Pi of {
location : Syncom.Location.t;
parameter_identifier : Syncom.Identifier.t Support.Option.t;
plicity : Syncom.Plicity.t;
parameter_type : Synext__.Synext_definition.Meta.Typ.t;
body : t;
}
Pi { parameter_identifier = Option.Some "x"; parameter_type = t; explicit; body; _ }
is the explicit dependent product type { x : t } body
if plicity = Plicity.Explicit
, and the implicit dependent product type (x : t) body
if plicity = Plicity.Implicit
. The variable "x"
ranges over computation-level terms.
| Arrow of {
location : Syncom.Location.t;
domain : t;
range : t;
orientation : [ `Forward | `Backward ];
}
Arrow { domain; range; _ }
is the computation-level type domain -> range
.
| Cross of {
location : Syncom.Location.t;
types : t Support.List2.t;
}
Cross { typs = [t1; t2; ...; tn]; _ }
is the type of tuple t1 * t2 * ... * tn
.
| Box of {
location : Syncom.Location.t;
meta_type : Synext__.Synext_definition.Meta.Typ.t;
}
Box { typ = u; _ }
is a boxed meta-type [u]
.
| Application of {
location : Syncom.Location.t;
applicand : t;
arguments : Synext__.Synext_definition.Meta.Object.t Support.List1.t;
}
Application { applicand; arguments; _ }
is the application of applicand
with arguments
.
If applicand = Typ.Inductive_typ_constant | Typ.Stratified_typ_constant _ | Typ.Coinductive_typ_constant _ | Typ.Abbreviation_typ_constant _
with resolved operator description operator
, then List1.nth arguments = Operator.arity operator
.