[Haskell] Re: Global Variables and IO initializers

Adrian Hey ahey at iee.org
Mon Nov 8 13:27:37 EST 2004


On Monday 08 Nov 2004 10:52 am, Keean Schupke wrote:
> Krasimir Angelov 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.
>
> The proposal for merging ST and IO for refernce creation
> seems sound. I would like to point out that this does not
> address Adrian's problem as his example was that of
> initialising hardware which would require real IO
> actions.

Not hardware specifically, but this is beside the point.

I would like to point out that the only "IO" operation required
by oneShot is the creation of an MVar, something that is perfectly
OK with the proposed SafeIO/CIO restricted monad solutions (not
sure about this one though).

Regards
--
Adrian Hey



More information about the Haskell mailing list