on dev help sign in
withConnection change
e18b7fbEitan Chatav
squeal-postgresql/src/Squeal/PostgreSQL/PQ.hs+3−2
@@ -143,10 +143,11 @@ withConnection
143 :: forall schema0 schema1 io x
143 :: forall schema0 schema1 io x
144 . MonadBaseControl IO io
144 . MonadBaseControl IO io
145 => ByteString
145 => ByteString
146− -> (K LibPQ.Connection schema0 -> io (x, K LibPQ.Connection schema1))
146+ -- -> (K LibPQ.Connection schema0 -> io (x, K LibPQ.Connection schema1))
147+ -> PQ schema0 schema1 io x
147 -> io x
148 -> io x
148withConnection connString action = do
149withConnection connString action = do
149− (x, _conn) <- bracket (connectdb connString) finish action
150+ K x <- bracket (connectdb connString) finish (runPQ action)
150 return x
151 return x
151
152
152-- | We keep track of the schema via an Atkey indexed state monad transformer,
153-- | We keep track of the schema via an Atkey indexed state monad transformer,