typer.mli 572 Bytes
Newer Older
1 2 3
exception Pattern of string
exception NonExhaustive of Types.descr
exception Constraint of Types.descr * Types.descr * string
4 5 6

val compile_regexp : Ast.regexp -> Ast.ppat -> Ast.ppat

7 8 9
val register_global_types : (string * Ast.ppat) list -> unit
  (* the global environment is untouched if the function fails *)

10 11 12
val typ : Ast.ppat -> Typed.ttyp
val pat : Ast.ppat -> Typed.tpat

13 14 15 16 17 18
module Fv : Set.S with type elt = string
module Env : Map.S with type key = string

val expr: Ast.pexpr -> Fv.t * Typed.texpr

val compute_type: Types.descr Env.t -> Typed.texpr -> Types.descr