unboxed arrays for nhc/jhc

John Meacham john at repetae.net
Tue Mar 7 21:55:26 EST 2006


On Tue, Mar 07, 2006 at 01:15:22PM +0300, Bulat Ziganshin 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.*
> 
> if nhc don't supports ST/unsafeIOtoST, then i plan to use the
> following ST monad emulation:
> 
> type ST a = IO a
> unsafeIOtoST = id
> runST = unsafePerformIO
> 
> also i plan to use this emulation layer for JHC. is this can work?

jhc now supports rank-n polymorphism natively, so there is no need for
emulation. the ST monad can be implemented just like it is in GHC.

so, I can do 1 and 2, but no Data.Array yet as MPTC's arn't supported
yet, (but a concrete interface would do just fine for now)

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the Libraries mailing list