[Haskell] PROPOSAL: class aliases

Benjamin Franksen benjamin.franksen at bessy.de
Thu Oct 13 07:52:59 EDT 2005


On Thursday 13 October 2005 13:21, Simon Peyton-Jones wrote:
> If so, than rather than invent a whole new mechanism, why not simply
> extend the existing superclass mechanism to allow a single instance
> decl to declare instances for several classes?  For example, one add
> to Haskell 98 the following:
> 	an instance declaration for a class CD with superclasses C and D
> may
> 	give the instances for its superclasses C and D
>
> [One could quibble about details.  E.g Should the class decl for CD
> *say* whether the instance decl *must* contain decls for the
> superclass methods?  Or can one vary it on a instance-by-instance
> basis, which might be more flexible?]

I just want to mention Robert Will's proposal for "delayed method 
definitions"; see http://www.stud.tu-ilmenau.de/~robertw/dessy/fun/ 
sections 4.3.1 and 4.3.2, which is quite similar to yours.

Cheers,
Ben


More information about the Haskell mailing list