summaryrefslogtreecommitdiff
path: root/testsuite/compiler/check/abstract-operations/Nat.gf
blob: 09dc0809a2e47e674db0fe5cbf377e6e95f9bf7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
abstract Nat = {

cat Nat ;
data zero : Nat ;
     succ : Nat -> Nat ;
     
oper plus : Nat -> Nat -> Nat ;
def  plus zero     y = y ;
     plus (succ x) y = succ (plus x y) ;

oper twice : Nat -> Nat = \x -> plus x x ;

}