1Typemod(3) OCaml library Typemod(3)
2
3
4
6 Typemod - Type-checking of the module language and typed ast plugin
7 hooks
8
10 Module Typemod
11
13 Module Typemod
14 : sig end
15
16
17 Type-checking of the module language and typed ast plugin hooks
18
19
20
21
22
23
24 val type_module : Env.t -> Parsetree.module_expr -> Typedtree.mod‐
25 ule_expr
26
27
28
29
30 val type_structure : Env.t -> Parsetree.structure -> Location.t ->
31 Typedtree.structure * Types.signature * Env.t
32
33
34
35
36 val type_toplevel_phrase : Env.t -> Parsetree.structure -> Type‐
37 dtree.structure * Types.signature * Env.t
38
39
40
41
42 val type_implementation : string -> string -> string -> Env.t -> Parse‐
43 tree.structure -> Typedtree.structure * Typedtree.module_coercion
44
45
46
47
48 val type_interface : string -> Env.t -> Parsetree.signature -> Type‐
49 dtree.signature
50
51
52
53
54 val transl_signature : Env.t -> Parsetree.signature -> Typedtree.signa‐
55 ture
56
57
58
59
60 val check_nongen_schemes : Env.t -> Types.signature -> unit
61
62
63
64
65 val type_open_ : ?used_slot:bool Pervasives.ref -> ?toplevel:bool ->
66 Asttypes.override_flag -> Env.t -> Location.t -> Longident.t Ast‐
67 types.loc -> Path.t * Env.t
68
69
70
71
72 val modtype_of_package : Env.t -> Location.t -> Path.t -> Longident.t
73 list -> Types.type_expr list -> Types.module_type
74
75
76
77
78 val simplify_signature : Types.signature -> Types.signature
79
80
81
82
83 val path_of_module : Typedtree.module_expr -> Path.t option
84
85
86
87
88 val save_signature : string -> Typedtree.signature -> string -> string
89 -> Env.t -> Cmi_format.cmi_infos -> unit
90
91
92
93
94 val package_units : Env.t -> string list -> string -> string -> Type‐
95 dtree.module_coercion
96
97
98
99
100 val initial_env : loc:Location.t -> safe_string:bool -> ini‐
101 tially_opened_module:string option -> open_implicit_modules:string list
102 -> Env.t
103
104
105
106 type error =
107 | Cannot_apply of Types.module_type
108 | Not_included of Includemod.error list
109 | Cannot_eliminate_dependency of Types.module_type
110 | Signature_expected
111 | Structure_expected of Types.module_type
112 | With_no_component of Longident.t
113 | With_mismatch of Longident.t * Includemod.error list
114 | With_makes_applicative_functor_ill_typed of Longident.t * Path.t *
115 Includemod.error list
116 | With_changes_module_alias of Longident.t * Ident.t * Path.t
117 | With_cannot_remove_constrained_type
118 | Repeated_name of string * string
119 | Non_generalizable of Types.type_expr
120 | Non_generalizable_class of Ident.t * Types.class_declaration
121 | Non_generalizable_module of Types.module_type
122 | Implementation_is_required of string
123 | Interface_not_compiled of string
124 | Not_allowed_in_functor_body
125 | Not_a_packed_module of Types.type_expr
126 | Incomplete_packed_module of Types.type_expr
127 | Scoping_pack of Longident.t * Types.type_expr
128 | Recursive_module_require_explicit_type
129 | Apply_generative
130 | Cannot_scrape_alias of Path.t
131
132
133
134
135
136 exception Error of Location.t * Env.t * error
137
138
139
140
141
142 exception Error_forward of Location.error
143
144
145
146
147
148 val report_error : Env.t -> Format.formatter -> error -> unit
149
150
151
152 module ImplementationHooks : sig end
153
154
155
156
157 module InterfaceHooks : sig end
158
159
160
161
162
163
164
165OCamldoc 2019-02-02 Typemod(3)