unboxed arrays for nhc/jhc

Bulat Ziganshin bulat.ziganshin at gmail.com
Thu Mar 9 05:25:11 EST 2006


Hello Bulat,

Wednesday, March 8, 2006, 12:18:33 PM, you wrote:

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

BZ> about boxed Arrays - i still recommend you to duplicate interface used
BZ> in existing compilers, it's very-very close in ghc and nhc while hugs
BZ> primitives are more higher-level. just implement interface like this
BZ> one:

......

just to demonstrate how it will work, i included here implementation
of unboxed arrays. as you can see, it just based on several *Unboxed
operations plus freeze/thaw. for boxed arrays, all will be the same -
only another datatypes and operation names

BZ> all other higher-level machinery can be made compiler-independent

as you can see, it's FULL implementation of Array classes just with
~100 lines of code


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Unboxed.hs
Type: application/octet-stream
Size: 4078 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/libraries/attachments/20060309/9034c030/Unboxed.obj


More information about the Libraries mailing list