diff --git a/haste-compiler.cabal b/haste-compiler.cabal
--- a/haste-compiler.cabal
+++ b/haste-compiler.cabal
@@ -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
diff --git a/lib/array.js b/lib/array.js
--- a/lib/array.js
+++ b/lib/array.js
@@ -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;
diff --git a/src/Haste/Version.hs b/src/Haste/Version.hs
--- a/src/Haste/Version.hs
+++ b/src/Haste/Version.hs
@@ -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.
diff --git a/src/haste-boot.hs b/src/haste-boot.hs
--- a/src/haste-boot.hs
+++ b/src/haste-boot.hs
@@ -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"] ""
