[Haskell] Re: Global Variables and IO initializers
ka2_mail at yahoo.com
Mon Nov 8 06:42:15 EST 2004
--- Keean Schupke <k.schupke at imperial.ac.uk> wrote:
> >> Note that 2-rank type of runSTInit doesn't allow
> >> execute regular IO actions. Even that (ST s a)
> >> actions like readRef and writeRef. This allows to
> >> initialise local references but doesn't allow to
> >> access other toplevel reverences since they are
> >> to RealWorld state.
> Thinking about this a bit more - isnt the real
> problem that the
> IO monad should infact be a monad-transformer
> layered ontop
> of the ST monad. That way ST actions could
> automatically be
> lifted to the IO monad using the normal mechanisms
> with monad-transformers.
IO is already layered on top of ST and the stToIO is
the lifting function. What does 'automatically be
Do you Yahoo!?
Check out the new Yahoo! Front Page.
More information about the Haskell