summaryrefslogtreecommitdiffstats
path: root/testsuite/tests/typing-sigsubst/sigsubst.ml.reference
blob: 5a160347b495fbf535225d35c8d4e16a35342559 (plain)
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

#       module type Printable =
  sig type t val print : Format.formatter -> t -> unit end
#       module type Comparable = sig type t val compare : t -> t -> int end
#       Characters 60-94:
    include Comparable with type t = t
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Multiple definition of the type name t.
       Names must be unique in a given structure or signature.
#         module type PrintableComparable =
  sig
    type t
    val print : Format.formatter -> t -> unit
    val compare : t -> t -> int
  end
#       module type PrintableComparable =
  sig
    type t
    val print : Format.formatter -> t -> unit
    val compare : t -> t -> int
  end
# module type ComparableInt = sig val compare : int -> int -> int end
# module type S = sig type t val f : t -> t end
# module type S' = sig val f : int -> int end
#   module type S = sig type 'a t val map : ('a -> 'b) -> 'a t -> 'b t end
# module type S1 = sig val map : ('a -> 'b) -> 'a list -> 'b list end
#       module type S2 =
  sig
    type 'a dict = (string * 'a) list
    val map : ('a -> 'b) -> 'a dict -> 'b dict
  end
#       module type S =
  sig module T : sig type exp type arg end val f : T.exp -> T.arg end
# module M : sig type exp = string type arg = int end
# module type S' = sig val f : M.exp -> M.arg end
#     Characters 41-58:
  module type S = sig type 'a t end with type 'a t := unit;; (* Fails *)
                                         ^^^^^^^^^^^^^^^^^
Error: Only type constructors with identical parameters can be substituted.
#