[GHC] #2596: Token concatentation (##) in C preprocessor

GHC trac at galois.com
Mon Sep 15 15:08:52 EDT 2008


#2596: Token concatentation (##) in C preprocessor
--------------------------------+-------------------------------------------
    Reporter:  sedillard        |       Owner:          
        Type:  feature request  |      Status:  new     
    Priority:  normal           |   Component:  Compiler
     Version:  6.8.3            |    Severity:  normal  
    Keywords:                   |    Testcase:          
Architecture:  Unknown          |          Os:  Unknown 
--------------------------------+-------------------------------------------
 {{{
 #define MY_MACRO(A,B) \
 instance MyClass A##B where ...

 MY_MACRO(Foo,Bar)
 }}}

 Should expand to

 {{{
 instance MyClass FooBar where ...
 }}}

 This behavior is defined in the C standard, and is quite handy. Presently
 GHC leaves the '##' in the expanded text.

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


More information about the Glasgow-haskell-bugs mailing list