Commit 98bef4db authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

Use new showMultiLineString to fix Trac #4436

There is an accompanying patch for libraries
    base
    template-haskell
parent 707ea588
......@@ -80,9 +80,19 @@ import qualified Data.IntMap as IM
import Data.Word
import System.IO ( Handle, stderr, stdout, hFlush )
import System.FilePath
#if __GLASGOW_HASKELL__ >= 700
import GHC.Show ( showMultiLineString )
#else
showMultiLineString :: String -> [String]
-- Crude version
showMultiLineString s = [s]
#endif
\end{code}
%************************************************************************
%* *
\subsection{The @PprStyle@ data type}
......@@ -608,7 +618,7 @@ pprHsChar c | c > '\x10ffff' = char '\\' <> text (show (fromIntegral (ord c) ::
-- | Special combinator for showing string literals.
pprHsString :: FastString -> SDoc
pprHsString fs = text (show (unpackFS fs))
pprHsString fs = vcat (map text (showMultiLineString (unpackFS fs)))
---------------------
-- Put a name in parens if it's an operator
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment