deriving...

Martin Sjögren msjogren at gmail.com
Wed Oct 20 02:17:28 EDT 2004


On Tue, 19 Oct 2004 15:56:01 +0100 (BST), MR K P SCHUPKE
<k.schupke at imperial.ac.uk> wrote:
> > * I'm not at all keen on making '..deriving( Foo )' mean
> >   $(derive 'Foo) or something like that.  Just make the TH
> >   call yourself!
> 
> The current situation is that the code that generates the derived
> instances is hard coded into the compiler (TcDeriv.hs) is it not
> better to allow the derived instances to be specified in Haskell
> - using template-haskell seems to be the easiest (least new
> features/least effort/max results) method of doing this. What
> I am suggesting is that the current derivations for Typeable
> (etc) are replaced by more readable template-haskell code, that
> can be user extended... Surely it is better to have the deriving
> method exposed rather than hidden away in the compiler.

But surely this is orthogonal to the discussion at hand? I wouldn't
mind being able to make my own classes derivable by writing a chunk of
TH, but that's not really related to "remote deriving" but a wishlist
item of its own.


/Martin


More information about the Glasgow-haskell-users mailing list