-
Notifications
You must be signed in to change notification settings - Fork 10
Support for containers-0.8
.
#17
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
containers
version 0.8
.containers-0.8
.
Starting from data IntMap a = Bin {-# UNPACK #-} !Prefix
- {-# UNPACK #-} !Mask
!(IntMap a)
!(IntMap a)
| Tip {-# UNPACK #-} !Key a
| Nil I was able to fix compilation of However, even with the above fix, the test suite now fails with errors for Tests.Set
fromAscList: FAIL (0.10s)
✗ <interactive> failed at test/Tests/Util.hs:394:14
after 75 tests and 7 shrinks.
shrink path: 75:bG2hIe2
┏━━ test/Tests/Util.hs ━━━
384 ┃ runTT :: Monad m => TestType a b -> a -> b -> PropertyT m ()
385 ┃ runTT = \case
386 ┃ TTNEMap -> \x y -> do
387 ┃ assert $ NEM.valid y
388 ┃ unKMap x === unKMap (NEM.IsNonEmpty y)
389 ┃ TTNEIntMap -> \x y -> do
390 ┃ assert $ NEIM.valid y
391 ┃ x === NEIM.IsNonEmpty y
392 ┃ TTNESet -> \x y -> do
393 ┃ assert $ NES.valid y
394 ┃ unKSet x === unKSet (NES.IsNonEmpty y)
┃ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
┃ │ ━━━ Failed (- lhs) (+ rhs) ━━━
┃ │ - fromList [ ( -95 , "a" ) ]
┃ │ + fromList [ ( -95 , "" ) ] |
I was able to get the test suite passing again with 3de17be, which makes the bias of
|
I've created a PR here: |
It seems there's a change in the behaviour of We can use the With $ cabal repl nonempty-containers-test --constraint=containers==0.7
> import qualified Data.Set as Set
> import Tests.Util
> Set.fromAscList [K 'a' 1, K 'a' 2]
fromList [K {getKX = 'a', getKY = 1}]
> Set.fromDescList [K 'a' 1, K 'a' 2]
fromList [K {getKX = 'a', getKY = 1}] With $ cabal repl nonempty-containers-test --constraint=containers==0.8 --allow-newer=containers
> import qualified Data.Set as Set
> import Tests.Util
> Set.fromAscList [K 'a' 1, K 'a' 2]
fromList [K {getKX = 'a', getKY = 2}]
> Set.fromDescList [K 'a' 1, K 'a' 2]
fromList [K {getKX = 'a', getKY = 2}] In contrast, the behaviour of > Set.fromList [K 'a' 1, K 'a' 2]
fromList [K {getKX = 'a', getKY = 2}]
> Set.fromList [K 'a' 1, K 'a' 2]
fromList [K {getKX = 'a', getKY = 2}] I think this might explain why the workaround in 3de17be works, as it adjusts the bias of |
I've just discovered this change in the behaviour of It seems the relevant change was made in this PR, which was included in |
Related issue in |
containers-0.8
.containers-0.8
.
Version
0.8
of thecontainers
package has been released. 🎉The
nonempty-containers
package currently has no upper bound oncontainers
:nonempty-containers/nonempty-containers.cabal
Lines 53 to 57 in de9ba5c
However, when trying to build with
containers-0.8
, compilation fails with:The text was updated successfully, but these errors were encountered: