Open meooow25 opened 2 months ago
Thanks for your work!
I wonder if it has any affection on the ghc side since array
is the package ghc
dependency.
The latest deepseq
supports base
from 4.12-4.20, and array
supports base
from 4.9-4.20
, which means we have to drop support before base-4.12
(ghc-8.6) in the future release.
I wonder if it has any affection on the ghc side since
array
is the packageghc
dependency.
ghc
-the-package depends on deepseq
directly, so I would not expect any complications.
we have to drop support before
base-4.12
(ghc-8.6) in the future release.
I think it's reasonable, pretty much every other core package has done it already.
The latest
deepseq
supportsbase
from 4.12-4.20, andarray
supportsbase
from4.9-4.20
, which means we have to drop support beforebase-4.12
(ghc-8.6) in the future release.
That's a good point. If you have reasons to keep supporting older base
, this will have to wait.
I'd like to implement this for the next coming release, but not sure if rnf = rwhnf
is enough for unboxed arrays since I don't have a counterexample:(
There is no need to force the data for unboxed arrays but we should force the stored index. For example,
instance NFData i => NFData (STUArray s i e) where
rnf (STUArray l u _ _) = rnf l `seq` rnf u
On a related note, it seems StorableArray
is lazy in the Int
number of elements, I can't imagine why.
Probably it should be made strict.
NFData instances for unboxed arrays (
UArray
,STUArray
,IOUArray
,StorableArray
) are currently missing.Ideally, they would be defined here, but we can't do that because
deepseq
(which definesNFData
) depends onarray
.However,
deepseq
has agreed to drop this dependency (see https://github.com/haskell/deepseq/issues/102), which makes this possible in the future.For
array
, this would mean:deepseq
release which does not depend onarray
deepseq
and define the instances.Does this sound ok to the maintainers here?