| 1 |
abate |
9 |
exception NonExhaustive of Types.descr
|
| 2 |
abate |
28 |
exception MultipleLabel of Types.label
|
| 3 |
abate |
9 |
exception Constraint of Types.descr * Types.descr * string
|
| 4 |
abate |
19 |
exception ShouldHave of Types.descr * string
|
| 5 |
abate |
26 |
exception WrongLabel of Types.descr * Types.label
|
| 6 |
abate |
36 |
exception UnboundId of string
|
| 7 |
abate |
5 |
|
| 8 |
abate |
6 |
module Env : Map.S with type key = string
|
| 9 |
abate |
107 |
module Fv : Set.S with type elt = string
|
| 10 |
abate |
66 |
type env = Types.descr Env.t
|
| 11 |
abate |
107 |
type ti
|
| 12 |
|
|
type glb = ti Env.t
|
| 13 |
abate |
6 |
|
| 14 |
abate |
107 |
val compile_regexp : Ast.regexp -> Ast.ppat -> Ast.ppat
|
| 15 |
abate |
6 |
|
| 16 |
abate |
107 |
val register_global_types : glb -> (string * Ast.ppat) list -> glb
|
| 17 |
|
|
val typ : glb -> Ast.ppat -> Typed.ttyp
|
| 18 |
|
|
val pat : glb -> Ast.ppat -> Typed.tpat
|
| 19 |
|
|
val expr: glb -> Ast.pexpr -> Fv.t * Typed.texpr
|
| 20 |
|
|
val let_decl : glb -> Ast.ppat -> Ast.pexpr -> Typed.let_decl
|
| 21 |
abate |
66 |
|
| 22 |
abate |
107 |
|
| 23 |
abate |
19 |
val type_check:
|
| 24 |
|
|
Types.descr Env.t -> Typed.texpr -> Types.descr -> bool -> Types.descr
|
| 25 |
|
|
(* [compute_type env e t precise] checks that expression [e]
|
| 26 |
|
|
has type [t] under typing environment [env]; if [precise=true],
|
| 27 |
|
|
also returns a possible more precise type for [e].
|
| 28 |
|
|
*)
|
| 29 |
abate |
66 |
val type_let_decl: env -> Typed.let_decl -> (string * Types.descr) list
|
| 30 |
abate |
19 |
|
| 31 |
abate |
66 |
val type_rec_funs: env -> Typed.let_decl list -> (string * Types.descr) list
|
| 32 |
|
|
(* Assume that all the expressions are Absstractions *)
|