hpqtypes-1.5.1.1: 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 # 

Methods

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

((~) (* -> *) m n, MonadBaseControl b m) => MonadBaseControl b (DBT_ m n) Source # 

Associated Types

type StM (DBT_ m n :: * -> *) a :: * #

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, MonadError e m) => MonadError e (DBT_ m n) Source # 

Methods

throwError :: e -> DBT_ m n a #

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

((~) (* -> *) m n, MonadReader r m) => MonadReader r (DBT_ m n) Source # 

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, MonadState s m) => MonadState s (DBT_ m n) Source # 

Methods

get :: DBT_ m n s #

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

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

((~) (* -> *) m n, MonadWriter w m) => MonadWriter w (DBT_ m n) Source # 

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 #

MonadTrans (DBT_ m) Source # 

Methods

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

MonadTransControl (DBT_ m) Source # 

Associated Types

type StT (DBT_ m :: (* -> *) -> * -> *) a :: * #

Methods

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

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

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

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 # 

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 # 

Methods

pure :: a -> DBT_ m n a #

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

(*>) :: 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 # 

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 # 

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 # 

Methods

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

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

Methods

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

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

Methods

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

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

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 #

((~) (* -> *) m n, MonadBase IO m, MonadMask m) => MonadDB (DBT_ m n) Source # 
type StT (DBT_ m) a Source # 
type StT (DBT_ m) a
type StM (DBT_ m n) a Source # 
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.