diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2013-06-21 17:41:26 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2013-06-24 13:10:47 +0100 |
commit | d2c3630dedc577f7e6eb8e945b05a86992bd5e0a (patch) | |
tree | 2666a329e1a7a67a3188aaf3253927e55f802d7b /compiler/utils/Outputable.lhs | |
parent | 59d6942f6399de9cdb444e84f721078881c1deee (diff) | |
download | haskell-d2c3630dedc577f7e6eb8e945b05a86992bd5e0a.tar.gz |
Make sure that Pretty.text is inlined in stage 0,
so that RULE text/str gets a chance to fire (Trac #7995).
And make sure that Outputable.text is inlined, so that the underlying
Pretty.text rule can fire.
The thing is that literal strings only turn into unpackCString#
in phase 1.
Diffstat (limited to 'compiler/utils/Outputable.lhs')
-rw-r--r-- | compiler/utils/Outputable.lhs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs index bd2a955469..88a8a75c62 100644 --- a/compiler/utils/Outputable.lhs +++ b/compiler/utils/Outputable.lhs @@ -421,7 +421,10 @@ rational :: Rational -> SDoc empty = docToSDoc $ Pretty.empty char c = docToSDoc $ Pretty.char c + text s = docToSDoc $ Pretty.text s +{-# INLINE text #-} -- Inline so that the RULE Pretty.text will fire + ftext s = docToSDoc $ Pretty.ftext s ptext s = docToSDoc $ Pretty.ptext s ztext s = docToSDoc $ Pretty.ztext s |