-
Notifications
You must be signed in to change notification settings - Fork 29
Why deepseq infix revert? #74
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
Comments
If you think this is justifiably minor-release-worthy, I'll add it to 1.4.7.0 before it gets pinned to GHC here. |
Christiaan's example is very convincing. I find hard time coming up with an example where changing fixity would break things. OTOH, doing a search on Hackage shows that there are many packages yarr instance Shape sh => NFData (UArray CV CVL sh a) where
rnf (Convoluted sh tch iforce bget center cget) =
sh `deepseq` tch `seq` iforce `seq`
bget `seq` center `deepseq` cget `seq` ()
{-# INLINE rnf #-}
or windns instance NFData DnsRecord where
rnf (DnsRecord n y t d) = n `deepseq` y `deepseq` t `deepseq` d `deepseq` () or vty instance NFData Image where
rnf EmptyImage = ()
rnf (CropRight i w h) = i `deepseq` w `seq` h `seq` ()
rnf (CropLeft i s w h) = i `deepseq` s `seq` w `seq` h `seq` ()
rnf (CropBottom i w h) = i `deepseq` w `seq` h `seq` () or haddock rnf doc = case doc of
DocEmpty -> ()
DocAppend a b -> a `deepseq` b `deepseq` () None of these would break, but I'd argue instead work as a reader The yarr example is interesting as it's currently rnf (Convoluted sh tch iforce bget center cget) =
(sh `deepseq` tch) `seq` iforce `seq`
bget `seq` (center `deepseq` cget) `seq` () which works, but i'm sure not what the author intended. There are also few occurences which look like: x `deepseq` f x $ y or x `deepseq` f x $! y which will still work as |
Added in |
1.4.6.1
It has been discussed in #56, https://mail.haskell.org/pipermail/libraries/2020-April/030361.html
I also remember (but fail to find discussions) that this change is one where not adhering to SHOULD in PVP is justified. The major bump in
deepseq
version library would (especially now) make people angry for no reason, and the change doesn't break anything, asdeepseq
combinator cannot be meaningfully chained with its currentinfixl 9
.The text was updated successfully, but these errors were encountered: