Literal strings printed wrong
Chris Dove writes: Is it me or is this output not right? The \
string-break syntax doesn't indicate a newline.
chris@midnight:~$ ghci
GHCi, version 7.4.2: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> "abc\n123" :: ()
<interactive>:2:1:
Couldn't match expected type `()' with actual type `[Char]'
In the expression:
"abc\
\123" ::
()
In an equation for `it':
it
= "abc\
\123" ::
()
Trac metadata
Trac field | Value |
---|---|
Version | 7.4.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |