>> which would't hurt if GHC would infer m beeing a monad automatically?
>
> it is more explicit. for example, this simplifies understanding of
> error messages generated by compiler. and, if you change 'class'
> declaration, this will not silently change meaning of 'instance' declaration
>

Hello Bulat,

do you mean that the fact that one must keep class and instance declaration in 
agreement manually is an advantage and not just a limitation of the Haskell 
type system? Why then not just require that all constraints be declared 
explicitly. The following code compiles: is it a bad thing that it does?

class (Eq a) => Eql a where
    (=:=) :: a -> a -> Bool
    x =:= y = x == y

eql :: Eql a => a -> a -> Bool
eql x y = x == y


David
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to