diff --git a/Data/Aeson/Encode/Pretty.hs b/Data/Aeson/Encode/Pretty.hs
--- a/Data/Aeson/Encode/Pretty.hs
+++ b/Data/Aeson/Encode/Pretty.hs
@@ -8,11 +8,11 @@
 import Data.Aeson (Value(..), ToJSON(..))
 import qualified Data.Aeson.Encode as Aeson
 import Data.ByteString.Lazy (ByteString)
+import qualified Data.HashMap.Strict as H (toList)
 import Data.List (intersperse)
-import Data.Map (assocs)
 import Data.Monoid (mappend, mconcat, mempty)
 import Data.Text (Text)
-import Data.Vector (toList)
+import qualified Data.Vector as V (toList)
 
 
 type Indent = Int
@@ -25,8 +25,8 @@
 fromValue :: Indent -> Value -> Builder
 fromValue ind = go
   where
-    go (Array v)  = fromCompound ind ('[',']') fromValue (toList v)
-    go (Object v) = fromCompound ind ('{','}') fromPair (assocs v)
+    go (Array v)  = fromCompound ind ('[',']') fromValue (V.toList v)
+    go (Object m) = fromCompound ind ('{','}') fromPair (H.toList m)
     go v          = Aeson.fromValue v
 
 fromCompound :: Indent
diff --git a/Main.hs b/Main.hs
--- a/Main.hs
+++ b/Main.hs
@@ -1,12 +1,11 @@
 {-# LANGUAGE DeriveDataTypeable, RecordWildCards, OverloadedStrings #-}
 module Main (main) where
 
-import Prelude hiding (interact, concat)
-import Data.Aeson (Value(..), json, encode)
+import Prelude hiding (interact, concat, unlines, null)
+import Data.Aeson (Value(..), json', encode)
 import Data.Aeson.Encode.Pretty (encodePretty)
 import Data.Attoparsec.Lazy (Result(..), parse)
-import Data.ByteString.Lazy (ByteString, interact, concat, append)
-import qualified Data.ByteString.Lazy as L (null)
+import Data.ByteString.Lazy.Char8 (ByteString, interact, unlines, null)
 import Data.Version (showVersion)
 import Paths_aeson_pretty (version)
 import System.Console.CmdArgs
@@ -39,11 +38,11 @@
 main = do
     Opts{..} <- cmdArgs opts
     let enc = if compact then encode else encodePretty
-    interact $ concat . map ((`append` "\n") . enc) . values
+    interact $ unlines . map enc . values
 
 values :: ByteString -> [Value]
-values s = case parse json s of
-            Done rest v       -> v : values rest
+values s = case parse json' s of
+            Done rest v     -> v : values rest
             Fail rest _ _
-                | L.null rest -> []
-                | otherwise   -> error "invalid json"
+                | null rest -> []
+                | otherwise -> error "invalid json"
diff --git a/aeson-pretty.cabal b/aeson-pretty.cabal
--- a/aeson-pretty.cabal
+++ b/aeson-pretty.cabal
@@ -1,5 +1,5 @@
 name:           aeson-pretty
-version:        0.3.1
+version:        0.4.0
 license:        BSD3
 license-file:   LICENSE
 category:       Text, Web, JSON, Pretty Printer
@@ -43,15 +43,16 @@
         buildable: False
     else
         build-depends:
-            aeson == 0.3.2.*,
-            attoparsec >= 0.9.1,
+            aeson == 0.4.0.*,
+            attoparsec == 0.10.*,
             base == 4.*,
-            blaze-builder >= 0.3,
+            blaze-builder == 0.3.*,
             bytestring == 0.9.*,
             cmdargs == 0.7.*,
             containers,
-            vector >= 0.7,
-            text
+            vector == 0.9,
+            text == 0.11.*,
+            unordered-containers >= 0.1.3.0
 
     ghc-options: -Wall
     ghc-prof-options: -auto-all
@@ -60,17 +61,16 @@
     exposed-modules:
         Data.Aeson.Encode.Pretty
 
-    other-modules:
-
     build-depends:
-        aeson == 0.3.2.*,
-        attoparsec >= 0.9.1,
+        aeson == 0.4.0.*,
+        attoparsec == 0.10.*,
         base == 4.*,
-        blaze-builder >= 0.3,
+        blaze-builder == 0.3.*,
         bytestring == 0.9.*,
         containers,
-        vector >= 0.7,
-        text
+        vector == 0.9,
+        text == 0.11.*,
+        unordered-containers >= 0.1.3.0
 
     ghc-options: -Wall
 
