diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-07-23 09:17:33 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-07-23 09:17:33 +0100 |
commit | fabb1551411701338e737c741300bdd47ad11f9c (patch) | |
tree | fb99cd7b161ac43f972b3ff230e607b93626e7d3 /compiler/utils | |
parent | 79062a8a0e9168b7f925c05699c30333563a9303 (diff) | |
download | haskell-fabb1551411701338e737c741300bdd47ad11f9c.tar.gz |
Delay inlining 'text' so that the RULE has a chance to fire
Diffstat (limited to 'compiler/utils')
-rw-r--r-- | compiler/utils/Pretty.lhs | 3 |
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 |