summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2006-09-21 07:51:11 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2006-09-21 07:51:11 +0000
commite3368f2f17b2734d2ddebb8c53445409d715abe6 (patch)
treedd19e7deb4f131a4efa4f6a40fe8b687f8cb483f
parentc28863124b189ed57ec22ab83a60bdbbcf780b70 (diff)
compatibilities
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7624 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--testlabl/varunion.ml18
1 files changed, 18 insertions, 0 deletions
diff --git a/testlabl/varunion.ml b/testlabl/varunion.ml
index 8f44af42a..05b82f243 100644
--- a/testlabl/varunion.ml
+++ b/testlabl/varunion.ml
@@ -96,3 +96,21 @@ module Mix(X:T)(Y:T with type t = private [> ] ~ [X.t]) :
(* deep *)
module M : sig type t = private [> ] ~ [`A] end = struct type t = [`A] end
module M' : sig type t = private [> ] end = struct type t = [M.t | `A] end;;
+
+(* parameters *)
+module type T = sig
+ type t = private [> ] ~ [ `A of int ]
+ type ('a,'b) u = private [> ] ~ [ `A of 'a; `A of 'b; `B of 'b ]
+ type v = private [> ] ~ [ `A of int; `A of bool ]
+end
+module F(X:T) = struct
+ let h = function
+ `A _ -> true
+ | #X.t -> false
+ let f = function
+ `A _ | `B _ -> true
+ | #X.u -> false
+ let g = function
+ `A _ -> true
+ | #X.v -> false
+end