summaryrefslogtreecommitdiff
path: root/transfer/examples/bool.tr
blob: 291434a9f9e72a118d31a98f92a2d973b4fb7878 (plain)
1
2
3
4
5
6
7
8
data Bool : Type where { True : Bool; False : Bool; } ;

depif : (A:Type) -> (B:Type) -> (b:Bool) -> A -> B -> if Type b then A else B ;
depif _ _ True x _ = x ;
depif _ _ False _ y = y ;

not : Bool -> Bool ;
not b = if b then False else True ;