Question about ArrayArray#

Michal Terepeta michal.terepeta at gmail.com
Thu May 3 14:34:05 UTC 2018


On Thu, May 3, 2018 at 2:40 PM Carter Schonwald <carter.schonwald at gmail.com>
wrote:

> I think Ed’s structs package explicitly makes use of this :)
>

Oh, interesting! Thanks for the pointer!

Looking at Ed's code, he's seems to be doing something similar to that I'm
also interested in: having a SmallArray# that at one index points to
another SmallArray# and at another one to a ByteArray#.  (my use case
involves multiple small arrays, so I'd rather use SmallArray# than
ArrayArray#):
https://github.com/ekmett/structs/blob/master/src/Data/Struct/Internal.hs#L146

So I guess my second question becomes: is anyone aware of some rts/GC
invariants/expectations that would be broken by doing this? (ignoring the
issue of getting every `unsafeCoerce#` right :)

Thanks!

- Michal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20180503/31475062/attachment.html>


More information about the ghc-devs mailing list