[Haskell] Re: Global Variables and IO initializers

Krasimir Angelov 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
> to
> >> execute regular IO actions. Even that (ST s a)
> allows
> >> actions like readRef and writeRef. This allows to
> >> initialise local references but doesn't allow to
> >> access other toplevel reverences since they are
> bound
> >> 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
> provided
> with monad-transformers.
> 
>     Keean.
> 
> 

IO is already layered on top of ST and the stToIO is
the lifting function. What does 'automatically be
lifted' mean?

  Krasimir



		
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 



More information about the Haskell mailing list