sig
  type t =
      TiConst of int
    | TiVar of string
    | TiBinop of string * Types.Index.t * Types.Index.t
  type env = (string * int) list
  exception Illegal_op of string
  exception Illegal_type_index of Types.Index.t
  exception Unbound_type_index of string
  val subst : Types.Index.env -> Types.Index.t -> Types.Index.t
  val vars_of : Types.Index.t -> Types.VarSet.t
  val to_string : Types.Index.t -> string
end