LF.Typ
External LF types.
type t =
| Constant of {
location : Syncom.Location.t;
identifier : Syncom.Qualified_identifier.t;
}
Constant { identifier = "c"; _ }
is the type-level constant with qualified identifier "c"
.
| Application of {
location : Syncom.Location.t;
applicand : t;
arguments : Term.t Support.List1.t;
}
Application { applicand; arguments; _ }
is the type-level application of applicand
with arguments
.
If applicand = Typ.Constant _
with resolved operator description operator
, then List1.length arguments = Operator.arity operator
.
| Arrow of {
location : Syncom.Location.t;
domain : t;
range : t;
orientation : [ `Forward | `Backward ];
}
Arrow { domain; range; orientation = `Forward; _ }
is the type domain -> range
.Arrow { range; domain; orientation = `Backward; _ }
is the type range <- domain
.| Pi of {
location : Syncom.Location.t;
parameter_identifier : Syncom.Identifier.t Support.Option.t;
parameter_type : t Support.Option.t;
plicity : Syncom.Plicity.t;
body : t;
}
Pi { parameter_identifier = Option.Some "x"; parameter_type = Option.Some t; body; _ }
is the dependent product type { x : t } body
. The variable "x"
ranges over LF terms.