mirror of
https://github.com/nikita-volkov/hasql.git
synced 2024-12-26 12:01:35 +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).
|
||||
-}
|
||||
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.
|
||||
|
@ -6,7 +6,7 @@ import qualified PostgreSQL.Binary.Decoding as A
|
||||
|
||||
newtype Composite a =
|
||||
Composite (ReaderT Bool A.Composite a)
|
||||
deriving (Functor, Applicative, Monad)
|
||||
deriving (Functor, Applicative, Monad, MonadFail)
|
||||
|
||||
{-# INLINE run #-}
|
||||
run :: Composite a -> Bool -> A.Value a
|
||||
|
Loading…
Reference in New Issue
Block a user