Elm 0.2.0 → 0.2.0.1
raw patch · 4 files changed
+7/−4 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Elm.cabal +1/−1
- src/CompileToJS.hs +2/−1
- src/Compiler.hs +1/−1
- src/Types/Hints.hs +3/−1
Elm.cabal view
@@ -1,6 +1,6 @@ Name: Elm-Version: 0.2.0+Version: 0.2.0.1 Synopsis: The Elm language module. Description: Elm aims to make client-side web-development more pleasant. It is a statically/strongly typed, functional reactive
src/CompileToJS.hs view
@@ -89,7 +89,8 @@ "++" -> append e1 e2 "$" -> e1 ++ parens e2 "." -> jsFunc "x" . ret $ e1 ++ parens (e2 ++ parens "x")- "/=" -> e1 ++ "!==" ++ e2+ "==" -> "eq(" ++ e1 ++ "," ++ e2 ++ ")"+ "/=" -> "not(eq(" ++ e1 ++ "," ++ e2 ++ "))" _ -> e1 ++ (o:p) ++ e2 append e1 e2 = "Value.append" ++ parens (e1 ++ "," ++ e2)
src/Compiler.hs view
@@ -11,7 +11,7 @@ parse :: [String] -> IO () parse ("--help":_) = putStrLn usage-parse ("--version":_) = putStrLn "The Elm Compiler 0.2.0"+parse ("--version":_) = putStrLn "The Elm Compiler 0.2.0.1" parse [loc,file] | "--runtime-location=" `isPrefixOf` loc = produceHtml (tail $ dropWhile (/='=') loc) file
src/Types/Hints.hs view
@@ -92,7 +92,7 @@ bool = [ "not" -: BoolT ==> BoolT ] ++ hasType (xxb BoolT) ["&&","||"] ++ - hasType (xxb IntT) ["==","/=","<",">","<=",">="] + hasType (xxb IntT) ["<",">","<=",">="] -------- Polymorphic Functions -------- @@ -105,6 +105,8 @@ funcs = sequence [ do a <- var ; "id" -:: a ==> a + , do a <- var ; "==" -:: a ==> a ==> BoolT + , do a <- var ; "/=" -:: a ==> a ==> BoolT , do [a,b,c] <- vars 3 ; "flip" -:: (a ==> b ==> c) ==> (b ==> a ==> c) , do [a,b,c] <- vars 3 ; "." -:: (b ==> c) ==> (a ==> b) ==> (a ==> c) , do [a,b] <- vars 2 ; "$" -:: (a ==> b) ==> a ==> b