summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/utils/Pretty.lhs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/utils/Pretty.lhs b/compiler/utils/Pretty.lhs
index 5d5dec1494..e4f748a05d 100644
--- a/compiler/utils/Pretty.lhs
+++ b/compiler/utils/Pretty.lhs
@@ -555,7 +555,10 @@ isEmpty Empty = True
isEmpty _ = False
char c = textBeside_ (Chr c) (_ILIT(1)) Empty
+
text s = case iUnbox (length s) of {sl -> textBeside_ (Str s) sl Empty}
+{-# NOINLINE [1] text #-} -- Give the RULE a chance to fire
+
ftext :: FastString -> Doc
ftext s = case iUnbox (lengthFS s) of {sl -> textBeside_ (PStr s) sl Empty}
ptext :: LitString -> Doc