summaryrefslogtreecommitdiff
path: root/tests/pvar.ur
diff options
context:
space:
mode:
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>})