diff options
| author | krasimir <krasimir@chalmers.se> | 2009-07-07 11:40:14 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2009-07-07 11:40:14 +0000 |
| commit | 5abc99b291b01ce9619e51cb21a397a5c0c89a72 (patch) | |
| tree | 0243225d58bbe10fe19bff202fab0a9d3cd8bd77 /testsuite/runtime/eval/Test.gf | |
| parent | fd03f9fa0f799fabaef7b850d6b4808f280fdf1d (diff) | |
added testcases for evaluation with suspension
Diffstat (limited to 'testsuite/runtime/eval/Test.gf')
| -rw-r--r-- | testsuite/runtime/eval/Test.gf | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/runtime/eval/Test.gf b/testsuite/runtime/eval/Test.gf index 7d7edf369..71a7dc2c2 100644 --- a/testsuite/runtime/eval/Test.gf +++ b/testsuite/runtime/eval/Test.gf @@ -11,6 +11,9 @@ def g2 1 x = x ; fun g0 : Int -> Int -> Int ;
def g0 = g2 ;
+fun g3 : Int -> (Int -> Int) ;
+def g3 3 = g ;
+
fun const : Int -> Int -> Int ;
def const x _ = x ;
@@ -25,4 +28,14 @@ def dec zero = zero ; dec (succ n) = n ;
dec n = err ; -- for fall through checking
+fun plus : Nat -> Nat -> Nat ;
+def plus err zero = err ;
+ plus m err = err ;
+ plus m zero = m ;
+ plus m (succ n) = plus (succ m) n ;
+
+fun dec2 : Int -> Nat -> Nat ;
+def dec2 0 zero = err ;
+ dec2 _ (succ n) = n ;
+
}
\ No newline at end of file |
