summaryrefslogtreecommitdiff
path: root/testsuite/runtime/eval/Test.gf
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/runtime/eval/Test.gf')
-rw-r--r--testsuite/runtime/eval/Test.gf28
1 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/runtime/eval/Test.gf b/testsuite/runtime/eval/Test.gf
new file mode 100644
index 000000000..7d7edf369
--- /dev/null
+++ b/testsuite/runtime/eval/Test.gf
@@ -0,0 +1,28 @@
+abstract Test = {
+
+fun f : Int -> Int -> Int ;
+
+fun g : Int -> Int ;
+def g 1 = 2 ;
+
+fun g2 : Int -> Int -> Int ;
+def g2 1 x = x ;
+
+fun g0 : Int -> Int -> Int ;
+def g0 = g2 ;
+
+fun const : Int -> Int -> Int ;
+def const x _ = x ;
+
+cat Nat ;
+
+data zero : Nat ;
+ succ : Nat -> Nat ;
+ err : Nat ;
+
+fun dec : Nat -> Nat ;
+def dec zero = zero ;
+ dec (succ n) = n ;
+ dec n = err ; -- for fall through checking
+
+} \ No newline at end of file