
18 Feb
2007
18 Feb
'07
11:19 a.m.
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