diff --git a/Happstack/Server/JMacro.hs b/Happstack/Server/JMacro.hs
--- a/Happstack/Server/JMacro.hs
+++ b/Happstack/Server/JMacro.hs
@@ -16,17 +16,15 @@
 
 import qualified Data.ByteString           as B
 import qualified Data.ByteString.Char8     as S
-import qualified Data.ByteString.Lazy.UTF8 as LB
 
-import Data.ByteString.Base64.URL (encode)
-import Data.Digest.Adler32        (adler32)
-import Data.Serialize             (runPut, putWord32le)
-import Happstack.Server           (ToMessage(..), ServerMonad, Request(Request, rqUri), Response, askRq)
-import Language.Javascript.JMacro (JStat(..), renderJs, renderPrefixJs, jmacro, jLam, toStat)
-import Text.PrettyPrint           (Style(mode), Mode(OneLineMode), style, renderStyle)
-
-lineStyle :: Style
-lineStyle = style { mode = OneLineMode }
+import Data.ByteString.Base64.URL   (encode)
+import Data.Digest.Adler32          (adler32)
+import Data.Serialize               (runPut, putWord32le)
+import qualified Data.Text.Lazy.Encoding as T
+import Happstack.Server             (ToMessage(..), ServerMonad, Request(Request, rqUri), Response, askRq)
+import Language.Javascript.JMacro   (JStat(..), renderJs, renderPrefixJs, jmacro, jLam, toStat)
+import Text.PrettyPrint.Leijen.Text (Doc, displayT, renderOneLine)
+-- import Text.PrettyPrint           (Style(mode), Mode(OneLineMode), style, renderStyle)
 
 mkId :: String -> String
 mkId = S.unpack
@@ -47,14 +45,14 @@
 instance ToMessage JStat where
     toContentType _ = S.pack "text/javascript; charset=UTF-8"
     toMessage    js =
-        LB.fromString . renderStyle lineStyle . renderJs $ scoped
+        T.encodeUtf8 . displayT . renderOneLine . renderJs $ scoped
       where
         scoped = [jmacro| (function { `(js)`; })(); |]
 
 instance ToMessage PrefixedJStat where
     toContentType _ = S.pack "text/javascript; charset=UTF-8"
     toMessage (PrefixedJStat prefix js) =
-        LB.fromString . renderStyle lineStyle . renderPrefixJs (mkId prefix) $ js
+        T.encodeUtf8 . displayT . renderOneLine . renderPrefixJs (mkId prefix) $ js
 
 -- | Render a 'JStat' into a 'Response', saturating the variable names with
 -- a hash computed from the 'rqUri'.  Unlike the 'ToMessage' instance for
diff --git a/happstack-jmacro.cabal b/happstack-jmacro.cabal
--- a/happstack-jmacro.cabal
+++ b/happstack-jmacro.cabal
@@ -1,5 +1,5 @@
 Name:                happstack-jmacro
-Version:             7.0.3
+Version:             7.0.4
 Synopsis:            Support for using JMacro with Happstack
 Homepage:            http://www.happstack.com/
 License:             BSD3
@@ -22,6 +22,7 @@
      cereal            == 0.3.*,
      digest            == 0.0.*,
      happstack-server  >= 6.4 && <7.2,
-     jmacro            == 0.5.*,
-     pretty            == 1.0.* || == 1.1.*,
+     jmacro            == 0.6.*,
+     wl-pprint-text    == 1.1.*,
+     text              >= 0.9 && < 0.12,
      utf8-string       == 0.3.*
