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

Contents of /typing/typer.mli

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1474 - (show annotations)
Tue Jul 10 18:53:27 2007 UTC (5 years, 10 months ago) by abate
File size: 2114 byte(s)
[r2005-02-23 01:17:28 by afrisch] Print

Original author: afrisch
Date: 2005-02-23 01:17:29+00:00
1 open Ident
2 open Location
3
4 exception NonExhaustive of Types.descr
5 exception Constraint of Types.descr * Types.descr
6 exception ShouldHave of Types.descr * string
7 exception WrongLabel of Types.descr * label
8 exception UnboundId of id * bool
9 exception UnboundExtId of Types.CompUnit.t * id
10 exception ShouldHave2 of Types.descr * string * Types.descr
11 exception Error of string
12
13 exception Warning of string * Types.t
14
15 val warning: loc -> string -> unit
16 val error: loc -> string -> 'a
17
18 include Custom.T
19
20 val from_comp_unit: (Types.CompUnit.t -> t) ref
21
22 val empty_env: t
23 val get_ns_table : t -> Ns.table
24
25 val register_types : Types.CompUnit.t -> t -> unit
26
27 val enter_ns : U.t -> Ns.t -> t -> t
28 val enter_schema: U.t -> string -> t -> t
29 val find_schema: U.t -> t -> string
30 val enter_cu : U.t -> Types.CompUnit.t -> t -> t
31 val find_cu : U.t -> t -> Types.CompUnit.t
32
33 val enter_value: id -> Types.t -> t -> t
34 val enter_values: (id * Types.t) list -> t -> t
35 val find_value: id -> t -> Types.t
36 val iter_values: t -> (id -> Types.t -> unit) -> unit
37
38 val enter_type: id -> Types.t -> t -> t
39 val enter_types: (id * Types.t) list -> t -> t
40 val find_type: id -> t -> Types.t
41
42 val type_defs: t -> (id * Ast.ppat) list -> (id * Types.t) list
43 val typ: t -> Ast.ppat -> Types.Node.t
44 val pat: t -> Ast.ppat -> Patterns.node
45
46 val dump_types: Format.formatter -> t -> unit
47 val dump_ns: Format.formatter -> t -> unit
48 val set_ns_table_for_printer: t -> unit
49
50 val type_expr:
51 t -> Ast.pexpr -> Typed.texpr * Types.descr
52
53 val type_let_decl: t -> Ast.ppat -> Ast.pexpr ->
54 t * Typed.let_decl * (id * Types.t) list
55
56 val type_let_funs: t -> Ast.pexpr list ->
57 t * Typed.texpr list * (id * Types.t) list
58 (* Assume that all the expressions are Abstractions *)
59
60
61
62
63 val flatten: (Types.t -> bool -> Types.t) -> (Types.t -> bool -> Types.t)
64
65 (** {2 Schema stuff} *)
66
67 val get_schema: string -> Schema_types.schema (** lookup schema by uri *)
68 val get_schema_names: t -> U.t list (** registered schema names *)
69
70 (* Operators *)
71
72 type type_fun = Types.t -> bool -> Types.t
73
74 val register_op: string -> int -> (type_fun list -> type_fun) -> unit

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