summaryrefslogtreecommitdiff
path: root/tests/pvar.ur
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
commit90f8d1bebc14a4a9153ffa9ec33c97f21cd0d560 (patch)
tree025b60966e74a3a00397814e167b4c71e1a63783 /tests/pvar.ur
parent4caa8ade915e91da526320d5bde2440333fc8eb7 (diff)
Polymorphic variants
Diffstat (limited to 'tests/pvar.ur')
-rw-r--r--tests/pvar.ur5
1 files changed, 5 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>})