hpqtypes-1.6.1.0: Haskell bindings to libpqtypes

Safe HaskellNone
LanguageHaskell2010

Database.PostgreSQL.PQTypes.Internal.Monad

Synopsis

Documentation

newtype DBT_ m n a Source #

Monad transformer for adding database interaction capabilities to the underlying monad.

Constructors

DBT 

Fields

  • unDBT :: InnerDBT m n a
     
Instances
MonadBase b n => MonadBase b (DBT_ m n) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

Methods

liftBase :: b α -> DBT_ m n α #

(m ~ n, MonadBaseControl b m) => MonadBaseControl b (DBT_ m n) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

Associated Types

type StM (DBT_ m n) a :: Type #

Methods

liftBaseWith :: (RunInBase (DBT_ m n) b -> b a) -> DBT_ m n a #

restoreM :: StM (DBT_ m n) a -> DBT_ m n a #

(m ~ n, MonadWriter w m) => MonadWriter w (DBT_ m n) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

Methods

writer :: (a, w) -> DBT_ m n a #

tell :: w -> DBT_ m n () #

listen :: DBT_ m n a -> DBT_ m n (a, w) #

pass :: DBT_ m n (a, w -> w) -> DBT_ m n a #

(m ~ n, MonadState s m) => MonadState s (DBT_ m n) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

Methods

get :: DBT_ m n s #

put :: s -> DBT_ m n () #

state :: (s -> (a, s)) -> DBT_ m n a #

(m ~ n, MonadReader r m) => MonadReader r (DBT_ m n) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

Methods

ask :: DBT_ m n r #

local :: (r -> r) -> DBT_ m n a -> DBT_ m n a #

reader :: (r -> a) -> DBT_ m n a #

(m ~ n, MonadError e m) => MonadError e (DBT_ m n) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

Methods

throwError :: e -> DBT_ m n a #

catchError :: DBT_ m n a -> (e -> DBT_ m n a) -> DBT_ m n a #

MonadTrans (DBT_ m) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

Methods

lift :: Monad m0 => m0 a -> DBT_ m m0 a #

MonadTransControl (DBT_ m) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

Associated Types

type StT (DBT_ m) a :: Type #

Methods

liftWith :: Monad m0 => (Run (DBT_ m) -> m0 a) -> DBT_ m m0 a #

restoreT :: Monad m0 => m0 (StT (DBT_ m) a) -> DBT_ m m0 a #

Monad n => Monad (DBT_ m n) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

Methods

(>>=) :: DBT_ m n a -> (a -> DBT_ m n b) -> DBT_ m n b #

(>>) :: DBT_ m n a -> DBT_ m n b -> DBT_ m n b #

return :: a -> DBT_ m n a #

fail :: String -> DBT_ m n a #

Functor n => Functor (DBT_ m n) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

Methods

fmap :: (a -> b) -> DBT_ m n a -> DBT_ m n b #

(<$) :: a -> DBT_ m n b -> DBT_ m n a #

Monad n => Applicative (DBT_ m n) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

Methods

pure :: a -> DBT_ m n a #

(<*>) :: DBT_ m n (a -> b) -> DBT_ m n a -> DBT_ m n b #

liftA2 :: (a -> b -> c) -> DBT_ m n a -> DBT_ m n b -> DBT_ m n c #

(*>) :: DBT_ m n a -> DBT_ m n b -> DBT_ m n b #

(<*) :: DBT_ m n a -> DBT_ m n b -> DBT_ m n a #

MonadPlus n => Alternative (DBT_ m n) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

Methods

empty :: DBT_ m n a #

(<|>) :: DBT_ m n a -> DBT_ m n a -> DBT_ m n a #

some :: DBT_ m n a -> DBT_ m n [a] #

many :: DBT_ m n a -> DBT_ m n [a] #

MonadPlus n => MonadPlus (DBT_ m n) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

Methods

mzero :: DBT_ m n a #

mplus :: DBT_ m n a -> DBT_ m n a -> DBT_ m n a #

MonadIO n => MonadIO (DBT_ m n) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

Methods

liftIO :: IO a -> DBT_ m n a #

MonadThrow n => MonadThrow (DBT_ m n) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

Methods

throwM :: Exception e => e -> DBT_ m n a #

MonadCatch n => MonadCatch (DBT_ m n) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

Methods

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

MonadMask n => MonadMask (DBT_ m n) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

Methods

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

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

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

(m ~ n, MonadBase IO m, MonadMask m) => MonadDB (DBT_ m n) Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

type StT (DBT_ m) a Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

type StT (DBT_ m) a
type StM (DBT_ m n) a Source # 
Instance details

Defined in Database.PostgreSQL.PQTypes.Internal.Monad

type StM (DBT_ m n) a = ComposeSt (DBT_ m) m a

type DBT m = DBT_ m m Source #

runDBT :: (MonadBase IO m, MonadMask m) => ConnectionSourceM m -> TransactionSettings -> DBT m a -> m a Source #

Evaluate monadic action with supplied connection source and transaction settings.

mapDBT :: (DBState n -> DBState m) -> (m (a, DBState m) -> n (b, DBState n)) -> DBT m a -> DBT n b Source #

Transform the underlying monad.