[Haskell] Re: Global Variables and IO initializers
k.schupke at imperial.ac.uk
Sat Nov 6 08:40:47 EST 2004
David Sabel wrote:
> The main reason is: Nobody asks for it.
Actually I think Simon Marlow has talked in the past about wanting
to make GHC only do safe optimisations on unsafePerformIO.
> I conjecture, a problem is:
> if you use FUNDIO as a semantics for Haskell, you have to give up
> referential transparency in the strong sense. FUNDIO-programs are
> only referential transparent with respect to the defined contextual
Surely all programs are only referentialy transparent with regards to
the defined contextual equivalence? (just there is only one notion of
equivalence used so far)... What would the problem be with intoducing
other notions of equivalence to cope with things like unique naming...
After all you would only change the definition of equality for
unsafePerformIO and not for any other function.
More information about the Haskell