#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 reinerp):

 So how do quasiquoters handle shadowing? For instance, what should we do
 when we encounter the following:

 {{{
 f x = [some_quasi| ... (\x -> x)...|]
 }}}

 This should become

 {{{
 f x = ... (\x' -> x') ...
 }}}

 But I don't see how this would work if we used {{{lookupName}}} on all the
 occurrences of {{{x}}} in the quasiquote.

 Put in a different way, what would happen if I wrote this:

 {{{
 f x =
  $(do
      x' <- lookupName "x"
      return $ LamE [VarP x'] (VarE x')
   )
 }}}

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