summaryrefslogtreecommitdiff
path: root/testsuite/tests/typing-recmod/t21ok.ml
blob: 2c97da3fb9bd5538c1402f3a5a19895a49da89de (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
(* TEST
flags = " -w -a "
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)

module F ( X : Set.OrderedType ) = struct
  module rec Mod : sig
    module XSet :
      sig
        type elt = X.t
        type t = Set.Make( X ).t
      end
    module XMap :
      sig
        type key = X.t
        type 'a t = 'a Map.Make(X).t
      end
    type elt = X.t
    type t = XSet.t XMap.t
    val compare: t -> t -> int
  end
     =
  struct
    module XSet = Set.Make( X )
    module XMap = Map.Make( X )

    type elt = X.t
    type t = XSet.t XMap.t
    let compare = (fun x y -> 0)
  end
  and ModSet : Set.S with type elt = Mod.t = Set.Make( Mod )
end