| 1 |
abate |
9 |
exception Pattern of string
|
| 2 |
|
|
exception NonExhaustive of Types.descr
|
| 3 |
|
|
exception Constraint of Types.descr * Types.descr * string
|
| 4 |
abate |
19 |
exception ShouldHave of Types.descr * string
|
| 5 |
abate |
5 |
|
| 6 |
|
|
val compile_regexp : Ast.regexp -> Ast.ppat -> Ast.ppat
|
| 7 |
|
|
|
| 8 |
abate |
13 |
val register_global_types : (string * Ast.ppat) list -> unit
|
| 9 |
|
|
(* the global environment is untouched if the function fails *)
|
| 10 |
|
|
|
| 11 |
abate |
5 |
val typ : Ast.ppat -> Typed.ttyp
|
| 12 |
|
|
val pat : Ast.ppat -> Typed.tpat
|
| 13 |
|
|
|
| 14 |
abate |
6 |
module Fv : Set.S with type elt = string
|
| 15 |
|
|
module Env : Map.S with type key = string
|
| 16 |
|
|
|
| 17 |
|
|
val expr: Ast.pexpr -> Fv.t * Typed.texpr
|
| 18 |
|
|
|
| 19 |
abate |
19 |
val type_check:
|
| 20 |
|
|
Types.descr Env.t -> Typed.texpr -> Types.descr -> bool -> Types.descr
|
| 21 |
|
|
(* [compute_type env e t precise] checks that expression [e]
|
| 22 |
|
|
has type [t] under typing environment [env]; if [precise=true],
|
| 23 |
|
|
also returns a possible more precise type for [e].
|
| 24 |
|
|
*)
|
| 25 |
|
|
|