module Lang:sig
..end
val groupoid : bool Pervasives.ref
val unsafe_evars : bool Pervasives.ref
val parametric_schemes : bool Pervasives.ref
val show_instances : bool Pervasives.ref
type
var =
| |
VIdent of |
| |
VFresh of |
type
expr = {
|
desc : |
|
pos : |
type
desc =
| |
Var of |
(* |
type variable
| *) |
| |
EVar of |
(* |
meta-variable (expression, substition)
| *) |
| |
Type |
|||
| |
HomType |
(* |
a type of hom set
| *) |
| |
Obj |
(* |
type of 0-cells
| *) |
| |
Arr of |
(* |
arrow type
| *) |
| |
Pi of |
|||
| |
Abs of |
|||
| |
App of |
|||
| |
Coh of |
(* |
coherence (name, source, target)
| *) |
type
ps =
| |
PNil of |
(* |
start
| *) |
| |
PCons of |
(* |
extend
| *) |
| |
PDrop of |
(* |
drop
| *) |
typesubst =
(var * expr) list
type
evar =
| |
ENone of |
(* |
unknown variable with given number and type
| *) |
| |
ESome of |
(* |
instantiated variable
| *) |
val mk : ?pos:Common.Pos.t -> desc -> expr
val string_of_var : var -> string
val to_string : ?pa:bool -> expr -> string
val string_of_evar : ?pa:bool -> evar -> string
val string_of_ps : ps -> string
val string_of_evarref : evar Pervasives.ref -> string
val string_of_expr : ?pa:bool -> expr -> string
module PS:sig
..end
val fresh_var : var -> var
val fresh_inevar : ?t:expr -> unit -> evar Pervasives.ref
val fresh_evar : ?pos:Common.Pos.t -> ?t:expr -> unit -> expr
val occurs_evar : expr -> expr -> bool
val subst : subst -> expr -> expr
val unevar : expr -> expr
val free_evar : expr -> evar Pervasives.ref list
val instantiate : expr -> expr
val free_vars : expr -> var list
module Env:sig
..end
val normalize : Env.t -> expr -> expr
val infer_type : Env.t -> expr -> expr
val check_type : Env.t -> expr -> expr -> unit
val leq : Env.t -> expr -> expr -> bool
type
cmd =
| |
Decl of |
(* |
Declare a variable.
| *) |
| |
Axiom of |
(* |
Declare an axiom of given type.
| *) |
| |
Check of |
(* |
Check the type of an expression.
| *) |
| |
Eval of |
(* |
Evaluate an expression.
| *) |
| |
Env |
(* |
Display the environment.
| *) |
| |
Set of |
(* |
Set an option.
| *) |
val string_of_cmd : cmd -> string
typeprog =
cmd list
module Envs:sig
..end
val exec_cmd : Envs.t -> cmd -> Envs.t
val exec : Envs.t -> cmd list -> Envs.t