haste-compiler 0.4.4 → 0.4.4.1
raw patch · 4 files changed
+8/−13 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Haste.JSON: Bool :: !Bool -> JSON
+ Haste.JSON: Bool :: {-# UNPACK #-} !Bool -> JSON
- Haste.JSON: Num :: !Double -> JSON
+ Haste.JSON: Num :: {-# UNPACK #-} !Double -> JSON
- Haste.JSON: Str :: !JSString -> JSON
+ Haste.JSON: Str :: {-# UNPACK #-} !JSString -> JSON
Files
- haste-compiler.cabal +1/−1
- lib/stdlib.js +1/−3
- libraries/haste-lib/src/Haste/JSON.hs +4/−7
- src/Haste/Version.hs +2/−2
haste-compiler.cabal view
@@ -1,5 +1,5 @@ Name: haste-compiler-Version: 0.4.4+Version: 0.4.4.1 License: BSD3 License-File: LICENSE Synopsis: Haskell To ECMAScript compiler
lib/stdlib.js view
@@ -309,13 +309,11 @@ function toHS(obj) { switch(typeof obj) { case 'number':- return [0, [0, jsRead(obj)]];+ return [0, jsRead(obj)]; case 'string': return [1, obj];- break; case 'boolean': return [2, obj]; // Booleans are special wrt constructor tags!- break; case 'object': if(obj instanceof Array) { return [3, arr2lst_json(obj, 0)];
libraries/haste-lib/src/Haste/JSON.hs view
@@ -32,9 +32,9 @@ -- Remember to update jsParseJSON if this data type changes! data JSON- = Num !Double- | Str !JSString- | Bool !Bool+ = Num {-# UNPACK #-} !Double+ | Str {-# UNPACK #-} !JSString+ | Bool {-# UNPACK #-} !Bool | Arr ![JSON] | Dict ![(JSString, JSON)] | Null@@ -75,14 +75,11 @@ where unq ('"' : cs) = "\\\"" ++ unq cs unq (c : cs)- | c < ' ' || c > '~' = unicodeChar c (unq cs) | c == '\\' = "\\\\" ++ unq cs | otherwise = c : unq cs unq _ = ['"'] - unicodeChar c str =- case showHex (ord c) "" of- s -> "\\u" ++ replicate (4-length s) '0' ++ s ++ str+ unicodeChar c str = c : str #endif -- | Look up a JSON object from a JSON dictionary. Panics if the dictionary
src/Haste/Version.hs view
@@ -14,13 +14,13 @@ -- | Current Haste version. hasteVersion :: Version-hasteVersion = Version [0, 4, 4] []+hasteVersion = Version [0, 4, 4, 1] [] -- | Current Haste version as an Int. The format of this version number is -- MAJOR*10 000 + MINOR*100 + MICRO. -- Version 1.2.3 would thus be represented as 10203. intVersion :: Int-intVersion = foldl (\a x -> a*100+x) 0 ver+intVersion = foldl (\a x -> a*100+x) 0 $ take 3 ver where Version ver _ = hasteVersion -- | The version of GHC used to build this binary.