Skip to content

Commit

Permalink
New fail function
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed Oct 18, 2024
1 parent 84b04aa commit f82dfb9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Data/RdsData/Decode/Value.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ module Data.RdsData.Decode.Value
, uuid
, day

, fail

) where

import Amazonka.Data.Base64
Expand All @@ -54,7 +56,7 @@ import Data.Text (Text)
import Data.Time
import Data.UUID (UUID)
import Data.Word
import Prelude hiding (maybe, null)
import Prelude hiding (fail, maybe, null)

import qualified Amazonka.Data.ByteString as AWS
import qualified Data.Aeson as J
Expand Down Expand Up @@ -87,6 +89,10 @@ instance Monad DecodeValue where
a' <- a v
decodeValue (f a') v

fail :: Text -> DecodeValue a
fail =
DecodeValue . const . Left

--------------------------------------------------------------------------------

rdsValue :: DecodeValue Value
Expand Down

0 comments on commit f82dfb9

Please sign in to comment.