summaryrefslogtreecommitdiff
path: root/transfer
diff options
context:
space:
mode:
authorbringert <bringert@cs.chalmers.se>2005-12-09 11:45:57 +0000
committerbringert <bringert@cs.chalmers.se>2005-12-09 11:45:57 +0000
commitccfe7fb119aa4aed9b971bd52f72ab0f54df1bf4 (patch)
treed96ad696726ae6574c77f85d0908f9f63ef284cf /transfer
parentce8376885c8edb58ae09b60aa49376b74b070626 (diff)
Transfer: changed syntax to remove the mandatory type annotation in let.
Diffstat (limited to 'transfer')
-rw-r--r--transfer/examples/layout.tra2
-rw-r--r--transfer/examples/numerals.tra4
-rw-r--r--transfer/examples/widesnake.tra2
-rw-r--r--transfer/lib/prelude.tra2
4 files changed, 5 insertions, 5 deletions
diff --git a/transfer/examples/layout.tra b/transfer/examples/layout.tra
index ad35af376..8c2d9aa3f 100644
--- a/transfer/examples/layout.tra
+++ b/transfer/examples/layout.tra
@@ -1,5 +1,5 @@
x : Apa
-x = let x : T = y
+x = let x = y
in case y of
f -> q
_ -> a
diff --git a/transfer/examples/numerals.tra b/transfer/examples/numerals.tra
index 31bac33ac..2c2718130 100644
--- a/transfer/examples/numerals.tra
+++ b/transfer/examples/numerals.tra
@@ -85,8 +85,8 @@ int2bin = int2bin_ End
int2bin_ : Binary_Tree Bin -> Integer -> Binary_Tree Bin
int2bin_ b 0 = b
-int2bin_ b n = let d : Integer = if n % 2 == 0 then Zero else One
- q : Integer = n / 2
+int2bin_ b n = let d = if n % 2 == 0 then Zero else One
+ q = n / 2
in int2bin_ (d b) q
num2bin : Tree Numeral -> Binary_Tree Bin
diff --git a/transfer/examples/widesnake.tra b/transfer/examples/widesnake.tra
index e27bd5981..8b2a199c2 100644
--- a/transfer/examples/widesnake.tra
+++ b/transfer/examples/widesnake.tra
@@ -13,7 +13,7 @@ isSnake _ x = case x of
wideSnake : (A : Cat) -> Tree A -> Tree A
wideSnake _ x = case x of
- Wide y -> let y' : CN = wideSnake ? y
+ Wide y -> let y' = wideSnake ? y
in if isSnake CN y' then Thick y' else Wide y'
_ -> composOp ? ? compos_Tree ? wideSnake x
diff --git a/transfer/lib/prelude.tra b/transfer/lib/prelude.tra
index c6bb7ea67..696ea9d22 100644
--- a/transfer/lib/prelude.tra
+++ b/transfer/lib/prelude.tra
@@ -176,7 +176,7 @@ concat A = foldr (List A) (List A) (append A) (Nil A)
partition : (A : Type) -> (A -> Bool) -> List A -> Pair (List A) (List A)
partition _ _ [] = ([],[])
partition A p (x::xs) =
- let r : Pair (List A) (List A) = partition A p xs
+ let r = partition A p xs
in if p x then (x :: r.p1, r.p2) else (r.p1, x :: r.p2)