traction-0.1.0: Tools for postgresql-simple.

Safe HaskellNone
LanguageHaskell2010

Traction.Control

Documentation

newtype Db a Source #

Constructors

Db 

Fields

Instances
Monad Db Source # 
Instance details

Defined in Traction.Control

Methods

(>>=) :: Db a -> (a -> Db b) -> Db b #

(>>) :: Db a -> Db b -> Db b #

return :: a -> Db a #

fail :: String -> Db a #

Functor Db Source # 
Instance details

Defined in Traction.Control

Methods

fmap :: (a -> b) -> Db a -> Db b #

(<$) :: a -> Db b -> Db a #

Applicative Db Source # 
Instance details

Defined in Traction.Control

Methods

pure :: a -> Db a #

(<*>) :: Db (a -> b) -> Db a -> Db b #

liftA2 :: (a -> b -> c) -> Db a -> Db b -> Db c #

(*>) :: Db a -> Db b -> Db b #

(<*) :: Db a -> Db b -> Db a #

MonadIO Db Source # 
Instance details

Defined in Traction.Control

Methods

liftIO :: IO a -> Db a #

MonadDb Db Source # 
Instance details

Defined in Traction.Control

Methods

liftDb :: Db a -> Db a Source #

newtype DbPool Source #

Constructors

DbPool 

Fields

class MonadIO m => MonadDb m where Source #

Methods

liftDb :: Db a -> m a Source #

Instances
MonadDb Db Source # 
Instance details

Defined in Traction.Control

Methods

liftDb :: Db a -> Db a Source #

MonadDb m => MonadDb (ExceptT e m) Source # 
Instance details

Defined in Traction.Control

Methods

liftDb :: Db a -> ExceptT e m a Source #

runDbT :: DbPool -> (DbError -> e) -> EitherT e Db a -> EitherT e IO a Source #

runDbWith :: DbPool -> WithTransaction -> Db a -> EitherT DbError IO a Source #

runDbWithT :: DbPool -> WithTransaction -> (DbError -> e) -> EitherT e Db a -> EitherT e IO a Source #