HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

  • Packageserialise-0.2.6.1
  • Exports43
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceDecoding.hs

Decode primitive operations

newtypenewtype Decoder s a

A continuation-based decoder, used for decoding values that were previously encoded using the Codec.CBOR.Encoding module. As Decoder has a Monad instance, you can easily write Decoders monadically for building your deserialisation logic.

Instances4Monad, Functor, MonadFail, Applicative
datadata DecodeAction s a

An action, representing a step for a decoder to taken and a continuation to invoke with the expected value.

Constructors

Read input tokens

Decode a textual string as UTF-8 encoded ByteArray. Note that the result is not validated to be well-formed UTF-8.

Also note that this will eagerly copy the content out of the input to ensure that the input does not leak in the event that the ByteArray is live but not forced.

Specialised Read input token operations

Branching operations

Attempt to decode a token for the length of a finite, known list, or an indefinite list. If Nothing is returned, then an indefinite length list occurs afterwords. If Just x is returned, then a list of length x is encoded.

Attempt to decode a token for the length of a finite, known map, or an indefinite map. If Nothing is returned, then an indefinite length map occurs afterwords. If Just x is returned, then a map of length x is encoded.

Inspecting the token type

datadata TokenType
Instances5Bounded, Enum, Eq, Ord, Show

Special operations

Sequence operations