type int_size =
| U8
| U16
| U32
| U64
| U128
| USize
type int_type = {
size : int_size;
signed : Base.bool;
}
type ty =
| WildTy
| Bool
| Unit
| TypeTy
| Int of int_type
| NameTy of Base.string
| RecordTy of Base.string * (Base.string * ty) Base.list
| Product of ty Base.list
| Coproduct of ty Base.list
| Arrow of ty * ty
| ArrayTy of ty * Base.string
| SliceTy of ty
| AppTy of ty * ty Base.list
| NatMod of Base.string * Base.int * Base.string
| Forall of Base.string Base.list * Base.string Base.list * ty
| Exists of Base.string Base.list * Base.string Base.list * ty
type literal =
| Const_string of Base.string
| Const_char of Base.int
| Const_int of Base.string * int_type
| Const_bool of Base.bool
type pat =
| WildPat
| UnitPat
| Ident of Base.string
| Lit of literal
| RecordPat of Base.string * (Base.string * pat) Base.list
| ConstructorPat of Base.string * pat Base.list
| TuplePat of pat Base.list
| AscriptionPat of pat * ty
| DisjunctivePat of pat Base.list
type monad_type =
| Option
| Result of ty
| Exception of ty
type term =
| UnitTerm
| Let of let_args
| If of term * term * term
| Match of term * (pat * term) Base.list
| Const of literal
| Literal of Base.string
| AppFormat of Base.string Base.list * notation_elements Base.list
| App of term * term Base.list
| Var of Base.string
| NameTerm of Base.string
| RecordConstructor of Base.string * (Base.string * term) Base.list
| RecordUpdate of Base.string * term * (Base.string * term) Base.list
| Type of ty
| Lambda of pat Base.list * term
| Tuple of term Base.list
| Array of term Base.list
| TypedTerm of term * ty
and notation_elements =
| Newline of Base.int
| Typing of ty * Base.bool * Base.int
| Variable of pat * Base.int
| Value of term * Base.bool * Base.int
and let_args = {
pattern : pat;
mut : Base.bool;
value : term;
body : term;
value_typ : ty;
monad_typ : monad_type Base.option;
}
type inductive_case =
| InductiveCase of Base.string * ty
| BaseCase of Base.string
type argument =
| Implicit of pat * ty
| Explicit of pat * ty
| Typeclass of Base.string Base.option * ty
type record_field =
| Named of Base.string * ty
| Coercion of Base.string * ty