[Haskell-cafe] Can we come out of a monad?

wren ng thornton wren at freegeek.org
Fri Jul 30 23:15:58 EDT 2010


Martijn van Steenbergen wrote:
> In fact, I would argue that a monad which you cannot escape from is not 
> very useful at all. IO is the only exception I know of.

You can escape IO just fine. Just compile your program, and then run it 
in the real life monad. Results aren't guaranteed to be the same across 
all runs, but that's the whole reason for using monads to reason purely 
about side effects.

Eh? You meant while staying within the computer?

-- 
Live well,
~wren


More information about the Haskell-Cafe mailing list