Peter Verswyvelen writes, about non-monadic IO, after the posting of
Brandon S. Allbery, who reacted to my claim that IO Monad is unavoidable:
> Not really true; it's just much more painful. You just e.g.
> explicitly do what the ghc library's implementation of IO does:
> construct a chain of functions with an opaque (and optionally(?)
> existential to enforce the opacity) "RealWorld" type which is passed
> as state from one invocation to the next, with the "top level"
> application partially applied.
P.V.:
> Yes indeed, Concurrent Clean actually just passes around the "world" object
> in "direct/explicit style" but uses uniquness typing to make sure nothing
> happens that would violate the nice FP paradigm (mainly referential
> transparency?). That is, I think it's like that :)
Well, I think I am one of not-so-numerous people on this list who use Clean.
(After all, it is the competitor... We might forget about the buzzword
"Concurrent"...) So, I know about unique *World, *FileSystem, *File, etc.,
I have used it for graphics and for generation of sound.
But I didn't find a way to use *really* this awful "State# RealWorld" in
Haskell! Somebody can show me some working examples?
Jerzy Karczmarczuk