#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):
Quasiquotation, by definition, puts all the control in the hands of the
author of the quasiquoter. All TH can hope to do is to make facilities
available that let them do what they want. `lookupName` is such a
facility. I can't answer your first example without knowing precisely
what the quasiquoter is trying to do.
For your second example, you are doing a Bad Thing. It's precisely the
same Bad Thing as this:
{{{
f x = return (LamE (VarP 'x) (VarE 'x))
}}}
Here the `'x` is the `Name` of the `x` that is f's argument. You should
not put such a `Name` in a binding position. (I forget whether TH will
emit an error message if you do so, but it Jolly Well Should!)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5375#comment:11>
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