diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/c/poly_tup.expect | 2 | ||||
| -rw-r--r-- | test/c/poly_tup.sail | 19 |
2 files changed, 21 insertions, 0 deletions
diff --git a/test/c/poly_tup.expect b/test/c/poly_tup.expect new file mode 100644 index 00000000..204bb821 --- /dev/null +++ b/test/c/poly_tup.expect @@ -0,0 +1,2 @@ +x = 3 +ok diff --git a/test/c/poly_tup.sail b/test/c/poly_tup.sail new file mode 100644 index 00000000..3fac2de8 --- /dev/null +++ b/test/c/poly_tup.sail @@ -0,0 +1,19 @@ +default Order dec + +val "print" : string -> unit +val "print_int" : (string, int) -> unit + +union option ('a : Type) = { + Some : 'a, + None : unit +} + +function main() : unit -> unit = { + let r = (3, 2); + let o = Some(r); + match o { + Some(x, y) => print_int("x = ", x), + None() => () + }; + print("ok\n"); +}
\ No newline at end of file |
