The design of array libraries
Haskell Community [Unofficial]
May 14, 2026
Thanks for the response, I really appreciate feedback from experts.
In my sparse vector module I have trees of arrays of size up to 64 (together with a Word64 of bits at each level to say what’s present). The interior arrays are all SmallArrays but the bottom ones could also be other arrays, e.g. ByteArrays filled with integers mod p for e.g. word-sized p (getting this efficient is important for computer algebra). Anyway it’s convenient to code a lot of routines that work at all levels of the tree and all array types the same way using the type classes in contiguous.
Discussion in the ATmosphere