summaryrefslogtreecommitdiff
path: root/testsuite/runtime/eval/Test.gf
blob: 7d7edf3693eaf5bbd94626fe2d3ea0fb4540403c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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

}