Jeff M.
unread,Sep 17, 2011, 11:44:07 AM9/17/11You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I'm trying to do something specific w/ TemplateHaskell and am unsure how. Hoping someone here can just give me a simple example. I want to pass a type constructor to a template to be used in a pattern match.
$(templateFunc Foo)
templateFunc type =
do x <- newName "x"
[| case something of
($type x) -> ...
|]
I'll readily admit I don't know how to properly unquote "type" here as I'm just learning TH, but hopefully this little example gets the idea across.
Thanks for any help,
Jeff M.