traction-0.4.0: Tools for postgresql-simple.

Safe HaskellNone
LanguageHaskell2010

Traction.Control

Documentation

type Db = DbT IO Source #

newtype DbT m a Source #

Constructors

DbT 

Fields

Instances
MonadTrans DbT Source # 
Instance details

Defined in Traction.Control

Methods

lift :: Monad m => m a -> DbT m a #

Monad m => Monad (DbT m) Source # 
Instance details

Defined in Traction.Control

Methods

(>>=) :: DbT m a -> (a -> DbT m b) -> DbT m b #

(>>) :: DbT m a -> DbT m b -> DbT m b #

return :: a -> DbT m a #

fail :: String -> DbT m a #

Functor m => Functor (DbT m) Source # 
Instance details

Defined in Traction.Control

Methods

fmap :: (a -> b) -> DbT m a -> DbT m b #

(<$) :: a -> DbT m b -> DbT m a #

Monad m => Applicative (DbT m) Source # 
Instance details

Defined in Traction.Control

Methods

pure :: a -> DbT m a #

(<*>) :: DbT m (a -> b) -> DbT m a -> DbT m b #

liftA2 :: (a -> b -> c) -> DbT m a -> DbT m b -> DbT m c #

(*>) :: DbT m a -> DbT m b -> DbT m b #

(<*) :: DbT m a -> DbT m b -> DbT m a #

MonadIO m => MonadIO (DbT m) Source # 
Instance details

Defined in Traction.Control

Methods

liftIO :: IO a -> DbT m a #

MonadThrow m => MonadThrow (DbT m) Source # 
Instance details

Defined in Traction.Control

Methods

throwM :: Exception e => e -> DbT m a #

MonadCatch m => MonadCatch (DbT m) Source # 
Instance details

Defined in Traction.Control

Methods

catch :: Exception e => DbT m a -> (e -> DbT m a) -> DbT m a #

MonadMask m => MonadMask (DbT m) Source # 
Instance details

Defined in Traction.Control

Methods

mask :: ((forall a. DbT m a -> DbT m a) -> DbT m b) -> DbT m b #

uninterruptibleMask :: ((forall a. DbT m a -> DbT m a) -> DbT m b) -> DbT m b #

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

MonadIO m => MonadDb (DbT m) Source # 
Instance details

Defined in Traction.Control

Methods

liftDb :: DbT IO a -> DbT m a Source #

MFunctor DbT Source # 
Instance details

Defined in Traction.Control

Methods

hoist :: Monad m => (forall a. m a -> n a) -> DbT m b -> DbT n b #

type Tracer = Text -> IO () Source #

newtype DbPool Source #

Constructors

DbPool 

Fields

class MonadIO m => MonadDb m where Source #

Methods

liftDb :: DbT IO a -> m a Source #

Instances
MonadIO m => MonadDb (DbT m) Source # 
Instance details

Defined in Traction.Control

Methods

liftDb :: DbT IO a -> DbT m a Source #

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

Defined in Traction.Control

Methods

liftDb :: DbT IO 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 #

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

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

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

withTracing :: Tracer -> DbT m () -> DbT m () Source #

trace :: (MonadDb m, Show a) => a -> m () Source #