
30 Dec
2009
30 Dec
'09
10:44 a.m.
On 24/12/09 23:18, Antoine Latter wrote:
Folks,
I found some of the documentation in GHC.Prim confusing - so I thought I'd share. The documentation for the ByteArray# type[1] explains that's it's a raw region in memory that also remembers it's size.
Consequently I expected sizeOfByteArray# to return the same number that I passed in to newByteArray#. But it doesn't - It returned however much it decided to allocate, which on my platform is always a multiple of four bytes.
This is something which could be clarified in the documentation.
Thanks, I'll fix the docs. Cheers, Simon