Module Sstt_repl.Ast

type var_kind =
  1. | Mono
  2. | Poly
  3. | MonoRow
  4. | PolyRow
type builtin =
  1. | TEmpty
  2. | TAny
  3. | TAnyTuple
  4. | TAnyEnum
  5. | TAnyTag
  6. | TAnyInt
  7. | TAnyArrow
  8. | TAnyRecord
  9. | TAnyTupleComp of int
type varop =
  1. | TTuple
type binop =
  1. | TCap
  2. | TCup
  3. | TDiff
  4. | TArrow
type unop =
  1. | TNeg
  2. | TOption
type ty =
  1. | TBuiltin of builtin
  2. | TNamed of string
  3. | TTag of string * ty option
  4. | TVar of var_kind * string
  5. | TInterval of Z.t option * Z.t option
  6. | TRecord of (string * ty) list * ty
  7. | TVarop of varop * ty list
  8. | TBinop of binop * ty * ty
  9. | TUnop of unop * ty
  10. | TWhere of ty * (string * ty) list
type op =
  1. | LEQ
  2. | EQ
  3. | GEQ
type subst = (var_kind * string * ty) list
type tally = (ty * op * ty) list
type expr =
  1. | CTy of ty
  2. | CSubst of subst
  3. | CTally of tally
  4. | CCat of expr * expr
  5. | CApp of expr * expr
  6. | CCmp of expr * op * expr
type tag_prop =
  1. | PNone
  2. | PMono
  3. | PAnd
  4. | POr
  5. | PId
  6. | PAndEx
  7. | POrEx
type def =
  1. | DAtom of string
  2. | DTag of string * tag_prop
type elt =
  1. | DefineAlias of string list * expr
  2. | Define of def list
  3. | Expr of string option * expr
type program = elt list
type command =
  1. | Elt of elt
  2. | End
module StrMap : Stdlib.Map.S with type key = string
type env = {
  1. eenv : Sstt.Enum.t StrMap.t;
  2. tagenv : Sstt.Tag.t StrMap.t;
  3. tenv : Sstt.Ty.t StrMap.t;
  4. venv : Sstt.Var.t StrMap.t;
  5. mvenv : Sstt.Var.t StrMap.t;
  6. rvenv : Sstt.RowVar.t StrMap.t;
  7. mrvenv : Sstt.RowVar.t StrMap.t;
  8. mono : Sstt.VarSet.t;
  9. rmono : Sstt.RowVarSet.t;
  10. lenv : Sstt.Label.t StrMap.t;
}
val empty_env : env
val build_ty : env -> ty -> Sstt.Ty.t * env
val build_subst : env -> subst -> Sstt.Subst.t * env
val build_tally : env -> tally -> Sstt.Tallying.constr list * env