unboxed arrays for nhc/jhc

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Wed Mar 8 07:00:21 EST 2006

Bulat Ziganshin <bulat.ziganshin at gmail.com> wrote:

> this implementation is already compatible with Hugs and GHC, now i
> plan to make it NHC-compatible. i have the following question - is NHC
> implements
> 1) strict ST monad
> 2) unsafeIOtoST operation
> 3) Data.Array.*

No, nhc98 implements none of these.

> if nhc don't supports ST/unsafeIOtoST, then i plan to use the
> following ST monad emulation:
> type ST a = IO a

What happened to the other type parameter?

  type ST s a = ...

> unsafeIOtoST = id
> runST = unsafePerformIO
> is this can work?

You will also need to define aliases for ST-bound datatypes like
    type STRef s a = IORef a


More information about the Libraries mailing list