Debian Codegraph @

testsuite/tests/typing-short-paths/short-paths.compilers.reference

raw
1 module Core :
2 sig
3 module Int :
4 sig
5 module T :
6 sig
7 type t = int
8 val compare : 'a -> 'a -> t
9 val ( + ) : t -> t -> t
10 end
11 type t = int
12 val compare : 'a -> 'a -> t
13 val ( + ) : t -> t -> t
14 module Map :
15 sig
16 type key = t
17 type 'a t = 'a Map.Make(T).t
18 val empty : 'a t
19 val add : key -> 'a -> 'a t -> 'a t
20 val add_to_list : key -> 'a -> 'a list t -> 'a list t
21 val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
22 val singleton : key -> 'a -> 'a t
23 val remove : key -> 'a t -> 'a t
24 val merge :
25 (key -> 'a option -> 'b option -> 'c option) ->
26 'a t -> 'b t -> 'c t
27 val union :
28 (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
29 val cardinal : 'a t -> key
30 val bindings : 'a t -> (key * 'a) list
31 val min_binding : 'a t -> key * 'a
32 val min_binding_opt : 'a t -> (key * 'a) option
33 val max_binding : 'a t -> key * 'a
34 val max_binding_opt : 'a t -> (key * 'a) option
35 val choose : 'a t -> key * 'a
36 val choose_opt : 'a t -> (key * 'a) option
37 val find : key -> 'a t -> 'a
38 val find_opt : key -> 'a t -> 'a option
39 val find_first : (key -> bool) -> 'a t -> key * 'a
40 val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
41 val find_last : (key -> bool) -> 'a t -> key * 'a
42 val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option
43 val iter : (key -> 'a -> unit) -> 'a t -> unit
44 val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
45 val map : ('a -> 'b) -> 'a t -> 'b t
46 val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
47 val filter : (key -> 'a -> bool) -> 'a t -> 'a t
48 val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t
49 val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
50 val split : key -> 'a t -> 'a t * 'a option * 'a t
51 val is_empty : 'a t -> bool
52 val mem : key -> 'a t -> bool
53 val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
54 val compare : ('a -> 'a -> key) -> 'a t -> 'a t -> key
55 val for_all : (key -> 'a -> bool) -> 'a t -> bool
56 val exists : (key -> 'a -> bool) -> 'a t -> bool
57 val to_list : 'a t -> (key * 'a) list
58 val of_list : (key * 'a) list -> 'a t
59 val to_seq : 'a t -> (key * 'a) Seq.t
60 val to_rev_seq : 'a t -> (key * 'a) Seq.t
61 val to_seq_from : key -> 'a t -> (key * 'a) Seq.t
62 val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t
63 val of_seq : (key * 'a) Seq.t -> 'a t
64 end
65 end
66 module Std : sig module Int = Int end
67 end
68 val x : 'a Int.Map.t = <abstr>
69 Line 1, characters 8-9:
70 1 | let y = x + x ;;
71 ^
72 Error: The value x has type 'a Int.Map.t
73 but an expression was expected of type int
74 module M : sig type t = A type u = C end
75 module N : sig type t = B end
76 - : M.t = A
77 - : N.t = B
78 - : u = C
79 type t = M.t = A
80 type u = M.u = C
81 - : u = C
82 module L : sig type v = V end
83 - : v = V
84 module L : sig type v = V end
85 - : v = V
86 type t1 = A
87 module M1 : sig type u = v and v = t1 end
88 module N1 : sig type u = v and v = t1 end
89 type t1 = B
90 module N2 : sig type u = v and v = N1.v end
91 module type PR6566 = sig type t = string end
92 module PR6566 : sig type t = int end
93 Line 1, characters 26-32:
94 1 | module PR6566' : PR6566 = PR6566;;
95 ^^^^^^
96 Error: Signature mismatch:
97 Modules do not match: sig type t = int end is not included in PR6566
98 Type declarations do not match:
99 type t = int
100 is not included in
101 type t = string
102 The type t is not equal to the type string
103 module A : sig module B : sig type t = T end end
104 module M2 : sig type u = A.B.t type foo = int type v = u end
105