packages feed

haste-compiler 0.5.4 → 0.5.4.1

raw patch · 4 files changed

+37/−16 lines, 4 files

Files

haste-compiler.cabal view
@@ -1,5 +1,5 @@ Name:           haste-compiler-Version:        0.5.4+Version:        0.5.4.1 License:        BSD3 License-File:   LICENSE Synopsis:       Haskell To ECMAScript compiler
lib/array.js view
@@ -16,7 +16,20 @@     if(padding < 8) {         n += padding;     }-    var buffer = new ArrayBuffer(n);+    return new ByteArray(new ArrayBuffer(n));+}++// Wrap a JS ArrayBuffer into a ByteArray. Truncates the array length to the+// closest multiple of 8 bytes.+function wrapByteArr(buffer) {+    var diff = buffer.byteLength % 8;+    if(diff != 0) {+        var buffer = buffer.slice(0, buffer.byteLength-diff);+    }+    return new ByteArray(buffer);+}++function ByteArray(buffer) {     var views =         { 'i8' : new Int8Array(buffer)         , 'i16': new Int16Array(buffer)@@ -27,12 +40,11 @@         , 'f32': new Float32Array(buffer)         , 'f64': new Float64Array(buffer)         };-    var arr =-        { 'b'  : buffer-        , 'v'  : views-        , 'off': 0-        };-    return arr;+    this['b'] = buffer;+    this['v'] = views;+    this['off'] = 0; } window['newArr'] = newArr; window['newByteArr'] = newByteArr;+window['wrapByteArr'] = wrapByteArr;+window['ByteArray'] = ByteArray;
src/Haste/Version.hs view
@@ -12,7 +12,7 @@  -- | Current Haste version. hasteVersion :: Version-hasteVersion = Version [0,5,4] []+hasteVersion = Version [0,5,4,1] []  -- | Current Haste version as an Int. The format of this version number is --   MAJOR*10 000 + MINOR*100 + MICRO.
src/haste-boot.hs view
@@ -199,7 +199,8 @@       when (initialPortableBoot cfg) $ do         mapM_ relocate ["array", "bytestring", "containers", "base",                         "deepseq", "dlist", "haste-prim", "time", "haste-lib",-                        "monads-tf", "old-locale", "transformers", "integer-gmp"]+                        "monads-tf", "old-locale", "transformers", "integer-gmp",+                        "hashable", "text", "binary"]        -- Wait for closure download to finish.       await closure@@ -213,8 +214,14 @@   when exists $ rmdir dir  copyHasteCabal :: Bool -> FilePath -> Shell ()-copyHasteCabal portable file =-  cp file (hasteCabalRootDir portable </> "haste-cabal")+copyHasteCabal portable file = do+    mkdir True cabalDir+    cp file cabalBinary+    output (hasteBinDir </> "haste-cabal") (hasteCabalLauncher portable)+    liftIO $ copyPermissions cabalBinary (hasteBinDir </> "haste-cabal")+  where+    cabalDir = hasteCabalRootDir portable </> "haste-cabal"+    cabalBinary = cabalDir </> "haste-cabal.bin"  buildHasteCabal :: Bool -> FilePath -> Shell () buildHasteCabal portable dir = do@@ -330,11 +337,13 @@       -- Install haste-prim       inDirectory "haste-prim" $ hasteCabal Install [] -      -- Install time+      -- Install time + hashable + haste-lib       inDirectory "time" $ hasteCabal Install []--      -- Install haste-lib-      inDirectory "haste-lib" $ hasteCabal Install []+      hasteCabal Install [ "hashable-1.2.4.0"+                         , "-f-integer-gmp"+                         , "-f-sse2"+                         , "-f-sse41"+                         , "./haste-lib"]        -- Export monads-tf; it seems to be hidden by default       run_ hastePkgBinary ["expose", "monads-tf"] ""