Tim Docker wrote:
levi.stephen wrote:
My concern (which may be inexperience ;) ) is with the monads here
though. What if I hadn't seen that the IO monad (or any other Monad)
was going to be necessary in the type signatures?


You'd have some refactoring to do :-) But actually, it's not possible
to create an interface that works this way without using some monad,
as the interface relies on side-effects. A pure interface would have
to look something like:


I agree in this case the monad use is clear. Practically it might a case of if a monad is needed, it's either obvious, or its introduction indicates a refactor being a good thing and will lead to a better design.

Levi


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

Reply via email to