Can't make sense of newArray# docs
Roman Leshchinskiy
rl at cse.unsw.edu.au
Wed Jan 19 00:25:38 CET 2011
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
More information about the Glasgow-haskell-users
mailing list