[Template-haskell] Pattern reification in Template Haskell
sseefried at cse.unsw.edu.au
Tue Oct 19 21:02:04 EDT 2004
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.
More information about the template-haskell