framework for composing monads?

Malcolm Wallace Malcolm.Wallace@cs.york.ac.uk
Mon, 19 Feb 2001 14:29:47 +0000


Elke Kasimir writes:
> Practically, this raises the question of wether nhc and hbc support hslibs
> or else I can provide a substitute for IORef's for these compilers.

As Manuel reported, nhc98 has IORefs identical to ghc and Hugs, except
in module IOExtras.

For hbc, you have an equivalent interface in:

    module IOMutVar where
    data MutableVar a
    newVar   :: a -> IO (MutableVar a)
    readVar  :: MutableVar a -> IO a
    writeVar :: MutableVar a -> a -> IO a
    sameVar  :: MutableVar a -> MutableVar a -> Bool

Regards,
    Malcolm