The worst piece of syntax in Haskell
Wolfgang Jeltsch
wolfgang at jeltsch.net
Wed Feb 22 11:35:58 EST 2006
Am Mittwoch, 22. Februar 2006 01:25 schrieb Claus Reinke:
> > class Monad m
> > => MonadPlus m
> > where ...
> >
> > class Ord a
> > => Ix a
> > where ...
> >
> > instance Integral a
> > => Eq (Ratio a)
> > where ...
>
> still difficult?-) works just as well when the constraint lists get longer.
>
> claus
I do something similar now (use a monospace font):
class Monad m =>
MonadPlus m where
[...]
Using a line break has also the advantage that changes before the => cannot
introduce the necessity for a linebreak in the part after the =>. So the
formatting of the part after the => is not affected. This is especially
useful if you want to use darcs replace.
Best wishes,
Wolfgang
More information about the Haskell-prime
mailing list