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

Ertugrul Soeylemez es at ertes.de
Sun Aug 1 23:57:49 EDT 2010

Thomas Davie <tom.davie at gmail.com> wrote:

> On 1 Aug 2010, at 11:43, Ertugrul Soeylemez wrote:
> > Ivan Lazar Miljenovic <ivan.miljenovic at gmail.com> wrote:
> >
> >> No, a pure function is one without any side effects.
> >
> > There are no functions with side effects in Haskell, unless you use
> > hacks like unsafePerformIO.  Every Haskell function is perfectly
> > referentially transparent, i.e. pure.
> This is why we badly need a new term, say, io-pure.  That means,
> neither has side effects, nor produces an action that when run by the
> runtime has side effects.

Why?  We have terms like 'IO computation' or 'monadic value', and that
should hit the nail on the head.  People should learn what type of
computations the IO monad models, and generally they learn that quite

I have the impression that to talk about something being impure in
Haskell confuses people more than anything else.


nightmare = unsafePerformIO (getWrongWife >>= sex)

More information about the Haskell-Cafe mailing list