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 open Ident module Env : Map.S with type key = Ident.id module TypeEnv : Map.S with type key = string type env = Types.descr Env.t type ti type glb = ti TypeEnv.t val compile_regexp : Ast.regexp -> Ast.ppat -> Ast.ppat val register_global_types : glb -> (string * Ast.ppat) list -> glb val typ : glb -> Ast.ppat -> Typed.ttyp val pat : glb -> Ast.ppat -> Typed.tpat val expr: glb -> Ast.pexpr -> fv * Typed.texpr val let_decl : glb -> Ast.ppat -> Ast.pexpr -> Typed.let_decl val type_check: env -> 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 -> (id * Types.descr) list val type_rec_funs: env -> Typed.let_decl list -> (id * Types.descr) list (* Assume that all the expressions are Absstractions *)