[GHC] #11529: Show instance of Char should print literals for non-ascii printable charcters
GHC
ghc-devs at haskell.org
Thu Feb 4 04:19:33 UTC 2016
#11529: Show instance of Char should print literals for non-ascii printable
charcters
-------------------------------------+-------------------------------------
Reporter: nushio | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.3
Resolution: invalid | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by thomie):
GHCi could be changed to show unicode characters nicely by default. The
code is in the function `tcUserStmt` in
`compiler/typecheck/TcRnDriver.hs`.
Expressions:
{{{
-- The plans are:
-- A. [it <- e; print it] but not if it::()
-- B. [it <- e]
-- C. [let it = e; print it]
}}}
Statements:
{{{
-- The plans are:
-- [stmt; print v] if one binder and not v::()
-- [stmt] otherwise
}}}
Replace `print` by `putStrLn . uShow`, with a suitable `uShow`. That
shouldn't break anyone's code.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11529#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list