forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathincludecore.mli
73 lines (65 loc) · 2.19 KB
/
includecore.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
(**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
(* *)
(* Copyright 1996 Institut National de Recherche en Informatique et *)
(* en Automatique. *)
(* *)
(* All rights reserved. This file is distributed under the terms of *)
(* the GNU Lesser General Public License version 2.1, with the *)
(* special exception on linking described in the file LICENSE. *)
(* *)
(**************************************************************************)
(* Inclusion checks for the core language *)
open Typedtree
open Types
exception Dont_match
type type_mismatch =
| Arity
| Privacy
| Kind
| Constraint
| Manifest
| Variance
| Field_type of Ident.t
| Field_mutable of Ident.t
| Field_optional of Ident.t
| Field_arity of Ident.t
| Field_names of int * string * string
| Field_missing of bool * Ident.t
| Record_representation of record_representation * record_representation
| Unboxed_representation of bool
| Immediate
| Tag_name
| Variant_representation of Ident.t
val value_descriptions :
loc:Location.t ->
Env.t ->
Ident.t ->
value_description ->
value_description ->
module_coercion
val type_declarations :
?equality:bool ->
loc:Location.t ->
Env.t ->
string ->
type_declaration ->
Ident.t ->
type_declaration ->
type_mismatch list
val extension_constructors :
loc:Location.t ->
Env.t ->
Ident.t ->
extension_constructor ->
extension_constructor ->
bool
(*
val class_types:
Env.t -> class_type -> class_type -> bool
*)
val report_type_mismatch :
string -> string -> string -> Format.formatter -> type_mismatch list -> unit