diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-12-14 19:23:17 +0000 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-12-14 19:23:17 +0000 |
commit | 6409ba527bfd7c7b536d0c523c5f99186cd258db (patch) | |
tree | 9661d5f98e13631a4d03cd0c2ea0d7a3afc68fe5 /compiler/utils/Outputable.lhs | |
parent | ca56668af97f534b3cff8717fc35d795a0bcb47d (diff) | |
download | haskell-6409ba527bfd7c7b536d0c523c5f99186cd258db.tar.gz |
Rename remaining FastBytes usages to ByteString
Diffstat (limited to 'compiler/utils/Outputable.lhs')
-rw-r--r-- | compiler/utils/Outputable.lhs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs index a56037b8b7..76555eb7ea 100644 --- a/compiler/utils/Outputable.lhs +++ b/compiler/utils/Outputable.lhs @@ -84,6 +84,7 @@ import Platform import Pretty ( Doc, Mode(..) ) import Panic +import Data.ByteString (ByteString) import qualified Data.ByteString as BS import Data.Char import qualified Data.Map as M @@ -740,8 +741,8 @@ pprHsString :: FastString -> SDoc pprHsString fs = vcat (map text (showMultiLineString (unpackFS fs))) -- | Special combinator for showing string literals. -pprHsBytes :: FastBytes -> SDoc -pprHsBytes fb = let escaped = concatMap escape $ BS.unpack fb +pprHsBytes :: ByteString -> SDoc +pprHsBytes bs = let escaped = concatMap escape $ BS.unpack bs in vcat (map text (showMultiLineString escaped)) <> char '#' where escape :: Word8 -> String escape w = let c = chr (fromIntegral w) |