[Haskell] Re: Global Variables and IO initializers

Tomasz Zielonka tomasz.zielonka at gmail.com
Fri Nov 5 14:10:42 EST 2004


On Fri, Nov 05, 2004 at 07:03:06PM +0000, MR K P SCHUPKE wrote:
> >You don't want stdin/stdout/stderr?
> 
> Also these are only available in the IO monad...

No, they are available "outside" the IO monad, only you can't do
anything useful with them. Well, you can show them!

> >without breaking referential transparency
> >by use of unsafePerformIO hack.
> 
> I don't understand this still... how can it not break referntial transparancy.
> For example consider if stdin were available outside the IO monad.

If you could do interesting things with Handles "outside" the IO monad,
we would be doomed anyway.

Best regards,
Tomasz

-- 
.signature: Too many levels of symbolic links


More information about the Haskell mailing list