From 3efb7a671bb9f40ac0b442aa94e1714ddd8c9c53 Mon Sep 17 00:00:00 2001 From: krasimir Date: Sat, 23 May 2009 21:43:24 +0000 Subject: added test cases for computation with abstract syntax terms --- testsuite/runtime/eval/Test.gf | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 testsuite/runtime/eval/Test.gf (limited to 'testsuite/runtime/eval/Test.gf') 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 -- cgit v1.2.3