Skip to content
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

Rename blob and blobref type variables to b #480

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bench/macro/lsm-tree-bench-wp8.hs
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ pureReference !initialSize !batchSize !batchCount !seed =
Nothing -> (,) k LSM.NotFound
Just u -> (,) k $! updateToLookupResult u

updateToLookupResult :: LSM.Update v blob -> LSM.LookupResult v ()
updateToLookupResult :: LSM.Update v b -> LSM.LookupResult v ()
updateToLookupResult (LSM.Insert v Nothing) = LSM.Found v
updateToLookupResult (LSM.Insert v (Just _)) = LSM.FoundWithBlob v ()
updateToLookupResult LSM.Delete = LSM.NotFound
Expand Down
4 changes: 2 additions & 2 deletions src-extras/Database/LSMTree/Extras/Generators.hs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ import Test.QuickCheck.Instances ()
Common LSMTree types
-------------------------------------------------------------------------------}

instance (Arbitrary v, Arbitrary blob) => Arbitrary (Normal.Update v blob) where
instance (Arbitrary v, Arbitrary b) => Arbitrary (Normal.Update v b) where
arbitrary = QC.arbitrary2
shrink = QC.shrink2

Expand Down Expand Up @@ -132,7 +132,7 @@ instance (Arbitrary k, Ord k) => Arbitrary (Range k) where
Entry
-------------------------------------------------------------------------------}

instance (Arbitrary v, Arbitrary blob) => Arbitrary (Entry v blob) where
instance (Arbitrary v, Arbitrary b) => Arbitrary (Entry v b) where
arbitrary = QC.arbitrary2
shrink = QC.shrink2

Expand Down
4 changes: 2 additions & 2 deletions src-extras/Database/LSMTree/Extras/NoThunks.hs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ instance (NoThunksIOLike m, Typeable m, Typeable (PrimState m))
-- | Does not check 'NoThunks' for the 'Common.Session' that this
-- 'Normal.Table' belongs to.
instance (NoThunksIOLike m, Typeable m, Typeable (PrimState m))
=> NoThunks (NormalTable m k v blob) where
showTypeOf (_ :: Proxy (NormalTable m k v blob)) = "NormalTable"
=> NoThunks (NormalTable m k v b) where
showTypeOf (_ :: Proxy (NormalTable m k v b)) = "NormalTable"
wNoThunks ctx (NormalTable t) = wNoThunks ctx t

{-------------------------------------------------------------------------------
Expand Down
12 changes: 6 additions & 6 deletions src-extras/Database/LSMTree/Extras/RunData.hs
Original file line number Diff line number Diff line change
Expand Up @@ -148,21 +148,21 @@ instance ( Ord k, Arbitrary k, Arbitrary v, Arbitrary b
shrink = shrinkRunData shrink shrink shrink

genRunData ::
forall k v blob. Ord k
forall k v b. Ord k
=> Gen k
-> Gen v
-> Gen blob
-> Gen (RunData k v blob)
-> Gen b
-> Gen (RunData k v b)
genRunData genKey genVal genBlob =
RunData <$> liftArbitrary2Map genKey (liftArbitrary2 genVal genBlob)

shrinkRunData ::
Ord k
=> (k -> [k])
-> (v -> [v])
-> (blob -> [blob])
-> RunData k v blob
-> [RunData k v blob]
-> (b -> [b])
-> RunData k v b
-> [RunData k v b]
shrinkRunData shrinkKey shrinkVal shrinkBlob =
fmap RunData
. liftShrink2Map shrinkKey (liftShrink2 shrinkVal shrinkBlob)
Expand Down
Loading