[Haskell] Re: Global Variables and IO initializers

George Russell ger at informatik.uni-bremen.de
Tue Nov 23 06:53:24 EST 2004


I wrote (snipped):
 > 3) It needs no extensions to the Haskell language, and only fairly
 > standard hierarchical libraries like Data.IORef.

Lennart Augustsson wrote (snipped):
 > It uses unsafePerformIO which is very much an extension to Haskell. :)

Ben Rudiak-Gould wrote (snipped):
 > I think by Haskell he means the common language currently implemented by
 > GHC and Hugs.

No.  I mean by the "Haskell language" what is described in
the Haskell 98 Report.   unsafePerformIO is not part of the language,
it is a value defined by one of the standard hierarchical libraries.

However the whole point of my proposal is to hide the ugliness involved
with unsafePerformIO from the user in a safe way, just as standard
modules such as RandomGen do.


More information about the Haskell mailing list