Pattern reification in Template Haskell
20 Oct
2004
20 Oct
'04
11:02 a.m.
Hi all, Just a quick question about pattern reification. In Tim Sheard and Simon Peyton Jones' notes on Template Haskell paper we are told that the following declaration would be valid: p1 = [p| (x,y) |] And that this is literally equivalent to: return (Ptuple [Pvar (mkBndr "x"), Pvar (mkBndr "y")]) But when I try it I get told that x and y are not in scope. But isn't that precisely the point? I'm introducing new scope. I realise there is still some development to be done on Template Haskell and I was wondering whether this was just one of the things still on the todo list or whether I was doing something wrong. Cheers, Sean
7874
Age (days ago)
7874
Last active (days ago)
0 comments
1 participants
participants (1)
-
Sean Seefried