deriving...

Shae Matijs Erisson shae at ScannedInAvian.com
Sat Oct 16 11:05:06 EDT 2004


Keean Schupke <k.schupke at imperial.ac.uk> writes:

> Yes, I could quite easily write the generator in TemplateHaskell (have played with it before)
> _but_ I don't like the $(xxx) syntax... Perhaps if Simon could be persuaded to allow deriving
> clauses to be defined in TH?
>
> data X x = X x
> $(deriveMyClass (reify X))
>
> could perhaps be defined from
>
> data X x = X x deriving MyClass
>
>
> I saw the same suggestion earlier today on the Haskell list...

Check out Ulf Norell's IOHCC submission, his DeriveData.hs module does this,
though I can't tell if it will work for parameterized types.
-- 
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 Glasgow-haskell-users mailing list