package dolmen
Module Expr.TySource
Usual definitions
Raised when applying a type constant to the wrong number of arguments.
Raised when the type provided is polymorphic, but occurred in a place where polymorphic types are forbidden by prenex/rank-1 polymorphism.
An equality function on types. Should be compatible with the hash function.
Comparison function over types. Should be compativle with the equality function.
Printing function.
Alias management
View
type view = [ | `Prop(*Propositions/booleans
*)| `Int(*Integers
*)| `Rat(*Rationals
*)| `Real(*Reals
*)| `Array of ty * ty(*Function arrays, from source to destination type.
*)| `Bitv of int(*Bitvectors of fixed length.
*)| `Float of int * int(*Floating points.
*)| `String(*Strings
*)| `String_reg_lang(*Regular languages over strings
*)| `Var of ty_var(*Variables (excluding wildcards)
*)| `Wildcard of ty_var(*Wildcards
*)| `App of [ `Generic of ty_cst | `Builtin of builtin ] * ty list(*Generic applications.
*)| `Arrow of ty list * ty| `Pi of ty_var list * ty
]View on types.
Returns the number of expected type arguments that the given type expects (i.e. the number of prenex polymorphic variables in the given type).
Type structure definition
Variables and constants
Freshen a type, replacing all its bound variables by new/fresh type variables.
Try and pattern mathc a list of patterns agains a list of types.
instance_of poly t decides whether t is an instance of poly, that is whether there are some types l such that a term of type poly applied to type arguments l gives a term of type t.
Tag for hooks called upon the wildcard instantiation.
Get the list of values bound to a list tag, returning the empty list if no value is bound.
Optionally bind an additional value to a list tag.
Bind a list of additional values to a list tag.