diff options
| author | bringert <bringert@cs.chalmers.se> | 2005-11-28 21:45:22 +0000 |
|---|---|---|
| committer | bringert <bringert@cs.chalmers.se> | 2005-11-28 21:45:22 +0000 |
| commit | 02c23401a7a3e54d48084fc2796a485de36383f1 (patch) | |
| tree | 03574e9f1c862f2b5685741c6c9d8ee8029aea21 /transfer/examples/pair.tr | |
| parent | 5a82068ddc0e75ee2f2280ffb5da9cda3e53bac3 (diff) | |
Changed all example programs to use layout syntax.
Diffstat (limited to 'transfer/examples/pair.tr')
| -rw-r--r-- | transfer/examples/pair.tr | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/transfer/examples/pair.tr b/transfer/examples/pair.tr index 07182e301..bdd517d9c 100644 --- a/transfer/examples/pair.tr +++ b/transfer/examples/pair.tr @@ -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 |
