Safe Haskell | None |
---|---|
Language | Haskell2010 |
Types and typeclass for errors in Waargonaut decoding.
Synopsis
- data DecodeError
- class AsDecodeError r where
- _DecodeError :: Prism' r DecodeError
- _ConversionFailure :: Prism' r Text
- _TypeMismatch :: Prism' r JsonType
- _KeyDecodeFailed :: Prism' r ()
- _KeyNotFound :: Prism' r Text
- _FailedToMove :: Prism' r ZipperMove
- _NumberOutOfBounds :: Prism' r JNumber
- _InputOutOfBounds :: Prism' r Word64
- _ParseFailed :: Prism' r Text
- data Err c e
- = Parse e
- | Decode (DecodeError, c)
Documentation
data DecodeError Source #
Set of errors that may occur during the decode phase.
ConversionFailure Text | |
TypeMismatch JsonType | |
KeyDecodeFailed | |
KeyNotFound Text | |
FailedToMove ZipperMove | |
NumberOutOfBounds JNumber | |
InputOutOfBounds Word64 | |
ParseFailed Text |
Instances
class AsDecodeError r where Source #
Describes the sorts of errors that may be treated as a DecodeError
, for use with Prism
s.
_DecodeError :: Prism' r DecodeError Source #
_ConversionFailure :: Prism' r Text Source #
_TypeMismatch :: Prism' r JsonType Source #
_KeyDecodeFailed :: Prism' r () Source #
_KeyNotFound :: Prism' r Text Source #
_FailedToMove :: Prism' r ZipperMove Source #
_NumberOutOfBounds :: Prism' r JNumber Source #
_InputOutOfBounds :: Prism' r Word64 Source #
_ParseFailed :: Prism' r Text Source #