-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing NFData instances for unboxed arrays #8
Comments
Thanks for your work! |
The latest |
I think it's reasonable, pretty much every other core package has done it already. |
That's a good point. If you have reasons to keep supporting older |
I'd like to implement this for the next coming release, but not sure if |
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 array/Data/Array/Storable/Internals.hs Line 42 in c86635e
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 haskell/deepseq#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?
The text was updated successfully, but these errors were encountered: