> In the GHC users guide Chapter 7.2.12 is the single primitve value
> realWorld# of the state of the world provided.
> This value is also used in the implementation of unsafePerformIO
> (GHC.IOBase), where it is applied as the argument
> to the IO action, and so on (after performing the action it's 
> discarded).
> 
> My question is now: Is the same value (realWorld#) applied while using
> normal monadic - not unsafe - IO, more precisely
> is a programm main::IO () executing the expression (main realWorld#)?

In effect, yes.  However, the implementation optimises away the actual
values of type State#, so that no actual argument passing goes on most
of the time.

Cheers,
        Simon
_______________________________________________
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to