[Template-haskell] Internal type consistency of quoted expressions
simonpj at microsoft.com
Tue Aug 1 12:52:29 EDT 2006
Some quick replies
|  I am sane, right? I mean, is there any other reason for the
| internal type-consistency check other than to detect /potential/
| errors /earlier/?
Quite correct. But detecting errors earlier, perhaps much, much
earlier, is a Good Thing, right?
| I actually proposed something similar way back:
| for specifying rewrite rules which weren't all type correct in
| themselves, but the total effect of fully applying them all was type
| safe. I didn't push it much as it wasn't that important to me and
| else seemed interested (plus it felt a bit hackish).
Your proposal seems entirely reasonable to me. By not typechecking the
quotation at all, it pushes towards the extreme of more flexibility but
later error reporting. (MetaML is at the other extreme.) And if that
is what you want, it seems like a reasonable thing to me.
If you want to commit a patch that does it, go ahead. Please document
the change in the manual; and perhaps add a section on the TH wiki page
to explain what it's good for.
I don't hear a lot about TH these days, but occasionally I hear people
saying "I used TH to do X or Y". So I think that is good news; it works
well enough to be useful. But I'm sure it could be better in many ways.
More information about the template-haskell