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,11 +1,11 @@
Pair : Type -> Type -> Type ;
Pair A B = { p1 : A; p2 : B } ;
Pair : Type -> Type -> Type
Pair A B = { p1 : A; p2 : B }
pair : (A:Type) -> (B:Type) -> A -> B -> Pair A B ;
pair _ _ x y = { p1 = x; p2 = y } ;
pair : (A:Type) -> (B:Type) -> A -> B -> Pair A B
pair _ _ x y = { p1 = x; p2 = y }
fst : (A:Type) -> (B:Type) -> Pair A B -> A ;
fst _ _ p = case p of { (Pair _ _ x _) -> x } ;
fst : (A:Type) -> (B:Type) -> Pair A B -> A
fst _ _ p = case p of Pair _ _ x _ -> x
snd : (A:Type) -> (B:Type) -> Pair A B -> B ;
snd _ _ p = case p of { (Pair _ _ x _) -> x } ;
snd : (A:Type) -> (B:Type) -> Pair A B -> B
snd _ _ p = case p of Pair _ _ x _ -> x