Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-volkov committed Jan 4, 2025
1 parent b1f87c2 commit 038daf5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
26 changes: 14 additions & 12 deletions hspec/Hasql/PipelineSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand All @@ -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])
2 changes: 1 addition & 1 deletion library/Hasql/Session/Core.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion profiling/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tasty/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 038daf5

Please sign in to comment.