Revamping the numeric classes
08 Feb 2001 08:48:54 +0100
Dylan Thurston <firstname.lastname@example.org> writes:
> On Wed, Feb 07, 2001 at 01:57:41PM -0500, Dylan Thurston wrote:
> > ... One point that has not been made: given a class
> > setup like
> > <deleted>
> > then naive users can continue to use (Num a) in contexts, and the same
> > programs will continue to work.
> I take that back. Instance declarations would change, so this isn't
> a very conservative change.
Would it be a terribly grave change to the language to allow leaf
class instance declarations to include the necessary definitions for
dependent classes? E.g.
class foo a where
f :: ...
class (foo a) => bar a where
b :: ...
instance bar T where
f = ...
b = ...
If I haven't seen further, it is by standing in the footprints of giants