unsafePerformIO and unsafeInterleaveIO

malcolm-ffi at cs.york.ac.uk malcolm-ffi at cs.york.ac.uk
Thu Mar 22 15:13:36 EST 2001


> I thought nhc provided a reasonable subset of the Hugs-GHC libraries
> and, since the IO extensions are one of the first extensions people
> ask for, I assumed that if they provided anything they would certainly
> provide them.

Yes, nhc98 provides most of the popular IO extension functions,
including unsafePerformIO.

> So does nhc provide them but under a different name or through a
> different module?

nhc98 has the module IOExtras instead of IOExts.  Also hbc for instance
has similar facilities in modules called UnsafePerformIO, UnsafeDirty,
IOMutVar, and NonStdTrace, and what's more, I think they may well
all pre-date the Ghc implementations.  I chose the name IOExtras for
nhc98 as a partial concession toward the Ghc library IOExts, but I'm
afraid I just couldn't bring myself to go the whole way and use the
fully-cryptic name.  :-)

I would also want to echo Simon's comment that the new hierarchical
namespace and library proposal should go a long way to making the
library situation better in the very near future.  We are currently
discussing a general layout and re-naming of the existing modules from
hslibs.  If Hugs users and developers don't join in the discussion,
then we could be wasting our effort.  We really want to develop
a de-facto cross-compiler standard, not just a one-compiler or
two-compiler standard.

> Could nhc not just add them to IOExts in their next distribution?

I will continue to resist horrible names.  In any case, IOExts will
soon be split up and renamed into separate libraries something like

    System.IO
    Data.IORef
    Structure.Array.IO

The exact scheme is still wide open for discussion.

Regards,
    Malcolm




More information about the FFI mailing list