| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
IPLD.DagCBOR.Decoder.Errors
Description
Synopsis
- type Okay = Either Error
- data Error
- type DecoderMethod item bxc = DecoderMethod item bxc Okay Result
- type DecoderRoutine bxc = DecoderMethod () bxc
- data Result obj bxc = Result obj bxc
- pattern Finish :: forall bxc. bxc -> Result () bxc
Functor for wrapping results w/ error.
Error constructors
Provides errors for parsing major-type arguments.
Constructors
| EmptyAlternative | Used to implement the empty in |
| TrailingBytes | When the file was parsed with trailing bytes. |
| Indefinite | When a collection is marked indefinite. |
| NotDefined | When the undefined simple value is given. |
| InvalidTag | When an invalid tag id is given. |
| InvalidIEEE754 | When -∞, ∞, or NaN is encountered, these are not supported. |
| ReservedParam | For parameters marked reserved in RFC-8949. |
| Fragmented | When a section of data expects more, but there is none, leaving gaps. |
| UnexpectedStop | When the decoder finished unexpectedly. |
| UnexpectedValue | When some identifier is expected, but another is found. |
| DowncastFailed | When converting CBOR IntData to smaller values fail. |
| NotMinimal | For integers that aren't minimally encoded. |
| NotStringKey | When the major-type for a map isn't a string. IPLD forbids this. |
| NotUniqueKey | When two or more of the keys in a CBOR map are not unique. |
| NotSortedMap | IPLD forbids maps with non-lexographically sorted strings. |
| CIDError Error | Passes CID operation errors. |
| NotImplemented String | Marks unimplemented feature of DAG-CBOR and developement assertions. |
For resolving items and changing decoder data.
type DecoderMethod item bxc = DecoderMethod item bxc Okay Result Source #
Short hand for data model DecoderMethod in DagCBOR.
type DecoderRoutine bxc = DecoderMethod () bxc Source #
Short hand for a DecoderMethod with a Null Result item.