The worst piece of syntax in Haskell
sebastian.sylvan at gmail.com
Tue Feb 21 18:37:53 EST 2006
On 2/22/06, Ashley Yakeley <ashley at semantic.org> wrote:
> Josef Svenningsson wrote:
> > This is one of the things that the Clean people got right. In Clean, my
> > examples from above would look like:
> > > class MonadPlus m | Monad m where ...
> > >
> > > class Ix a | Ord a where ..
> > >
> > > instance Eq (Ratio a) | Integral a where ...
> Not quite the same complaint, but I've always been bothered by the
> inconsistent use of "=>". I would prefer "A => B" to mean "if A, then
> B". Accordingly:
> class Monad m <= MonadPlus m
By your definition, couldn't what we have now (class Monad m =>
MonadPlus m) be read as "If m is in the Monad class, then the class
MonadPlus can be defined for m thusly:...", which seems pretty clear
More information about the Haskell-prime