[GHC] #9681: Printing of "\n" in error messages is broken
GHC
ghc-devs at haskell.org
Sun Oct 12 00:48:36 UTC 2014
#9681: Printing of "\n" in error messages is broken
-------------------------------------+-------------------------------------
Reporter: oerjan | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
Keywords: | Operating System:
Architecture: Unknown/Multiple | Unknown/Multiple
Difficulty: Unknown | Type of failure:
Blocked By: | None/Unknown
Related Tickets: | Test Case: 1+"\n"
| Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
The code excerpts in error messages from GHC 7.8.3 are misformatted when
the original code contains the string "\n" - the \n escape is simply lost.
Example with GHCi:
{{{
Prelude> 1+"\n"
<interactive>:2:2:
No instance for (Num [Char]) arising from a use of `+'
In the expression: 1 + ""
In an equation for `it': it = 1 + ""
}}}
The printing of the string "\n " is also strangely formatted, although
technically equivalent:
{{{
Prelude> 1+"\n "
<interactive>:3:2:
No instance for (Num [Char]) arising from a use of `+'
In the expression:
1
+ "\n\
\ "
In an equation for `it':
it
= 1
+ "\n\
\ "
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9681>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list