Let π be a compile-time modality. All types are indexed by either π or Β¬π.
πΈ a : (Ξ± @ π) is guaranteed to be evaluated to its canonical form of Ξ± at compile-time.
a : (Ξ± @ Β¬π) is not guaranteed to be evaluated to its canonical form of Ξ± at compile-time.
The constructor πΈ - are hidden from the surface syntax. If a : Ξ±, then a β (Ξ± @ π) elaborates to πΈ a by subtyping coercion. πΈ a works as a marker to normalize a without type-directedness.
Definitions are indexed by compile-time modalities as follows:
Let
π
be a compile-time modality. All types are indexed by eitherπ
orΒ¬π
.πΈ a : (Ξ± @ π)
is guaranteed to be evaluated to its canonical form ofΞ±
at compile-time.a : (Ξ± @ Β¬π)
is not guaranteed to be evaluated to its canonical form ofΞ±
at compile-time.The constructor
πΈ -
are hidden from the surface syntax. Ifa : Ξ±
, thena β (Ξ± @ π)
elaborates toπΈ a
by subtyping coercion.πΈ a
works as a marker to normalizea
without type-directedness.Definitions are indexed by compile-time modalities as follows:
Compile-time modalities can be elided as Rust's lifetime elision. The following definition elaborates to the above definition.
For example, the following definitional equalities hold:
Runtime-only definitions are represented by
Β¬π
as follows:A type with
π
must not contain types withΒ¬π
. Since its inhabitant cannot evaluate to its canonical form, the following type is ill-formed: