mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-21 02:39:31 -06:00
Transfer: changed syntax to remove the mandatory type annotation in let.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
x : Apa
|
||||
x = let x : T = y
|
||||
x = let x = y
|
||||
in case y of
|
||||
f -> q
|
||||
_ -> a
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user