13 Jan
2014
13 Jan
'14
9:11 a.m.
On 2014-01-13, at 15:06 , musicdenotation@gmail.com wrote:
No, an I/O monad is a workaround for free side effects. What I want is a canonical, obvious, natural solution to a problem, not a workaround.
Monads are not workarounds for anything (anymore than option types are a workaround for a lack of null), they're a type-safe encoding of a sequential computation, the IO monad being the application of the concept to the IO subset of side-effecting computations. Monads are not restricted to side-effecting computations (let alone IO ones), in Haskell option types and lists are also monadic types.