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
- _KeyDecodeFailed :: Prism' r Text
- _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 | |
KeyDecodeFailed Text | |
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 lens
.
_DecodeError :: Prism' r DecodeError Source #
_ConversionFailure :: Prism' r Text Source #
_KeyDecodeFailed :: Prism' r Text 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 #