Hi Simon! On Wed, Oct 13, 2004 at 01:21:26PM +0100, Simon Peyton-Jones wrote: > Two fixes suggest themselves > > 1. Separate 'deriving' from the data type decl, so you can say > derive( Data TA, Typeable TA ) > anywhere. People sometimes ask for this for other reasons.
Good thing. Plus, allow to hook in Template Haskell at some point, so
that
import DeriveMyClass
derive(MyClass TA)
is equivalent to
import DeriveMyClass
$( deriveMyClass (reifyDecl TA) )
(or whatever the TH-syntax will be at that point :-) Then
data TA = ...
deriving (MyClass)
should also be possible. The advantage would be that only the module
defining the deriving would have to know about TH, not the one using
it. On other systems, the deriving could then be realized via a
pre-processor or similar means.
Greetings,
Carsten
--
Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
http://carsten.codimi.de/
PGP/GPG key on the pgp.net key servers,
fingerprint on my home page.
pgpqfms1mBHHr.pgp
Description: PGP signature
_______________________________________________ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
