Split widesnake example. Changed examples to use rec and sig keywords.

This commit is contained in:
bringert
2005-11-29 18:15:15 +00:00
parent f6159d4bff
commit 5b9249a422
4 changed files with 24 additions and 21 deletions

View File

@@ -1,8 +1,8 @@
Pair : Type -> Type -> Type
Pair A B = { p1 : A; p2 : B }
Pair A B = sig { p1 : A; p2 : B }
pair : (A:Type) -> (B:Type) -> A -> B -> Pair A B
pair _ _ x y = { p1 = x; p2 = y }
pair _ _ x y = rec { p1 = x; p2 = y }
fst : (A:Type) -> (B:Type) -> Pair A B -> A
fst _ _ p = case p of Pair _ _ x _ -> x