diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/typecheck/pass/atomcase.sail | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/typecheck/pass/atomcase.sail b/test/typecheck/pass/atomcase.sail new file mode 100644 index 00000000..18840867 --- /dev/null +++ b/test/typecheck/pass/atomcase.sail @@ -0,0 +1,18 @@ +default Order dec + +val extern forall Num 'n, Num 'm. (atom<'n>, atom<'m>) -> bool effect pure eq_atom +overload (deinfix ==) [eq_atom] + +val forall 'n, 'n in {8,16}. [:'n:] -> int effect pure test_fn +val forall 'n, 'n in {8,16}. [:'n:] -> int effect pure test_switch + +function test_fn 8 = 8 +and test_fn 16 = 16 + + +function test_switch n = + switch(n) { + case 8 -> 8 + case 16 -> 16 + } + |
