[Template-haskell] Pattern reification in Template Haskell

Shae Matijs Erisson shae at ScannedInAvian.com
Wed Oct 20 21:11:15 EDT 2004


"Simon Peyton-Jones" <simonpj at microsoft.com> writes:

> I do have a bunch of things on my TH to-do list.  Pattern splices aren't
> at the top of it, in fact, but name-splicing -- the ability to splice a
> name in a binding position -- would be very useful.   But there was so
> little reaction to my last few messages to this list that TH has slipped
> down my priority list.  (Currently I'm busy with GADTs.)  I'm not sure
> whether the quietness of the TH list is because (a) TH works so well
> that there's no need to say anything or (b) no one is using it.  

I had a crazy idea to emulate hs-plugins' dynamic loading in a completely
type-safe way by running an entire application in the TH compile loop.

Well, maybe it can still generate code that fails type-checking, but at least
you get to carry the type-checker around with you, and you don't have to worry
about separate type tables from static and dynamic linking.

But I could never figure out a good way to turn a source module into a
template haskell structure...

Also, some other people suggested that it might run very slowly.
-- 
Shae Matijs Erisson - Programmer - http://www.ScannedInAvian.org/
"I will, as we say in rock 'n' roll, run until the wheels come off, 
because I love what I do." -- David Crosby



More information about the template-haskell mailing list