Pattern reification in Template Haskell
Sean Seefried <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.template |
|---|---|
| Message-ID | <[email protected]> |
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