HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulecborg-0.2.10.0Haskell2010

Codec.CBOR.FlatTerm

A simpler form than CBOR for writing out Encoding values that allows easier verification and testing. While this library primarily focuses on taking Encoding values (independent of any underlying format) and serializing them into CBOR format, this module offers an alternative format called FlatTerm for serializing Encoding values.

The FlatTerm form is very simple and internally mirrors the original Encoding type very carefully. The intention here is that once you have Encoding and Dec.Decoding values for your types, you can round-trip values through FlatTerm to catch bugs more easily and with a smaller amount of code to look through.

For that reason, this module is primarily useful for client libraries, and even then, only for their test suites to offer a simpler form for doing encoding tests and catching problems in an encoder and decoder.

  • 2 types
  • 4 values
  • Packagecborg-0.2.10.0
  • Exports6
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceFlatTerm.hs

Types

2 declarations
datadata TermToken
#
Instances3Eq, Ord, Show
  • Eq TermTokenDefined in cborg-0.2.10.0 · Codec.CBOR.FlatTerm
  • Ord TermTokenDefined in cborg-0.2.10.0 · Codec.CBOR.FlatTerm
  • Show TermTokenDefined in cborg-0.2.10.0 · Codec.CBOR.FlatTerm

Functions

4 declarations