[Haskell-cafe] FP design

Levi Stephen levi.stephen at optusnet.com.au
Wed Nov 7 22:21:05 EST 2007

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.


More information about the Haskell-Cafe mailing list