Safe Haskell | None |
---|---|
Language | Haskell2010 |
We use IO in the representation of Transaction, but we don't want to allow arbitrary IO, only SQL queries. So keep it private.
Synopsis
- newtype Transaction a = Transaction (ExceptT QueryError (ReaderT Connection IO) a)
Documentation
newtype Transaction a Source #
A Transaction can only contain SQL queries (and pure functions).
Instances
Monad Transaction Source # | |
Defined in Preql.Effect.Internal (>>=) :: Transaction a -> (a -> Transaction b) -> Transaction b # (>>) :: Transaction a -> Transaction b -> Transaction b # return :: a -> Transaction a # | |
Functor Transaction Source # | |
Defined in Preql.Effect.Internal fmap :: (a -> b) -> Transaction a -> Transaction b # (<$) :: a -> Transaction b -> Transaction a # | |
Applicative Transaction Source # | |
Defined in Preql.Effect.Internal pure :: a -> Transaction a # (<*>) :: Transaction (a -> b) -> Transaction a -> Transaction b # liftA2 :: (a -> b -> c) -> Transaction a -> Transaction b -> Transaction c # (*>) :: Transaction a -> Transaction b -> Transaction b # (<*) :: Transaction a -> Transaction b -> Transaction a # | |
SqlQuery Transaction Source # | |