open Ident open Location exception NonExhaustive of Types.descr exception Constraint of Types.descr * Types.descr exception ShouldHave of Types.descr * string exception WrongLabel of Types.descr * label exception UnboundId of id * bool exception ShouldHave2 of Types.descr * string * Types.descr exception Error of string val warning: loc -> string -> unit val error: loc -> string -> 'a include Custom.T val from_comp_unit: (Types.CompUnit.t -> t) ref val empty_env: t val get_ns_table : t -> Ns.table val register_types : Types.CompUnit.t -> t -> unit val enter_ns : U.t -> Ns.t -> t -> t val enter_cu : U.t -> Types.CompUnit.t -> t -> t val enter_value: id -> Types.t -> t -> t val enter_values: (id * Types.t) list -> t -> t val find_value: id -> t -> Types.t val iter_values: t -> (id -> Types.t -> unit) -> unit val enter_type: id -> Types.t -> t -> t val enter_types: (id * Types.t) list -> t -> t val find_type: id -> t -> Types.t val type_defs: t -> (id * Ast.ppat) list -> (id * Types.t) list val typ: t -> Ast.ppat -> Types.Node.t val pat: t -> Ast.ppat -> Patterns.node val dump_types: Format.formatter -> t -> unit val dump_type: Format.formatter -> t -> U.t -> unit val dump_schema_type: Format.formatter -> (Schema_types.component_kind * U.t * U.t) -> unit val dump_ns: Format.formatter -> t -> unit val set_ns_table_for_printer: t -> unit val type_expr: t -> Ast.pexpr -> Typed.texpr * Types.descr val type_let_decl: t -> Ast.ppat -> Ast.pexpr -> t * Typed.let_decl * (id * Types.t) list val type_let_funs: t -> Ast.pexpr list -> t * Typed.texpr list * (id * Types.t) list (* Assume that all the expressions are Abstractions *) val flatten: loc -> (Types.t -> bool -> Types.t) -> (Types.t -> bool -> Types.t) (** {2 Schema stuff} *) val register_schema: U.t -> Schema_types.schema -> unit val is_registered_schema: U.t -> bool val get_schema: U.t -> Schema_types.schema (** lookup schema by name *) val get_schema_names: unit -> U.t list (** registered schema names *) (* Operators *) type type_fun = Types.t -> bool -> Types.t val mk_unary_op: (string -> t -> int) ref val typ_unary_op: (int -> loc -> type_fun -> type_fun) ref val mk_binary_op: (string -> t -> int) ref val typ_binary_op: (int -> loc -> type_fun -> type_fun -> type_fun) ref