Add MonadFail for Composite

This commit is contained in:
Nikita Volkov 2020-06-13 13:33:02 +03:00
parent 64c3a0eed1
commit 33fc524e57
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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