listArrayST
, listUArrayST
and newListArray
which have
identical definitions.newListArray
use foldr
, which can fuse with the input list of
elements. listArray
also benefits because it gets rewritten by rules
to use newListArray
.Closes #8 (closed).
Note: This MR does not change the definition of listArray
(used when it does not get rewritten), which is also not fusion-friendly due to a zip [0..] es
. This definition is not used for any of the defined array instances because all of them have rewrite rules, but will be for user-defined instances. It can be made fusion-friendly but needs some changes which I don't want to burden this MR with.