summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2010-08-19 17:28:52 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2010-08-19 17:28:52 -0400
commit458bed0042d7bb206138ba6dce98686b056ae5c0 (patch)
tree025b60966e74a3a00397814e167b4c71e1a63783 /tests
parent9da36d3a4dd89b2486b832384321c7a548ac67ca (diff)
Polymorphic variants
Diffstat (limited to 'tests')
-rw-r--r--tests/pvar.ur5
-rw-r--r--tests/pvar.urp1
-rw-r--r--tests/pvar.urs1
3 files changed, 7 insertions, 0 deletions
diff --git a/tests/pvar.ur b/tests/pvar.ur
new file mode 100644
index 00000000..6b90e2c0
--- /dev/null
+++ b/tests/pvar.ur
@@ -0,0 +1,5 @@
+val v1 : variant [A = int, B = float] = make [#A] 1
+val v2 : variant [A = int, B = float] = make [#B] 2.3
+
+fun main () = return (match v1 {A = fn n => <xml>A: {[n]}</xml>,
+ B = fn n => <xml>B: {[n]}</xml>})
diff --git a/tests/pvar.urp b/tests/pvar.urp
new file mode 100644
index 00000000..f86c4a2e
--- /dev/null
+++ b/tests/pvar.urp
@@ -0,0 +1 @@
+pvar
diff --git a/tests/pvar.urs b/tests/pvar.urs
new file mode 100644
index 00000000..6ac44e0b
--- /dev/null
+++ b/tests/pvar.urs
@@ -0,0 +1 @@
+val main : unit -> transaction page