
21 Feb
2006
21 Feb
'06
6:30 p.m.
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 class Ord a <= Ix a instance Integral a => Eq (Ratio a) foo :: (Monad m) => [m a] -> m [a]