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

Ivan Miljenovic ivan.miljenovic at gmail.com
Mon Aug 2 00:10:05 EDT 2010


On 1 August 2010 20:43, Ertugrul Soeylemez <es at ertes.de> 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.

At code-writing time, yes; at run-time there are side effects...

In terms of what a function does, is readFile actually pure?

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com


More information about the Haskell-Cafe mailing list