/[svn]/typing/typer.mli
ViewVC logotype

Contents of /typing/typer.mli

Parent Directory Parent Directory | Revision Log Revision Log


Revision 66 - (show annotations)
Tue Jul 10 17:02:51 2007 UTC (5 years, 10 months ago) by abate
File size: 1253 byte(s)
[r2002-10-31 16:59:46 by cvscast] Empty log message

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

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5