summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/c/poly_pair.expect1
-rw-r--r--test/c/poly_pair.sail20
2 files changed, 21 insertions, 0 deletions
diff --git a/test/c/poly_pair.expect b/test/c/poly_pair.expect
new file mode 100644
index 00000000..d00491fd
--- /dev/null
+++ b/test/c/poly_pair.expect
@@ -0,0 +1 @@
+1
diff --git a/test/c/poly_pair.sail b/test/c/poly_pair.sail
new file mode 100644
index 00000000..6d0bdaad
--- /dev/null
+++ b/test/c/poly_pair.sail
@@ -0,0 +1,20 @@
+default Order dec
+
+val print = "print_endline" : string -> unit
+
+val "eq_int" : (int, int) -> bool
+
+union test ('a : Type) ('b : Type) = {
+ Ctor1 : ('a, 'b),
+ Ctor2 : int
+}
+
+val main : unit -> unit
+
+function main() = {
+ let x = Ctor1(3, 2);
+ match x {
+ Ctor1(y, z) if eq_int(y, 3) => print("1"),
+ _ => print("2")
+ };
+} \ No newline at end of file