Skip to content

Commit ed9f351

Browse files
committed
Remove BiasedKeyForIndexCompact
It has been replaced by `TestKey`
1 parent 85fe878 commit ed9f351

File tree

2 files changed

+4
-30
lines changed

2 files changed

+4
-30
lines changed

src-extras/Database/LSMTree/Extras/Generators.hs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ module Database.LSMTree.Extras.Generators (
3737
, isKeyForIndexCompact
3838
, KeyForIndexCompact (..)
3939
, BiasedKey (..)
40-
, BiasedKeyForIndexCompact (..)
4140
-- * helpers
4241
, shrinkVec
4342
) where
@@ -597,22 +596,6 @@ instance Arbitrary BiasedKey where
597596

598597
deriving newtype instance SerialiseKey BiasedKey
599598

600-
newtype BiasedKeyForIndexCompact =
601-
BiasedKeyForIndexCompact { getBiasedKeyForIndexCompact :: RawBytes }
602-
deriving stock (Eq, Ord, Show)
603-
deriving newtype NFData
604-
605-
instance Arbitrary BiasedKeyForIndexCompact where
606-
arbitrary = arbitraryBiasedKey BiasedKeyForIndexCompact genKeyForIndexCompact
607-
608-
shrink (BiasedKeyForIndexCompact rb) =
609-
[ BiasedKeyForIndexCompact rb'
610-
| rb' <- shrink rb
611-
, isKeyForIndexCompact rb'
612-
]
613-
614-
deriving newtype instance SerialiseKey BiasedKeyForIndexCompact
615-
616599
{-------------------------------------------------------------------------------
617600
Unsliced
618601
-------------------------------------------------------------------------------}

test/Test/Database/LSMTree/Generators.hs

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,10 @@ tests = testGroup "Test.Database.LSMTree.Generators" [
6666
, testGroup "KeyForIndexCompact" $
6767
prop_arbitraryAndShrinkPreserveInvariant noTags $
6868
isKeyForIndexCompact . getKeyForIndexCompact
69-
, testGroup "BiasedKeyForIndexCompact" $
70-
prop_arbitraryAndShrinkPreserveInvariant noTags $
71-
isKeyForIndexCompact . getBiasedKeyForIndexCompact
72-
, testGroup "lists of key/op pairs" $
73-
[ testGroup "BiasedKey" $
74-
prop_arbitraryAndShrinkPreserveInvariant
75-
(labelTestKOps @BiasedKey)
76-
deepseqInvariant
77-
, testGroup "BiasedKeyForIndexCompact" $
78-
prop_arbitraryAndShrinkPreserveInvariant
79-
(labelTestKOps @BiasedKeyForIndexCompact)
80-
deepseqInvariant
81-
]
69+
, testGroup "BiasedKey" $
70+
prop_arbitraryAndShrinkPreserveInvariant
71+
(labelTestKOps @BiasedKey)
72+
deepseqInvariant
8273
, testGroup "helpers"
8374
[ testProperty "prop_shrinkVec" $ \vec ->
8475
shrinkVec (QC.shrink @Int) vec === map VP.fromList (QC.shrink (VP.toList vec))

0 commit comments

Comments
 (0)