
30 Dec
2013
30 Dec
'13
1:55 p.m.
On Mon, Dec 30, 2013 at 12:08 PM, Maarten Faddegon
Did I find a bug in ghc's Template Haskell implementation or am I doing something silly?
Hi Maarten, If you look at the definition of Name, you will see several NameFlavours. In your case your `a' has a NameU (unique). I think if you had the type variable names tagged with a NameS (simple?), ghc would accept your code. Somewhat related is a case where ghc accepts NameU as a NameS when no other variables in scope could conflict: x1 = [d| x = 1 |] is short for: x1 = return [ValD (VarP x_1627406778) (NormalB (LitE (IntegerL 1))) []] but when you splice x1, "x" is bound, instead of the unique, difficult-to-reference variable x_1627406778. Regards, Adam Vogt