@@ -38,6 +38,7 @@ newtype PoolPQ (schema :: TablesType) m x =
3838 PoolPQ { runPoolPQ :: Pool (K Connection schema) -> m x }
3939 deriving Functor
4040
41+-- | `Applicative` instance for `PoolPQ`.
4142instance Monad m => Applicative (PoolPQ schema m) where
4243 pure x = PoolPQ $ \ _ -> pure x
4344 PoolPQ f <*> PoolPQ x = PoolPQ $ \ pool -> do
@@ -45,18 +46,22 @@ instance Monad m => Applicative (PoolPQ schema m) where
4546 x' <- x pool
4647 return $ f' x'
4748
49+-- | `Monad` instance for `PoolPQ`.
4850instance Monad m => Monad (PoolPQ schema m) where
4951 return = pure
5052 PoolPQ x >>= f = PoolPQ $ \ pool -> do
5153 x' <- x pool
5254 runPoolPQ (f x') pool
5355
56+-- | `MonadTrans` instance for `PoolPQ`.
5457instance MonadTrans (PoolPQ schema) where
5558 lift m = PoolPQ $ \ _pool -> m
5659
60+-- | `MonadBase` instance for `PoolPQ`.
5761instance MonadBase b m => MonadBase b (PoolPQ schema m) where
5862 liftBase = lift . liftBase
5963
64+-- | `MonadPQ` instance for `PoolPQ`.
6065instance MonadBaseControl IO io => MonadPQ schema (PoolPQ schema io) where
6166 manipulateParams manipulation params = PoolPQ $ \ pool -> do
6267 withResource pool $ \ conn -> do
@@ -88,6 +93,7 @@ poolpqliftWith :: Functor m => (PoolPQRun schema -> m a) -> PoolPQ schema m a
8893poolpqliftWith f = PoolPQ $ \ pool ->
8994 (f $ \ pq -> runPoolPQ pq pool)
9095
96+-- | `MonadBaseControl` instance for `PoolPQ`.
9197instance MonadBaseControl b m => MonadBaseControl b (PoolPQ schema m) where
9298 type StM (PoolPQ schema m) x = StM m x
9399 liftBaseWith f =