exception Pattern of string exception NonExhaustive of Types.descr exception MultipleLabel of Types.label exception Constraint of Types.descr * Types.descr * string exception ShouldHave of Types.descr * string exception WrongLabel of Types.descr * Types.label exception UnboundId of string val compile_regexp : Ast.regexp -> Ast.ppat -> Ast.ppat val register_global_types : (string * Ast.ppat) list -> unit (* the global environment is untouched if the function fails *) val typ : Ast.ppat -> Typed.ttyp val pat : Ast.ppat -> Typed.tpat module Fv : Set.S with type elt = string module Env : Map.S with type key = string type env = Types.descr Env.t val expr: Ast.pexpr -> Fv.t * Typed.texpr val let_decl : Ast.ppat -> Ast.pexpr -> Typed.let_decl val type_check: Types.descr Env.t -> Typed.texpr -> Types.descr -> bool -> Types.descr (* [compute_type env e t precise] checks that expression [e] has type [t] under typing environment [env]; if [precise=true], also returns a possible more precise type for [e]. *) val type_let_decl: env -> Typed.let_decl -> (string * Types.descr) list val type_rec_funs: env -> Typed.let_decl list -> (string * Types.descr) list (* Assume that all the expressions are Absstractions *)