Tomasz Zielonka wrote:
My mistake was that I forgot about db and wrote:

    concatStmts s1 s2 = s1 >> s2

And it was accepted because I had the Monad instance for ((->) r) in
scope (from Control.Monad.Trans I guess)!

The danger in overloading is that you are relying on the compiler to infer which instance you mean. This is perhaps most visible with Monad which has so many common instances ([], (r ->), Maybe, etc).

When writing monadic expressions in large projects, I recommend annotating them with the types you really want.

Jules

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

Reply via email to