Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 126 lines (113 sloc) 5.315 kB
2f98bf9 Ajout des notices de copyright
xleroy authored
1 (***********************************************************************)
2 (* *)
6cd742a renaming of Objective Caml to OCaml and cleanup of copyright headers
doligez authored
3 (* OCaml *)
2f98bf9 Ajout des notices de copyright
xleroy authored
4 (* *)
5 (* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
6 (* *)
11d8fff Renommage en Objective Caml
xleroy authored
7 (* Copyright 1996 Institut National de Recherche en Informatique et *)
06a1e11 Changement de la licence
xleroy authored
8 (* en Automatique. All rights reserved. This file is distributed *)
9 (* under the terms of the Q Public License version 1.0. *)
2f98bf9 Ajout des notices de copyright
xleroy authored
10 (* *)
11 (***********************************************************************)
12
13 (* $Id$ *)
14
156c1d1 Passage a la version bootstrappee (franchissement du Rubicon)
xleroy authored
15 (* Type inference for the core language *)
16
17 open Asttypes
d673c60 Decoupage du module Typedtree en deux: Types et Typedtree.
xleroy authored
18 open Types
fb2bdfa Revu les impressions du compilateur
weis authored
19 open Format
156c1d1 Passage a la version bootstrappee (franchissement du Rubicon)
xleroy authored
20
8a319e9 Nouvelle syntaxe des classes
vouillon authored
21 val is_nonexpansive: Typedtree.expression -> bool
22
156c1d1 Passage a la version bootstrappee (franchissement du Rubicon)
xleroy authored
23 val type_binding:
24 Env.t -> rec_flag ->
8e0921b Refined error message for unbound identifiers: if M.ident is unbound …
weis authored
25 (Parsetree.pattern * Parsetree.expression) list ->
96a8119 ajout des annotations pour variables et appels terminaux
doligez authored
26 Annot.ident option ->
d673c60 Decoupage du module Typedtree en deux: Types et Typedtree.
xleroy authored
27 (Typedtree.pattern * Typedtree.expression) list * Env.t
8a319e9 Nouvelle syntaxe des classes
vouillon authored
28 val type_let:
29 Env.t -> rec_flag ->
96a8119 ajout des annotations pour variables et appels terminaux
doligez authored
30 (Parsetree.pattern * Parsetree.expression) list ->
31 Annot.ident option ->
8a319e9 Nouvelle syntaxe des classes
vouillon authored
32 (Typedtree.pattern * Typedtree.expression) list * Env.t
156c1d1 Passage a la version bootstrappee (franchissement du Rubicon)
xleroy authored
33 val type_expression:
d673c60 Decoupage du module Typedtree en deux: Types et Typedtree.
xleroy authored
34 Env.t -> Parsetree.expression -> Typedtree.expression
8a319e9 Nouvelle syntaxe des classes
vouillon authored
35 val type_class_arg_pattern:
0da3858 Merge olabl branch
garrigue authored
36 string -> Env.t -> Env.t -> label -> Parsetree.pattern ->
31a291f merge with branch bin-annot
lefessan authored
37 Typedtree.pattern * (Ident.t * string loc * Ident.t * type_expr) list *
8a319e9 Nouvelle syntaxe des classes
vouillon authored
38 Env.t * Env.t
39 val type_self_pattern:
3bf4a05 fast and compact classes
garrigue authored
40 string -> type_expr -> Env.t -> Env.t -> Env.t -> Parsetree.pattern ->
8a319e9 Nouvelle syntaxe des classes
vouillon authored
41 Typedtree.pattern *
42 (Ident.t * type_expr) Meths.t ref *
732ea16 add virtual instance variables
garrigue authored
43 (Ident.t * Asttypes.mutable_flag * Asttypes.virtual_flag * type_expr)
44 Vars.t ref *
8a319e9 Nouvelle syntaxe des classes
vouillon authored
45 Env.t * Env.t * Env.t
c3186b0 Extension objets.
vouillon authored
46 val type_expect:
45f2bc6 remarques de Jamie et Pierre
garrigue authored
47 ?in_function:(Location.t * type_expr) ->
0da3858 Merge olabl branch
garrigue authored
48 Env.t -> Parsetree.expression -> type_expr -> Typedtree.expression
c3186b0 Extension objets.
vouillon authored
49 val type_exp:
9f04c53 deTABisation
doligez authored
50 Env.t -> Parsetree.expression -> Typedtree.expression
0da3858 Merge olabl branch
garrigue authored
51 val type_approx:
52 Env.t -> Parsetree.expression -> type_expr
53 val type_argument:
7a5f892 merge branches/gadts
garrigue authored
54 Env.t -> Parsetree.expression ->
55 type_expr -> type_expr -> Typedtree.expression
0da3858 Merge olabl branch
garrigue authored
56
57 val option_some: Typedtree.expression -> Typedtree.expression
58 val option_none: type_expr -> Location.t -> Typedtree.expression
59 val extract_option_type: Env.t -> type_expr -> type_expr
4911006 vive les methodes polymorphes!
garrigue authored
60 val iter_pattern: (Typedtree.pattern -> unit) -> Typedtree.pattern -> unit
db2a1f9 merge branches/implicit-unpack + update camlp4
garrigue authored
61 val generalizable: int -> type_expr -> bool
80d5a8d delay some checks for warnings
garrigue authored
62 val reset_delayed_checks: unit -> unit
63 val force_delayed_checks: unit -> unit
c3186b0 Extension objets.
vouillon authored
64
bc50a46 allow coercions from self to own class (when safe!)
garrigue authored
65 val self_coercion : (Path.t * Location.t list ref) list ref
66
156c1d1 Passage a la version bootstrappee (franchissement du Rubicon)
xleroy authored
67 type error =
0406dd5 Improve error narrowing, and (partially) fix #5046.
frisch authored
68 Polymorphic_label of Longident.t
156c1d1 Passage a la version bootstrappee (franchissement du Rubicon)
xleroy authored
69 | Constructor_arity_mismatch of Longident.t * int * int
e698b13 Amelioration des messages d'erreurs d'unification (expansion des
vouillon authored
70 | Label_mismatch of Longident.t * (type_expr * type_expr) list
71 | Pattern_type_clash of (type_expr * type_expr) list
f42b67a merge changes 3.10.0 -> 3.10.1
doligez authored
72 | Multiply_bound_variable of string
273931e or-pat avec variables et compil du switch
maranget authored
73 | Orpat_vars of Ident.t
e698b13 Amelioration des messages d'erreurs d'unification (expansion des
vouillon authored
74 | Expr_type_clash of (type_expr * type_expr) list
156c1d1 Passage a la version bootstrappee (franchissement du Rubicon)
xleroy authored
75 | Apply_non_function of type_expr
0da3858 Merge olabl branch
garrigue authored
76 | Apply_wrong_label of label * type_expr
156c1d1 Passage a la version bootstrappee (franchissement du Rubicon)
xleroy authored
77 | Label_multiply_defined of Longident.t
31a291f merge with branch bin-annot
lefessan authored
78 | Label_missing of Ident.t list
156c1d1 Passage a la version bootstrappee (franchissement du Rubicon)
xleroy authored
79 | Label_not_mutable of Longident.t
345581e Correcting bug about erroneous erro reporting in case of wrong
weis authored
80 | Incomplete_format of string
81 | Bad_conversion of string * int * char
8a319e9 Nouvelle syntaxe des classes
vouillon authored
82 | Undefined_method of type_expr * string
83 | Undefined_inherited_method of string
c3186b0 Extension objets.
vouillon authored
84 | Virtual_class of Longident.t
1372b89 Revu representation des declarations de type private
xleroy authored
85 | Private_type of type_expr
86 | Private_label of Longident.t * type_expr
c3186b0 Extension objets.
vouillon authored
87 | Unbound_instance_variable of string
7f4a2d5 merge last changes from 3.11 branch (rev 10307)
doligez authored
88 | Instance_variable_not_mutable of bool * string
aed0979 Amelioration de quelques messages d'erreur.
vouillon authored
89 | Not_subtype of (type_expr * type_expr) list * (type_expr * type_expr) list
c3186b0 Extension objets.
vouillon authored
90 | Outside_class
91 | Value_multiply_overridden of string
6575ea1 remove coercion warning, add it only on error
garrigue authored
92 | Coercion_failure of
93 type_expr * type_expr * (type_expr * type_expr) list * bool
45f2bc6 remarques de Jamie et Pierre
garrigue authored
94 | Too_many_arguments of bool * type_expr
0da3858 Merge olabl branch
garrigue authored
95 | Abstract_wrong_label of label * type_expr
2bd4c08 Ajout de let module = <modulexpr> in <expr>
xleroy authored
96 | Scoping_let_module of string * type_expr
8a319e9 Nouvelle syntaxe des classes
vouillon authored
97 | Masked_instance_variable of Longident.t
5a0d729 #name notation to automatically generate or-pattern from variant type…
garrigue authored
98 | Not_a_variant_type of Longident.t
a86e9a1 enforce uniqueness of typing in label mode
garrigue authored
99 | Incoherent_label_order
4911006 vive les methodes polymorphes!
garrigue authored
100 | Less_general of string * (type_expr * type_expr) list
db2a1f9 merge branches/implicit-unpack + update camlp4
garrigue authored
101 | Modules_not_allowed
102 | Cannot_infer_signature
103 | Not_a_packed_module of type_expr
7a5f892 merge branches/gadts
garrigue authored
104 | Recursive_local_constraint of (type_expr * type_expr) list
105 | Unexpected_existential
156c1d1 Passage a la version bootstrappee (franchissement du Rubicon)
xleroy authored
106
107 exception Error of Location.t * error
108
fb2bdfa Revu les impressions du compilateur
weis authored
109 val report_error: formatter -> error -> unit
2bd4c08 Ajout de let module = <modulexpr> in <expr>
xleroy authored
110
111 (* Forward declaration, to be filled in by Typemod.type_module *)
112 val type_module: (Env.t -> Parsetree.module_expr -> Typedtree.module_expr) ref
adb88b0 Merge the letopenin branch in (svn merge -r9386:9397 /svn/ocaml/branc…
frisch authored
113 (* Forward declaration, to be filled in by Typemod.type_open *)
31a291f merge with branch bin-annot
lefessan authored
114 val type_open: (Env.t -> Location.t -> Longident.t loc -> Path.t * Env.t) ref
3bf4a05 fast and compact classes
garrigue authored
115 (* Forward declaration, to be filled in by Typeclass.class_structure *)
116 val type_object:
117 (Env.t -> Location.t -> Parsetree.class_structure ->
31a291f merge with branch bin-annot
lefessan authored
118 Typedtree.class_structure * Types.class_signature * string list) ref
db2a1f9 merge branches/implicit-unpack + update camlp4
garrigue authored
119 val type_package:
9daf1c1 keep the text width to 80 columns
garrigue authored
120 (Env.t -> Parsetree.module_expr -> Path.t -> Longident.t list ->
121 type_expr list -> Typedtree.module_expr * type_expr list) ref
8ba5d62 Merge first class modules: svn merge -r 9369:9396 $caml/branches/fstc…
frisch authored
122
31a291f merge with branch bin-annot
lefessan authored
123 val create_package_type : Location.t -> Env.t ->
124 Longident.t * (Longident.t * Parsetree.core_type) list ->
125 Path.t * (Longident.t * Typedtree.core_type) list * Types.type_expr
Something went wrong with that request. Please try again.