On 23 Nov 2004, at 11:53, George Russell wrote:
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.
But it isn't a value, is it? Since it fails referential transparency. 'unsafePerformIO' is not, in the ordinary sense a 'library routine', since library routines might ordinarily be expected to preserve haskell semantics and program equivalence etc etc. It is a genuine extension to the language (and genuinely breaks the language's semantics unless you meet the proof obligation, which is not checkable by the compiler). Jules