>  Haskell position (as I understand it)
>  -------------------------------------
>  Haskell is incapable of desribing IO, it can only evaluate an expression
>  of type IO (). This expression is used by an 'IO monad machine' (which
>  is not part of Haskell) to actually execute IO operations. Because the
>  IO monad machine is not part of Haskell, it can freely make use of all
>  the horrors one would expect in a typical imperative language without
>  damaging pure functionality in Haskell itself.

In Haskell you ONLY define a VALUE of an abstract type IO that DESCRIBES
the changes the World would suffer WHEN that value is operationally
interpreted. So, saying that Haskell is incapable of describing I/O is,
at least, a misunderstanding.
That abstract type can be viewed as a state monad whose state is the
World, i.e.
   IO a = (World -> (a, World))
and so you can also describe functions going from one state of the world
to another (producing a value as result), but only in abstract ways.
The 'monad machine', as you call it, is the one responsible for the
operational execution of IO values.

I don't know how does Clean work with I/O, and I can not conlude
anything from your explanation, nor I can see how they colud manage to
avoid the 'horrors' of imperative languages you attach to Haskell. I
would appreciate more insight in this subject.

Fidel.

Reply via email to