Question about ArrayArray#
carter.schonwald at gmail.com
Thu May 3 12:40:29 UTC 2018
I think Ed’s structs package explicitly makes use of this :)
On Wed, May 2, 2018 at 7:31 AM Michal Terepeta <michal.terepeta at gmail.com>
> Hi all,
> I have a quick question about ArrayArray#. Is it safe to store *both* an
> ByteArray# and ArrayArray# within the *same* ArrayArray#? For instance:
> - at index 0 of an ArrayArray# I store a different ArrayArray#,
> - at index 1 of that same ArrayArray# I store a ByteArray#.
> It seems to me that this should be safe/supported from the point of view of
> the runtime system:
> - both ArrayArray# and ByteArray# have the same kind/runtime
> - the arrays have a header that tells rts/GC what they are/how to handle
> (But I, as a user, would be responsible for using the right primop with the
> right index to read them back)
> Is this correct?
> Thanks a lot!
> - Michal
> ghc-devs mailing list
> ghc-devs at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ghc-devs