1
0
forked from GitHub/gf-core

Changed all example programs to use layout syntax.

This commit is contained in:
bringert
2005-11-28 21:45:22 +00:00
parent 576f25b53e
commit 2e16e1e384
10 changed files with 83 additions and 90 deletions

View File

@@ -1,8 +1,10 @@
data Bool : Type where { True : Bool; False : Bool; } ;
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 ;
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 ;
not : Bool -> Bool
not b = if b then False else True