traction-0.2.1: 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 #

MonadThrow Db Source # 
Instance details

Defined in Traction.Control

Methods

throwM :: Exception e => e -> Db a #

MonadCatch Db Source # 
Instance details

Defined in Traction.Control

Methods

catch :: Exception e => Db a -> (e -> Db a) -> Db a #

MonadMask Db Source # 
Instance details

Defined in Traction.Control

Methods

mask :: ((forall a. Db a -> Db a) -> Db b) -> Db b #

uninterruptibleMask :: ((forall a. Db a -> Db a) -> Db b) -> Db b #

generalBracket :: Db a -> (a -> ExitCase b -> Db c) -> (a -> Db b) -> Db (b, c) #

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 #