#3742: redundant space in FFI imports rejected by 6.12
----------------------------------+-----------------------------------------
    Reporter:  duncan             |        Owner:                           
        Type:  bug                |       Status:  new                      
    Priority:  normal             |    Milestone:                           
   Component:  Compiler (Parser)  |      Version:  6.12.1 RC1               
    Keywords:                     |   Difficulty:                           
          Os:  Unknown/Multiple   |     Testcase:                           
Architecture:  Unknown/Multiple   |      Failure:  GHC rejects valid program
----------------------------------+-----------------------------------------
 GHC 6.10 and older accepted this code:
 {{{
 foreign import ccall unsafe " g_get_application_name"
   g_get_application_name :: (IO (Ptr CChar))
 }}}

 GHC 6.12 now rejects it with
 {{{
 glib/System/Glib/Utils.chs:81:28: Malformed entity string
 }}}

 The problem is the leading space in the C entity string. This code is
 generated by c2hs which is doing `header ++ " " ++ ident` however the
 header may be empty.

 We should probably allow this code, though possibly with a warning. In
 parallel, c2hs could be fixed so it doesn't do that.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3742>
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

Reply via email to