Skip to content

Commit dd977b5

Browse files
authored
Merge pull request #699 from IntersectMBO/jdral/bump-hackage
Bump the `index-state` for Hackage, fix ensuing compilation failures
2 parents f794045 + 94b7f11 commit dd977b5

File tree

8 files changed

+19
-20
lines changed

8 files changed

+19
-20
lines changed

bench/macro/lsm-tree-bench-bloomfilter.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ benchInBatches !b !rng0 !action =
271271
go !rng !n
272272
| n <= 0 = ()
273273
| otherwise =
274-
let (!rng'', !rng') = split rng
274+
let (!rng'', !rng') = splitGen rng
275275
ks :: VP.Vector Word256
276276
!ks = VP.unfoldrExactN b uniform rng'
277277
ks' :: V.Vector SerialisedKey

bench/macro/lsm-tree-bench-lookups.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ genLookupBatch !rng0 !n0
399399
!res <- V.unsafeFreeze mres
400400
pure (res, rng)
401401
| otherwise = do
402-
let (!k, !rng') = uniform @StdGen @UTxOKey rng
402+
let (!k, !rng') = uniform @UTxOKey @StdGen rng
403403
!sk = serialiseKey k
404404
VM.write mres i $! sk
405405
go rng' (i+1) mres

bench/micro/Bench/Database/LSMTree/Internal/Lookup.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ lookupsEnv ::
243243
, V.Vector SerialisedKey
244244
)
245245
lookupsEnv g nentries npos nneg = do
246-
let (g1, g') = R.split g
247-
(g2, g3) = R.split g'
246+
let (g1, g') = R.splitGen g
247+
(g2, g3) = R.splitGen g'
248248
let (keys, negLookups) = splitAt nentries
249249
$ uniformWithoutReplacement @UTxOKey g1 (nentries + nneg)
250250
posLookups = sampleUniformWithReplacement g2 npos keys

bench/micro/Bench/Database/LSMTree/Internal/Merge.hs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -340,22 +340,22 @@ defaultConfig = Config {
340340

341341
configWord64 :: Config
342342
configWord64 = defaultConfig {
343-
randomKey = first serialiseKey . uniform @_ @Word64
344-
, randomValue = first serialiseValue . uniform @_ @Word64
343+
randomKey = first serialiseKey . uniform @Word64 @_
344+
, randomValue = first serialiseValue . uniform @Word64 @_
345345
, randomBlob = first serialiseBlob . R.randomByteStringR (0, 0x2000) -- up to 8 kB
346346
}
347347

348348
configUTxO :: Config
349349
configUTxO = defaultConfig {
350-
randomKey = first serialiseKey . uniform @_ @UTxOKey
351-
, randomValue = first serialiseValue . uniform @_ @UTxOValue
350+
randomKey = first serialiseKey . uniform @UTxOKey @_
351+
, randomValue = first serialiseValue . uniform @UTxOValue @_
352352
}
353353

354354
configUTxOStaking :: Config
355355
configUTxOStaking = defaultConfig {
356356
fmupserts = 1
357-
, randomKey = first serialiseKey . uniform @_ @UTxOKey
358-
, randomValue = first serialiseValue . uniform @_ @Word64
357+
, randomKey = first serialiseKey . uniform @UTxOKey @_
358+
, randomValue = first serialiseValue . uniform @Word64 @_
359359
, mergeResolve = Just (onDeserialisedValues ((+) @Word64))
360360
}
361361

@@ -401,7 +401,7 @@ randomRuns hasFS hasBlockIO config@Config {..} rng0 = do
401401
zipWith
402402
(randomRunData config)
403403
nentries
404-
(List.unfoldr (Just . R.split) rng0)
404+
(List.unfoldr (Just . R.splitGen) rng0)
405405

406406
-- | Generate keys and entries to insert into the write buffer.
407407
-- They are already serialised to exclude the cost from the benchmark.
@@ -416,7 +416,7 @@ randomRunData Config {..} runentries g0 =
416416
(R.withoutReplacement g1 runentries randomKey)
417417
(R.withReplacement g2 runentries randomEntry)
418418
where
419-
(g1, g2) = R.split g0
419+
(g1, g2) = R.splitGen g0
420420

421421
randomEntry :: Rnd (Entry SerialisedValue SerialisedBlob)
422422
randomEntry = R.frequency

bench/micro/Bench/Database/LSMTree/Internal/WriteBuffer.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,14 @@ defaultConfig = Config {
168168

169169
configWord64 :: Config
170170
configWord64 = defaultConfig {
171-
randomKey = first serialiseKey . uniform @_ @Word64
172-
, randomValue = first serialiseValue . uniform @_ @Word64
171+
randomKey = first serialiseKey . uniform @Word64 @_
172+
, randomValue = first serialiseValue . uniform @Word64 @_
173173
}
174174

175175
configUTxO :: Config
176176
configUTxO = defaultConfig {
177-
randomKey = first serialiseKey . uniform @_ @UTxOKey
178-
, randomValue = first serialiseValue . uniform @_ @UTxOValue
177+
randomKey = first serialiseKey . uniform @UTxOKey @_
178+
, randomValue = first serialiseValue . uniform @UTxOValue @_
179179
}
180180

181181
envInputKOps :: Config -> InputKOps

cabal.project.release

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
index-state:
22
-- Bump this if you need newer packages from Hackage
3-
-- current date: ghc-9.12 and data-elevator
4-
, hackage.haskell.org 2025-03-10T07:49:31Z
3+
, hackage.haskell.org 2025-05-01T00:00:00Z
54

65
packages:
76
.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@ frequency xs0 g
102102
randomByteStringR :: (Int, Int) -> StdGen -> (BS.ByteString, StdGen)
103103
randomByteStringR range g =
104104
let (!l, !g') = uniformR range g
105-
in R.genByteString l g'
105+
in R.uniformByteString l g'

test/Test/Database/LSMTree/Internal/RunBloomFilterAlloc.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import Database.LSMTree.Extras.Random
3737
import qualified Database.LSMTree.Internal.Entry as LSMT
3838
import Database.LSMTree.Internal.RunAcc (RunBloomFilterAlloc (..),
3939
falsePositiveRate, newMBloom)
40-
import System.Random
40+
import System.Random hiding (Seed)
4141
import Test.QuickCheck
4242
import Test.QuickCheck.Gen
4343
import Test.Tasty (TestTree, testGroup)

0 commit comments

Comments
 (0)