[Haskell] Re: IORef sharing

Stefan Monnier monnier at iro.umontreal.ca
Mon Oct 27 21:44:56 EDT 2008

>> iio :: IO (IORef Int)
>> iio = newIORef 0

I sometimes feel like "IO" should be renamed to
"CommandSequenceReturning".  So the above would read:

  iio :: CommandSequenceReturning (IORef Int)
  iio = newIORef 0

I.e. iio is not an IORef Int but only a (trivial) sequence of commands
that will end up returning an object of (IORef Int) when it'll
be executed.


More information about the Haskell mailing list