-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A safe transaction monad for use with various PostgreSQL Haskell libraries.
--
-- Please see the README on GitHub at
-- https://github.com/simspace/postgresql-tx#readme
@package postgresql-tx
@version 0.1.0.0
module Database.PostgreSQL.Tx
data TxM a
unsafeRunIOInTxM :: IO a -> TxM a
-- | Type class for converting an f to TxM given a
-- TxEnv.
class Tx (f :: * -> *) where {
-- | The runtime environment needed to convert f to TxM.
type family TxEnv f :: *;
}
-- | Converts an f to a TxM.
tx :: Tx f => TxEnv f -> f a -> TxM a
-- | Promote an unsafe io action to a safe t transaction
-- (will be some form of TxM).
class UnsafeTx (io :: * -> *) (t :: * -> *) | t -> io
-- | Converts an io action to a t, which will be some
-- form of TxM.
unsafeIOTx :: UnsafeTx io t => io a -> t a
-- | Promotes an unsafe io function to some ReaderT over
-- TxM.
unsafeReaderIOTx :: UnsafeTx (ReaderT r io) (ReaderT r t) => (r -> io a) -> ReaderT r t a
instance GHC.Base.Monad Database.PostgreSQL.Tx.TxM
instance GHC.Base.Applicative Database.PostgreSQL.Tx.TxM
instance GHC.Base.Functor Database.PostgreSQL.Tx.TxM
instance Database.PostgreSQL.Tx.UnsafeTx GHC.Types.IO Database.PostgreSQL.Tx.TxM
instance Database.PostgreSQL.Tx.UnsafeTx io t => Database.PostgreSQL.Tx.UnsafeTx (Control.Monad.Trans.Reader.ReaderT r io) (Control.Monad.Trans.Reader.ReaderT r t)
instance Database.PostgreSQL.Tx.Tx (Control.Monad.Trans.Reader.ReaderT r Database.PostgreSQL.Tx.TxM)
instance (TypeError ...) => Control.Monad.IO.Class.MonadIO Database.PostgreSQL.Tx.TxM