Skip to content

Commit

Permalink
Merge pull request #34 from input-output-hk/dcoutts/main-fixes
Browse files Browse the repository at this point in the history
Fix some minor issues on main
  • Loading branch information
dcoutts authored Nov 9, 2023
2 parents e162808 + 921aaa9 commit 106f9c6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
16 changes: 8 additions & 8 deletions prototypes/ScheduledMerges.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ module ScheduledMerges (
EventDetail(..)
) where

import Prelude hiding (lookup)
import Prelude hiding (lookup)

import Data.Bits
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.STRef

import Control.Exception (assert)
import Control.Monad.ST
import Control.Tracer (Tracer, contramap, traceWith)
import GHC.Stack (HasCallStack)
import Control.Exception (assert)
import Control.Monad.ST
import Control.Tracer (Tracer, contramap, traceWith)
import GHC.Stack (HasCallStack)

import Database.LSMTree.Normal (LookupResult (..), Update (..))
import Database.LSMTree.Normal (LookupResult (..), Update (..))


data LSM s = LSMHandle !(STRef s Counter)
Expand Down Expand Up @@ -415,7 +415,7 @@ lookups lsm = mapM (lookup lsm)

lookup :: LSM s -> Key -> ST s (LookupResult Key Value Blob)
lookup lsm k = do
rs <- allLayers lsm
rss <- allLayers lsm
return $!
foldr (\lookures continue ->
case lookures of
Expand All @@ -424,7 +424,7 @@ lookup lsm k = do
Just (Insert v (Just b)) -> FoundWithBlob k v b
Just Delete -> NotFound k)
(NotFound k)
[ Map.lookup k r | r <- rs ]
[ Map.lookup k r | rs <- rss, r <- rs ]

bufferToRun :: Buffer -> Run
bufferToRun = id
Expand Down
20 changes: 10 additions & 10 deletions prototypes/ScheduledMergesTestQLS.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@

module ScheduledMergesTestQLS (tests) where

import Prelude hiding (lookup)
import Prelude hiding (lookup)

import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map

import Data.Constraint (Dict (..))
import Data.Proxy
import Data.Constraint (Dict (..))
import Data.Proxy

import Control.Monad.ST
import Control.Tracer (Tracer, nullTracer)
import Control.Monad.ST
import Control.Tracer (Tracer, nullTracer)

import ScheduledMerges
import ScheduledMerges

import Test.QuickCheck
import Test.QuickCheck.StateModel hiding (lookUpVar)
import Test.QuickCheck.StateModel.Lockstep hiding (ModelOp)
import Test.QuickCheck.StateModel hiding (lookUpVar)
import Test.QuickCheck.StateModel.Lockstep hiding (ModelOp)
import qualified Test.QuickCheck.StateModel.Lockstep.Defaults as Lockstep
import qualified Test.QuickCheck.StateModel.Lockstep.Run as Lockstep
import qualified Test.QuickCheck.StateModel.Lockstep.Run as Lockstep
import Test.Tasty
import Test.Tasty.QuickCheck (testProperty)
import Test.Tasty.QuickCheck (testProperty)


-------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion prototypes/Test.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Main (main) where

import Test.Tasty
import Test.Tasty

import qualified ScheduledMergesTestQLS

Expand Down

0 comments on commit 106f9c6

Please sign in to comment.