diff --git a/hspec/Hasql/PipelineSpec.hs b/hspec/Hasql/PipelineSpec.hs index 7b88c23..57fc226 100644 --- a/hspec/Hasql/PipelineSpec.hs +++ b/hspec/Hasql/PipelineSpec.hs @@ -57,12 +57,13 @@ spec = do it "Leaves the connection usable" do result <- Dsl.runSessionOnLocalDb do - tryError - $ Dsl.runPipelineInSession - $ (,,) - <$> GenerateSeries.pipeline True GenerateSeries.Params {start = 0, end = 2} - <*> BrokenSyntax.pipeline True BrokenSyntax.Params {start = 0, end = 2} - <*> GenerateSeries.pipeline True GenerateSeries.Params {start = 0, end = 2} + _ <- + tryError + $ Dsl.runPipelineInSession + $ (,,) + <$> GenerateSeries.pipeline True GenerateSeries.Params {start = 0, end = 2} + <*> BrokenSyntax.pipeline True BrokenSyntax.Params {start = 0, end = 2} + <*> GenerateSeries.pipeline True GenerateSeries.Params {start = 0, end = 2} GenerateSeries.session True GenerateSeries.Params {start = 0, end = 0} shouldBe result (Right [0]) @@ -81,11 +82,12 @@ spec = do it "Leaves the connection usable" do result <- Dsl.runSessionOnLocalDb do - tryError - $ Dsl.runPipelineInSession - $ (,,) - <$> GenerateSeries.pipeline True GenerateSeries.Params {start = 0, end = 2} - <*> WrongDecoder.pipeline True WrongDecoder.Params {start = 0, end = 2} - <*> GenerateSeries.pipeline True GenerateSeries.Params {start = 0, end = 2} + _ <- + tryError + $ Dsl.runPipelineInSession + $ (,,) + <$> GenerateSeries.pipeline True GenerateSeries.Params {start = 0, end = 2} + <*> WrongDecoder.pipeline True WrongDecoder.Params {start = 0, end = 2} + <*> GenerateSeries.pipeline True GenerateSeries.Params {start = 0, end = 2} GenerateSeries.session True GenerateSeries.Params {start = 0, end = 0} shouldBe result (Right [0]) diff --git a/library/Hasql/Session/Core.hs b/library/Hasql/Session/Core.hs index f544632..c54a027 100644 --- a/library/Hasql/Session/Core.hs +++ b/library/Hasql/Session/Core.hs @@ -46,7 +46,7 @@ sql :: ByteString -> Session () sql sql = Session $ ReaderT - $ \(Connection.Connection pqConnectionRef integerDatetimes registry) -> + $ \(Connection.Connection pqConnectionRef integerDatetimes _) -> ExceptT $ fmap (first (QueryError sql [])) $ withMVar pqConnectionRef diff --git a/profiling/Main.hs b/profiling/Main.hs index 35180e4..dbe5410 100644 --- a/profiling/Main.hs +++ b/profiling/Main.hs @@ -12,7 +12,7 @@ main = do Right connection <- acquireConnection traceEventIO "START Session" - Right result <- B.run sessionWithManySmallResults connection + Right _ <- B.run sessionWithManySmallResults connection traceEventIO "STOP Session" return () where diff --git a/tasty/Main.hs b/tasty/Main.hs index 9c4802a..361c85f 100644 --- a/tasty/Main.hs +++ b/tasty/Main.hs @@ -279,7 +279,7 @@ tree = Session.sql "asldfjsldk" io = Connection.with $ \c -> do - Session.run errorSession c + _ <- Session.run errorSession c Session.run sumSession c in io >>= \x -> assertBool (show x) (either (const False) isRight x), testCase "\"another command is already in progress\" bugfix"