It appears all of the functions used to create and modify all the Small(Mutable)Array#'s also work in the ST monad, which would mean it should be possible to replace all
unsafePerformIO $! IO $ \s -> ...
with
runST $! ST $ \s -> ...
and hopefully proceed exactly the same code while avoid the unnecessarily using the unutterable function.
It appears all of the functions used to create and modify all the
Small(Mutable)Array#
's also work in theST
monad, which would mean it should be possible to replace allwith
and hopefully proceed exactly the same code while avoid the unnecessarily using the unutterable function.