[Haskell-cafe] Monads

Tillmann Rendel rendel at informatik.uni-marburg.de
Sun Sep 30 13:00:26 CEST 2012

Vasili I. Galchin wrote:
> I would an examples of monads that are pure, i.e. no side-effects.

One view of programming in monadic style is: You call return and >>= all 
the time. (Either you call it directly, or do notation calls it for 
you). So if you want to understand whether a monad "has side-effects", 
you should look at the implementation of return and >>=. If the 
implementation of return and >>= is written in pure Haskell (without 
unsafePerformIO or calling C code etc.), the monad is pure.


More information about the Haskell-Cafe mailing list