Mutually recursive modules and derived instances of Data
carsten at codimi.de
Wed Oct 13 09:30:38 EDT 2004
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
is equivalent to
$( deriveMyClass (reifyDecl TA) )
(or whatever the TH-syntax will be at that point :-) Then
data TA = ...
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.
Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
PGP/GPG key on the pgp.net key servers,
fingerprint on my home page.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/glasgow-haskell-users/attachments/20041013/c3925550/attachment-0001.bin
More information about the Glasgow-haskell-users