#5427: '#' becomes an illegal first-character of a QuasiQuote line when CPP is
enabled
---------------------------------+------------------------------------------
    Reporter:  GregWeber         |       Owner:                  
        Type:  bug               |      Status:  new             
    Priority:  normal            |   Component:  Template Haskell
     Version:  7.2.1             |    Keywords:                  
    Testcase:                    |   Blockedby:                  
          Os:  Unknown/Multiple  |    Blocking:                  
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
---------------------------------+------------------------------------------
 {-# LANGUAGE CPP #-}
 <pre>
 [hamlet|
 #{foo}
 |]
 </pre>

 This will fail to compile. CPP should skip over a quasi-quote, which is
 allowed to have any characters. I think the only use case for CPP inside
 QQ is trying to place a QQ into an external file. In Yesod, we accomplish
 this with Template Haskell.

 Our ideal situation would be for GHC to provide a function loadQQ. This
 would make it simple to not need #include. But my real hope is that loadQQ
 will identify the external file as a dependency and automatically
 recompile that code as needed.

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