change to deriving in 6.7 ??

Isaac Dupree isaacdupree at charter.net
Mon Aug 20 19:24:56 EDT 2007


Simon Peyton-Jones wrote:
> So the deriving mechanism works in straightforward cases, and for
 > more complicated cases you have to write the instances yourself.

Since the standalone deriving requires one to write the instance context 
explicitly (I believe that was the final decision...) perhaps that can 
be allowed to be used for these instances, instead of writing them by 
hand.  Of course then it would be relying on a feature only in GHC 6.8....

Also I wonder, it might be nice to allow those contexts in attached 
deriving as well. something like
data F a = F a deriving ( (Eq c) => Eq (F c) , Ord d => Ord (F d), Enum)

which is of course more useful for more complicated, especially 
multiparameter classes and newtypes.

Isaac



More information about the Cvs-ghc mailing list