darcs patch: Fix documentation bug: newArray# accepts word count, n...
marlowsd at gmail.com
Wed Jan 19 11:48:01 CET 2011
On 18/01/2011 22:22, Edward Z. Yang wrote:
> Johan Tibell and I discovered what we're pretty sure is a bug in
> the newArray# docs, in that it claims that it accepts a byte count,
> not a word count. This appears to be falsified by GHC.Prim
> as well as the actual implementation in C--:
> unsafeArray b ies = unsafeArray' b (rangeSize b) ies
> unsafeArray' (l,u) n@(I# n#) ies = runST (ST $ \s1# ->
> case newArray# n# arrEleBottom s1# of
> W_ words, n, init, arr, p, size;
> /* Args: R1 = words, R2 = initialisation value */
> 1 patch for repository http://darcs.haskell.org/ghc:
> Tue Jan 18 22:18:34 GMT 2011 Edward Z. Yang<ezyang at mit.edu>
> * Fix documentation bug: newArray# accepts word count, not byte count.
Thanks, I'll push.
More information about the Cvs-ghc