#3319: Template Haskell generates invalid code for import foreign address
declaration
--------------------+-------------------------------------------------------
Reporter:  awson    |          Owner:                  
    Type:  bug      |         Status:  new             
Priority:  normal   |      Component:  Compiler        
 Version:  6.10.3   |       Severity:  major           
Keywords:           |       Testcase:                  
      Os:  Windows  |   Architecture:  Unknown/Multiple
--------------------+-------------------------------------------------------
 For example, splicing {{{ForeignD (ImportF CCall Unsafe "&" (mkName "foo")
 (AppT (ConT ''Ptr) (ConT ''())))}}} GHC generates code equivalent to
 {{{foreign import ccall unsafe "foo" foo :: Ptr ()}}} but not {{{foreign
 import ccall unsafe "&" foo :: Ptr ()}}}.

 -ddump-splices shows something like {{{foreign import ccall unsafe "static
 & &foo" foo :: Ptr ()}}}. GHC can splice this (and produce bogus code) but
 can not compile this code literally, generating invalid assembler name
 {{{_&foo}}} for {{{foo}}}.

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