#4436: Render multi-line strings more prettily in Template Haskell
---------------------------+------------------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 6.12.3
Resolution: fixed | Keywords:
Testcase: th/T4436 | Blockedby:
Difficulty: | Os: Unknown/Multiple
Blocking: | Architecture: Unknown/Multiple
Failure: None/Unknown |
---------------------------+------------------------------------------------
Changes (by simonpj):
* status: new => closed
* testcase: => th/T4436
* resolution: => fixed
Comment:
Fixed by
{{{
Mon Oct 25 08:12:36 PDT 2010 [email protected]
* Use new showMultiLineString to fix Trac #4436
There is an accompanying patch for libraries
base
template-haskell
M ./compiler/utils/Outputable.lhs -1 +11
}}}
Plus in base
{{{
Mon Oct 25 08:16:55 PDT 2010 [email protected]
* Add showMultiLineString to GHC.Show
This is part of the fix for #4436
showMultiLineString :: String -> [String]
-- | Like 'showLitString' (expand escape characters using Haskell
-- escape conventions), but
-- * break the string into multiple lines
-- * wrap the entire thing in double quotes
-- Example: @breakMultiLineString "hello\ngoodbye\nblah"@
-- returns @["\"hello\\", "\\goodbye\\", "\\blah\"" ]@
-- where those "\\" are really just a single backslash
-- (but I'm writing them here as Haskell literals)
M ./GHC/Show.lhs -11 +37
}}}
Plus in template-haskell
{{{
Mon Oct 25 08:18:07 PDT 2010 [email protected]
* Use showMultiLineString from GHC.Show
Part of patch for #4436
M ./Language/Haskell/TH/Ppr.hs -2 +8
}}}
It's a new feature, so we probably should not merge this.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4436#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs