Fergus Henderson, replaying to me:
> > I haven't looked at this in great detail, so forgive me if I'm talking
> > through my hat, as seems quite likely: is it workable to require only
> > that contexts be non-increasing in size, and that there be no manifest
> > circularity where the sizes are non-decreasing?  That is, rule out having
> > both instance Monad m => Functor m and instance Functor m => Monad m.
> > Or is that not sufficient to ensure termination of CR?

> There will still be problems with things like
> 
>       instance Foo [m] => Foo m

This would be ruled out as the size of the context is greater than the
size of the instance head.


> > The rationale normally given for it by its advocates
> > (boo, hiss) seems invariably the "no re-evaluation of CAFs" mantra.

> Could you elaborate about how the "no re-evaluation of CAFs" mantra
> justifies the monomorphism restriction?

It doesn't. ;-)  The Official Haskell Committee line on this, which
I don't find at all convincing, is on John Hughes's web site.  See for
example:

http://www.cs.chalmers.se/~rjmh/Haskell/Messages/Display.cgi?id=130

Slainte,
Alex.


Reply via email to