On 18/01/2011, at 22:18, Johan Tibell wrote:

> The docs for newArray# states:
> 
> "Create a new mutable array of specified size (in bytes), in the
> specified state thread, with each element containing the specified
> initial value."

The docs are wrong.

> I'm trying to implement
> the following array type:
> 
>    data MurableArray s a = Array { unArray :: !(MutableArray# s a) }

Have a look at the implementation of 
http://hackage.haskell.org/packages/archive/primitive/0.3.1/doc/html/Data-Primitive-Array.html

Roman



_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to