Is there any other data structure for which you would like readily accessible information about their memory representation? This is also the opportunity for People Who Know to make sure the knowledge is transmitted, and contributors of such MRs to learn more.
For those who will attend European Haskell Hackathons like MuniHac and ZuriHac, it’s also the opportunity to pair program and be guided with the development workflow of GHC & Haddock.
I’d much rather prefer there be a single concise source on the general internal representation of things within the language, then every primitive (including ByteArray#) can be documented relative to that. You don’t need images everywhere that way, a simple “MutableByteArray# is a pointer to a block of memory together with its size” already delivers 90% of everything I care about.
Same regarding laziness/levity.
This would also create a downstream effect where I don’t have to bother with complex explanations in libraries, I can just point to a known piece of documentation for terminology explanations.
Okay so you’re more in favour of a centralised source for these explanations. Fair enough, I have something planned for the wiki to host such a page. Any data structure that you’d like to shortlist which isn’t the same shape as something already documented?
Ah, I didn’t see that collapsed section with a quick glance at the documentation. It still might also be useful to mention there that each box in the diagram is one word, so the total memory overhead of a fully (spine-) evaluated list of n elements is 3n + 1 words.