summaryrefslogtreecommitdiff
path: root/testsuite/tests/typing-modules/private.ml
blob: 202b90e9e1622c0570c89d3dfe14022862195923 (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
(* TEST
 expect;
*)

module M :
     sig type t = private [< `A | `B of string] end
= struct type t = [`A|`B of string] end;;
[%%expect{|
module M : sig type t = private [< `A | `B of string ] end
|}]

module M = struct type header_item_tag =
    [ `CO | `HD | `Other of string | `PG | `RG | `SQ ]
end;;
[%%expect{|
module M :
  sig
    type header_item_tag = [ `CO | `HD | `Other of string | `PG | `RG | `SQ ]
  end
|}]

module M' : sig type header_item_tag =
    private [< `CO | `HD | `Other of string | `PG | `RG | `SQ ]
end = M;;
[%%expect{|
module M' :
  sig
    type header_item_tag = private
        [< `CO | `HD | `Other of string | `PG | `RG | `SQ ]
  end
|}]