#5375: Regression in newName
---------------------------------+------------------------------------------
    Reporter:  reinerp           |        Owner:                           
        Type:  bug               |       Status:  new                      
    Priority:  highest           |    Milestone:  7.2.1                    
   Component:  Template Haskell  |      Version:  7.3                      
    Keywords:                    |     Testcase:                           
   Blockedby:                    |   Difficulty:                           
          Os:  Unknown/Multiple  |     Blocking:                           
Architecture:  Unknown/Multiple  |      Failure:  GHC rejects valid program
---------------------------------+------------------------------------------

Comment(by simonpj):

 Yes, of ''course'' the quasiquoter needs to understand the scoping rules
 of the language it is parsing. In some weird language it might be that in
 `(x, let x=3 in x)` the first x is bound by the `let x=3`.  It depends on
 the language!

 Now, if you want to embed chunks of Haskell, you need a Haskell parser.
 I'm not sure what Kathleen uses, maybe haskell-src-exts or something.
 Then you need to convert that parser's output to TH syntax, and when you
 do that then, yes, you need to take care with scopes. That is how you
 express the semantics of the quasiquoted language, which just happens to
 be Haskell in this case.

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