diff --git a/ats-format.cabal b/ats-format.cabal
--- a/ats-format.cabal
+++ b/ats-format.cabal
@@ -1,5 +1,5 @@
 name:                ats-format
-version:             0.1.3.0
+version:             0.1.3.1
 synopsis:            A source-code formatter for ATS
 description:         An opinionated source-code formatter for [ATS](http://www.ats-lang.org/).
 homepage:            https://hub.darcs.net/vmchale/ats-format#readme
diff --git a/src/Language/ATS/PrettyPrint.hs b/src/Language/ATS/PrettyPrint.hs
--- a/src/Language/ATS/PrettyPrint.hs
+++ b/src/Language/ATS/PrettyPrint.hs
@@ -131,7 +131,7 @@
 
 prettyBinary :: Doc -> [Doc] -> Doc
 prettyBinary op es
-    | length (show $ mconcat es) < 80 = prettySmall op es
+    | length (showFast $ mconcat es) < 80 = prettySmall op es
     | otherwise = prettyLarge op es
 
 prettyLarge :: Doc -> [Doc] -> Doc
@@ -141,7 +141,7 @@
 -- FIXME we really need a monadic pretty printer lol.
 lengthAlt :: Doc -> Doc -> Doc
 lengthAlt d1 d2
-    | length (show d2) >= 40 = d1 <$> indent 4 d2
+    | length (showFast d2) >= 40 = d1 <$> indent 4 d2
     | otherwise = d1 <+> d2
 
 instance Pretty Expression where
@@ -365,9 +365,12 @@
 lineAlt :: Doc -> Doc -> Doc
 lineAlt = group .* flatAlt
 
+showFast :: Doc -> String
+showFast d = displayS (renderCompact d) mempty
+
 prettyRecord :: (Pretty a) => [(String, a)] -> Doc
 prettyRecord es
-    | any ((>40) . length . show . pretty) es = prettyRecordF True es
+    | any ((>40) . length . showFast . pretty) es = prettyRecordF True es
     | otherwise = lineAlt (prettyRecordF True es) (prettyRecordS True es)
 
 prettyRecordS :: (Pretty a) => Bool -> [(String, a)] -> Doc
diff --git a/test/data/polyglot.out b/test/data/polyglot.out
--- a/test/data/polyglot.out
+++ b/test/data/polyglot.out
@@ -1035,8 +1035,7 @@
         var viewstream = $EXTRA.streamize_fileref_word(x)
         val result = stream_vt_foldleft_cloptr( viewstream
                                               , init
-                                              , lam (acc, next) =>
-                                                  step_keyword(size, acc, next, ext)
+                                              , lam (acc, next) => step_keyword(size, acc, next, ext)
                                               )
         val _ = fileref_close(x)
       in
