Re: GHC.Prim.ByteArray# - confusing documentation

2010-01-01 Thread Antoine Latter
On Wed, Dec 30, 2009 at 5:47 AM, Simon Marlow wrote: > On 30/12/09 11:09, Bulat Ziganshin wrote: >> >> Hello Simon, >> >> Wednesday, December 30, 2009, 1:44:54 PM, you wrote: >> >> btw, is it possible to fix the behavior? it will reduce overhead for >> storing small strings > > It would be possibl

Re: GHC.Prim.ByteArray# - confusing documentation

2009-12-30 Thread Simon Marlow
On 30/12/09 11:09, Bulat Ziganshin wrote: Hello Simon, Wednesday, December 30, 2009, 1:44:54 PM, you wrote: 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 platfo

Re[2]: GHC.Prim.ByteArray# - confusing documentation

2009-12-30 Thread Bulat Ziganshin
Hello Simon, Wednesday, December 30, 2009, 1:44:54 PM, you wrote: >> 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 b

Re: GHC.Prim.ByteArray# - confusing documentation

2009-12-30 Thread Simon Marlow
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 r

Re: GHC.Prim.ByteArray# - confusing documentation

2009-12-26 Thread Antoine Latter
On Sat, Dec 26, 2009 at 12:50 PM, Duncan Coutts wrote: > > It's been on my TODO list for some time to design a portable low level > ByteArray module that could be implemented by hugs, nhc, ghc, etc. The > aim would be to be similar to ForeignPtr + Storable but using native > heap allocated memory

Re: GHC.Prim.ByteArray# - confusing documentation

2009-12-26 Thread Duncan Coutts
On Thu, 2009-12-24 at 18:18 -0500, 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 ex

GHC.Prim.ByteArray# - confusing documentation

2009-12-24 Thread Antoine Latter
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 n