@@ -122,7 +122,7 @@ makeKey seed =
122122 case v of
123123 P. MutablePrimArray mba -> do
124124 _ <- P. resizeMutableByteArray (P. MutableByteArray mba) 34
125- return v
125+ pure v
126126
127127 of (P. PrimArray ba :: P. PrimArray Word64 ) ->
128128 byteArrayToSBS (P. ByteArray ba)
@@ -262,7 +262,7 @@ timed action = do
262262 printf " Running time: %.03f sec\n " t
263263 printf " /proc/self/io after vs. before: %s\n " (ppShow p)
264264 printf " RTSStats after vs. before: %s\n " (ppShow s)
265- return (x, t, s, p)
265+ pure (x, t, s, p)
266266
267267timed_ :: IO () -> IO (Double , RTSStatsDiff Triple , ProcIODiff )
268268timed_ action = do
@@ -479,7 +479,7 @@ doDryRun' gopts opts = do
479479 let (batch1, batch2) = toOperations lookups inserts
480480 _ <- evaluate $ force (batch1, batch2)
481481
482- return g'
482+ pure g'
483483
484484 when (check opts) $ do
485485 duplicates <- readIORef duplicateRef
@@ -589,7 +589,7 @@ doRun gopts opts = do
589589 checkvar <- newIORef $ pureReference
590590 (initialSize gopts) (batchSize opts)
591591 (batchCount opts) (seed opts)
592- let fcheck | not (check opts) = \ _ _ -> return ()
592+ let fcheck | not (check opts) = \ _ _ -> pure ()
593593 | otherwise = \ b y -> do
594594 (x: xs) <- readIORef checkvar
595595 unless (x == y) $
@@ -642,7 +642,7 @@ sequentialIteration h output !initialSize !batchSize !tbl !b !g =
642642 _ <- timeLatency tref $ LSM. updates tbl is
643643
644644 -- continue to the next batch
645- return g'
645+ pure g'
646646
647647
648648sequentialIterations :: LatencyHandle
@@ -674,7 +674,7 @@ sequentialIterationLO output !initialSize !batchSize !tbl !b !g = do
674674 output b (V. zip ls (fmap (fmap (const () )) results))
675675
676676 -- continue to the next batch
677- return g'
677+ pure g'
678678
679679sequentialIterationsLO :: (Int -> LookupResults -> IO () )
680680 -> Int -> Int -> Int -> Word64
@@ -780,7 +780,7 @@ pipelinedIteration h output !initialSize !batchSize
780780 ! delta' = Map. fromList (V. toList is)
781781 putMVar syncTblOut (tbl_n2, delta')
782782
783- return tbl_n2
783+ pure tbl_n2
784784 where
785785 applyUpdates :: Map K (LSM. Update V a )
786786 -> V. Vector (K , LSM. LookupResult V b )
@@ -839,7 +839,7 @@ pipelinedIterations h output !initialSize !batchSize !batchCount !seed tbl_0 = d
839839 -- If run with +RTS -N2 then we'll put each thread on a separate core.
840840 withAsyncOn 0 threadA $ \ ta ->
841841 withAsyncOn 1 threadB $ \ tb ->
842- waitBoth ta tb >> return ()
842+ waitBoth ta tb >> pure ()
843843
844844-------------------------------------------------------------------------------
845845-- Testing
@@ -1020,7 +1020,7 @@ main = do
10201020forFoldM_ :: Monad m => s -> [a ] -> (a -> s -> m s ) -> m s
10211021forFoldM_ ! s0 xs0 f = go s0 xs0
10221022 where
1023- go ! s [] = return s
1023+ go ! s [] = pure s
10241024 go ! s (x: xs) = do
10251025 ! s' <- f x s
10261026 go s' xs
0 commit comments