added test cases for computation with abstract syntax terms

This commit is contained in:
krasimir
2009-05-23 21:43:24 +00:00
parent 0c46a129e6
commit d6092e0ab2
3 changed files with 107 additions and 0 deletions

View File

@@ -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
}