Closed phadej closed 2 years ago
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
which define NFData
instances like:
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 would think of, forcing things left-to-right.
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 $
and $!
are infixr 0
themselves.
Added in v1.4.7.0
.
1.4.6.1
It has been discussed in https://github.com/haskell/deepseq/pull/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
.