[GHC] #7146: Literal strings printed wrong

GHC cvs-ghc at haskell.org
Tue Aug 14 15:31:42 CEST 2012


#7146: Literal strings printed wrong
---------------------------------+------------------------------------------
    Reporter:  simonpj           |       Owner:                  
        Type:  bug               |      Status:  new             
    Priority:  normal            |   Milestone:                  
   Component:  Compiler          |     Version:  7.4.2           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------
 Chris Dove writes: Is it me or is this output not right? The `\` string-
 break syntax doesn't indicate a newline.
 {{{
 chris at 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" ::
               ()
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7146>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list