summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-07-31 11:28:55 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-07-31 11:28:55 -0400
commit183c43eb783edd68f76f941fa61b6ef1f8752a56 (patch)
tree30aa4641257f0fccda2ac8209f56cedeb3c0e09d /tests
parentae494cac4389a07a6feef73a084e2db7ccb84e22 (diff)
Elaborating module constructor patterns; parsing record patterns
Diffstat (limited to 'tests')
-rw-r--r--tests/caseMod.lac19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/caseMod.lac b/tests/caseMod.lac
new file mode 100644
index 00000000..2c6fbc80
--- /dev/null
+++ b/tests/caseMod.lac
@@ -0,0 +1,19 @@
+structure M = struct
+ datatype t = A | B
+end
+
+val f = fn x : M.t => case x of M.A => M.B | M.B => M.A
+
+datatype t = datatype M.t
+
+val g = fn x : t => case x of M.A => B | B => M.A
+
+structure N = struct
+ datatype t = C of t | D
+end
+
+val h = fn x : N.t => case x of N.C x => x | N.D => M.A
+
+datatype u = datatype N.t
+
+val i = fn x : u => case x of N.C x => x | D => M.A