[Haskell-cafe] Help mixing pure and IO code

Eric Dedieu papa.eric at free.fr
Mon Nov 30 16:56:53 EST 2009

> There's a nice approach to this problem which is described
> and implemented in the MonadPrompt package[1].

Thanks a lot for this link. The "guessing game" example linked to from
the documentation is still very hard to understand (I'm still struggling
with monads), but it seems to fill my needs.

Still more importantly to me, I understand that anyhow  if I intend to
use IO or random numbers, I must design my strategy from the beginning
as "encapsulated in a monad". Something like:

class (Monad m) => Strategy m a where ...


More information about the Haskell-Cafe mailing list