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

 I think that's the wrong approach.  It places a global burden on every
 binding enclosing the occurrence of "x".

 But the problem is not with those bindings; rather, it's with the
 ''occurrence'' of x.  The quasiquoter should not use `mkName` to generate
 a string-name for `x` -- as you yourself pointed out in #4429.  Rather it
 should use the proper `Name` of `x`!  Just like `'x` in Haskell code

 So how can a quasiquoter get hold of the `Name` for x? That's a whole
 separate question, which we have open in #4429.  If we had the
 `lookupValue` described there, the quasiquoter could use it to look x up.

 Now, I grant that #4429 is languishing unloved, but I think that's the
 right fix because it adds a simple-to-understand facility that may be
 independently useful, rather than making a regrettably-complex situation
 more complex still.

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