mirror of
https://github.com/nikita-volkov/hasql.git
synced 2024-12-26 20:12:09 +03:00
Add MonadFail for Composite
This commit is contained in:
parent
64c3a0eed1
commit
33fc524e57
@ -458,7 +458,7 @@ element = \ case
|
|||||||
Composable decoder of composite values (rows, records).
|
Composable decoder of composite values (rows, records).
|
||||||
-}
|
-}
|
||||||
newtype Composite a = Composite (Composite.Composite a)
|
newtype Composite a = Composite (Composite.Composite a)
|
||||||
deriving (Functor, Applicative, Monad)
|
deriving (Functor, Applicative, Monad, MonadFail)
|
||||||
|
|
||||||
{-|
|
{-|
|
||||||
Lift a 'Value' decoder into a 'Composite' decoder for parsing of component values.
|
Lift a 'Value' decoder into a 'Composite' decoder for parsing of component values.
|
||||||
|
@ -6,7 +6,7 @@ import qualified PostgreSQL.Binary.Decoding as A
|
|||||||
|
|
||||||
newtype Composite a =
|
newtype Composite a =
|
||||||
Composite (ReaderT Bool A.Composite a)
|
Composite (ReaderT Bool A.Composite a)
|
||||||
deriving (Functor, Applicative, Monad)
|
deriving (Functor, Applicative, Monad, MonadFail)
|
||||||
|
|
||||||
{-# INLINE run #-}
|
{-# INLINE run #-}
|
||||||
run :: Composite a -> Bool -> A.Value a
|
run :: Composite a -> Bool -> A.Value a
|
||||||
|
Loading…
Reference in New Issue
Block a user