1
0
forked from GitHub/gf-core

Moved transfer libraries to transfer/lib

This commit is contained in:
bringert
2005-11-30 16:00:06 +00:00
parent 86df2a69b1
commit cba2fcb9b1
7 changed files with 40 additions and 9 deletions

11
transfer/lib/pair.tr Normal file
View File

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