[Haskell-cafe] On the purity of Haskell

Ketil Malde ketil at malde.org
Sun Jan 1 21:26:08 CET 2012

Chris Smith <cdsmith at gmail.com> writes:

>> I wonder: can writing to memory be called a “computational effect”? If  
>> yes, then every computation is impure.

I wonder if not the important bit is that pure computations are unaffected by
other computations (and not whether they can affect other computations).
Many pure computations have side effects (increases temperature,
modifies hardware registers and memory, etc), but their effect can only
be observed in IO. 

(E.g. Debug.Trace.trace provides a non-IO interface by use of
unsafePerformIO which is often considered cheating, but in
this view it really is pure.)

If I haven't seen further, it is by standing in the footprints of giants

More information about the Haskell-Cafe mailing list