Modulecardano-ledger-binary-1.9.1.0
Cardano.Ledger.Binary.Plain
- 13 types
- 2 classes
- 191 values
- Packagecardano-ledger-binary-1.9.1.0
- Exports206
- LicenceApache-2.0
- SourceDecoding.hs
Deprecated. In favor of decodeMaybe
Deprecated. Use serialize' instead, since Encoding has ToCBOR instance
Deprecated. In favor of encodeMaybe
Deprecated. Use decodeFixedSized instead
Deprecated. Use decodeFixedSized instead
Deprecated. Use decodeFixedSized instead
Deprecated. Use decodeFixedSized instead
Deprecated. Use encodeFixedSized instead
Deprecated. Use encodeFixedSized instead
Deprecated. Use encodeFixedSized instead
Deprecated. Use encodeFixedSized instead
Deprecated. Use decodeFixedSized instead
decodeSignKeyKES :: (UnsoundKESAlgorithm v, MonadST m, MonadThrow m) => Decoder s (m (Maybe (SignKeyKES v)))Deprecated. Use decodeFixedSized instead
Deprecated. Use decodeFixedSized instead
Deprecated. Use encodeFixedSized instead
Deprecated. Use encodeFixedSized instead
Deprecated. Use encodeFixedSized instead
Deprecated. Use decodeFixedSized instead
Deprecated. Use decodeFixedSized instead
Deprecated. Use decodeFixedSized instead
Deprecated. Use encodeFixedSized instead
Deprecated. Use encodeFixedSized instead
Deprecated. Use encodeFixedSized instead
Decode a bool.
Decode a string of bytes as a ByteString.
Decode canonical representation of a string of bytes as a ByteString.
Decode a token marking the beginning of an indefinite length set of bytes.
Decode a Double.
Decode canonical representation of a Double.
Decode a Float.
Decode canonical representation of a half-precision Float.
Decode canonical representation of a Float.
Decode an Int.
Decode an Int16.
Decode canonical representation of an Int16.
Decode an Int32.
Decode canonical representation of an Int32.
Decode an Int64.
Decode canonical representation of an Int64.
Decode an Int8.
Decode canonical representation of an Int8.
Decode canonical representation of an Int.
Decode an Integer.
Decode canonical representation of an Integer.
Decode the length of a list.
Decode canonical representation of the length of a list.
Attempt to decode canonical representation of a list length using decodeListLenCanonical, and ensure it is exactly the specified length, or fail.
Decode a token marking the beginning of a list of indefinite length.
Attempt to decode a list length using decodeListLen, and ensure it is exactly the specified length, or fail.
Decode the length of a map.
Decode canonical representation of the length of a map.
Decode a token marking the beginning of a map of indefinite length.
Decode a negative Word.
Decode a negative Word64.
Decode canonical representation of a negative Word64.
Decode canonical representation of a negative Word.
Decode a nullary value, and return a unit value.
Decode an indefinite sequence length.
Decode a sequence length.
Decode a simple CBOR value and give back a Word8. You
probably don't ever need to use this.
Decode canonical representation of a simple CBOR value and give back a
Word8. You probably don't ever need to use this.
Decode a textual string as a piece of Text.
Decode canonical representation of a textual string as a piece of Text.
Decode a token marking the beginning of an indefinite length string.
Decode an arbitrary tag and return it as a Word.
Decode an arbitrary 64-bit tag and return it as a Word64.
Decode canonical representation of an arbitrary 64-bit tag and return it as a Word64.
Decode canonical representation of an arbitrary tag and return it as a Word.
Decode canonical representation of 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.
This captures the pattern of getting the byte offsets before and after decoding a subterm.
!before <- peekByteOffset
x <- decode
!after <- peekByteOffsetDecode a Word.
Decode a Word16.
Decode canonical representation of a Word16.
Decode a Word32.
Decode canonical representation of a Word32.
Decode a Word64.
Decode canonical representation of a Word64.
Decode a Word8.
Decode canonical representation of a Word8.
Decode canonical representation of a Word.
Attempt to decode canonical representation of a word with decodeWordCanonical, and ensure the word is exactly as expected, or fail.
Attempt to decode a word with decodeWord, and ensure the word is exactly as expected, or fail.
Given a Decoder, give us the DecodeAction
Lift an ST action into a Decoder. Useful for, e.g., leveraging
in-place mutation to efficiently build a deserialised value.
Peek and return the length of the current buffer that we're running our decoder on.
Get the current ByteOffset in the input byte sequence of the Decoder.
The Decoder does not provide any facility to get at the input data directly (since that is tricky with an incremental decoder). The next best is this primitive which can be used to keep track of the offset within the input bytes that makes up the encoded form of a term.
By keeping track of the byte offsets before and after decoding a subterm (a pattern captured by decodeWithByteSpan) and if the overall input data is retained then this is enables later retrieving the span of bytes for the subterm.
Peek at the current token we're about to decode, and return a TokenType specifying what it is.
Encode a Bool.
Encode a 'break', used to specify the end of indefinite length objects like maps or lists.
Encode a bytestring in a flattened format.
Encode an arbitrary strict ByteString in a flattened format.
Encode a token specifying the beginning of a string of bytes of indefinite length. In reality, this specifies a stream of many occurrences of encodeBytes, each specifying a single chunk of the overall string. After all the bytes desired have been encoded, you should follow it with a break token (see encodeBreak).
Encode a Double in a flattened format.
Encode a full precision Float in a flattened format.
Encode a small 16-bit Float in a flattened format.
Encode an Int in a flattened format.
Encode an Int16 in a flattened format.
Encode an Int32 in a flattened format.
Encode an @Int64 in a flattened format.
Encode an Int8 in a flattened format.
Encode an arbitrarily large @Integer in a flattened format.
Encode the length of a list, used to indicate that the following tokens represent the list values.
Encode a token specifying that this is the beginning of an indefinite list of unknown size. Tokens representing the list are expected afterwords, followed by a break token (see encodeBreak) when the list has ended.
Encode the length of a Map, used to indicate that the following tokens represent the map values.
Encode a token specifying that this is the beginning of an indefinite map of unknown size. Tokens representing the map are expected afterwords, followed by a break token (see encodeBreak) when the map has ended.
Encode a Null value.
Include pre-encoded valid CBOR data into the Encoding.
The data is included into the output as-is without any additional wrapper.
This should be used with care. The data must be a valid CBOR encoding, but this is not checked.
This is useful when you have CBOR data that you know is already valid, e.g. previously validated and stored on disk, and you wish to include it without having to decode and re-encode it.
Encode a 'simple' CBOR token that can be represented with an 8-bit word. You probably don't ever need this.
Encode a Text in a flattened format.
Encode the beginning of an indefinite string.
Encode an arbitrary Word tag.
Encode an arbitrary 64-bit Word64 tag.
Encode an Undef value.
Encode a UTF-8 string in a flattened format. Note that the contents is not validated to be well-formed UTF-8.
Encode a Word in a flattened format.
Encode a Word16 in a flattened format.
Encode a Word32 in a flattened format.
Encode a Word64 in a flattened format.
Encode a Word8 in a flattened format.
Decode some arbitrary CBOR value into a Term.
Turn an Encoding into a strict ByteString in CBOR binary format.
Instances5Eq, Show, Exception, NFData, Buildable
Eq DecoderErrorDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORShow DecoderErrorDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORException DecoderErrorDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORNFData DecoderErrorDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORBuildable DecoderErrorDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBOR
Instances119FromCBOR, …
FromCBOR ByteArrayDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR ByteStringDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR ByteStringDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR ShortByteStringDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR IPv4Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR IPv6Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR MessageHashDefined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.EcdsaSecp256k1FromCBOR PointDefined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.VRF.SimpleFromCBOR ProofDefined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosFromCBOR SignKeyDefined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosFromCBOR VerKeyDefined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosFromCBOR ProofDefined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosBatchCompatFromCBOR SignKeyDefined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosBatchCompatFromCBOR VerKeyDefined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosBatchCompatFromCBOR VersionDefined in cardano-ledger-binary-1.9.1.0 · Cardano.Ledger.Binary.VersionFromCBOR BlockNoDefined in cardano-slotting-0.2.2.0 · Cardano.Slotting.BlockFromCBOR EpochIntervalDefined in cardano-slotting-0.2.2.0 · Cardano.Slotting.SlotFromCBOR EpochNoDefined in cardano-slotting-0.2.2.0 · Cardano.Slotting.SlotFromCBOR EpochSizeDefined in cardano-slotting-0.2.2.0 · Cardano.Slotting.SlotFromCBOR SlotIntervalDefined in cardano-slotting-0.2.2.0 · Cardano.Slotting.SlotFromCBOR SlotNoDefined in cardano-slotting-0.2.2.0 · Cardano.Slotting.SlotFromCBOR RelativeTimeDefined in cardano-slotting-0.2.2.0 · Cardano.Slotting.TimeFromCBOR SlotLengthDefined in cardano-slotting-0.2.2.0 · Cardano.Slotting.TimeFromCBOR SystemStartDefined in cardano-slotting-0.2.2.0 · Cardano.Slotting.TimeFromCBOR ByteArrayDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR TermTokenDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR TermDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR VoidDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR IntegerDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR NaturalDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR Int32Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR Int64Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR RationalDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR BoolDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR DoubleDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR FloatDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR IntDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR WordDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR Word16Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR Word32Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR Word64Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR Word8Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR TextDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR UTCTimeDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR ()Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR (SigDSIGN EcdsaSecp256k1DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.EcdsaSecp256k1FromCBOR (SigDSIGN Ed25519DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.Ed25519FromCBOR (SigDSIGN Ed448DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.Ed448FromCBOR (SigDSIGN MockDSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.MockFromCBOR (SigDSIGN SchnorrSecp256k1DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.SchnorrSecp256k1FromCBOR (SignKeyDSIGN EcdsaSecp256k1DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.EcdsaSecp256k1FromCBOR (SignKeyDSIGN Ed25519DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.Ed25519FromCBOR (SignKeyDSIGN Ed448DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.Ed448FromCBOR (SignKeyDSIGN MockDSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.MockFromCBOR (SignKeyDSIGN SchnorrSecp256k1DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.SchnorrSecp256k1FromCBOR (VerKeyDSIGN EcdsaSecp256k1DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.EcdsaSecp256k1FromCBOR (VerKeyDSIGN Ed25519DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.Ed25519FromCBOR (VerKeyDSIGN Ed448DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.Ed448FromCBOR (VerKeyDSIGN MockDSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.MockFromCBOR (VerKeyDSIGN SchnorrSecp256k1DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.SchnorrSecp256k1FromCBOR (CertVRF MockVRF)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.VRF.MockFromCBOR (CertVRF SimpleVRF)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.VRF.SimpleFromCBOR (CertVRF PraosVRF)Defined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosFromCBOR (CertVRF PraosBatchCompatVRF)Defined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosBatchCompatFromCBOR (SignKeyVRF MockVRF)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.VRF.MockFromCBOR (SignKeyVRF SimpleVRF)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.VRF.SimpleFromCBOR (SignKeyVRF PraosVRF)Defined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosFromCBOR (SignKeyVRF PraosBatchCompatVRF)Defined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosBatchCompatFromCBOR (VerKeyVRF MockVRF)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.VRF.MockFromCBOR (VerKeyVRF SimpleVRF)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.VRF.SimpleFromCBOR (VerKeyVRF PraosVRF)Defined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosFromCBOR (VerKeyVRF PraosBatchCompatVRF)Defined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosBatchCompatFromCBOR a => FromCBOR (StrictMaybe a)Defined in cardano-strict-containers-0.1.6.0 · Data.Maybe.StrictFromCBOR a => FromCBOR (StrictSeq a)Defined in cardano-strict-containers-0.1.6.0 · Data.Sequence.StrictFromCBOR a => FromCBOR (Seq a)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR a => FromCBOR (NonEmpty a)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR a => FromCBOR (Maybe a)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR a => FromCBOR (Vector a)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORFromCBOR a => FromCBOR [a]Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORBLS12381CurveConstraints curve => FromCBOR (SigDSIGN (BLS12381DSIGN curve))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.BLS12381.InternalBLS12381CurveConstraints curve => FromCBOR (SignKeyDSIGN (BLS12381DSIGN curve))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.BLS12381.InternalBLS12381CurveConstraints curve => FromCBOR (VerKeyDSIGN (BLS12381DSIGN curve))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.BLS12381.InternalDSIGNMAlgorithm d => FromCBOR (SigKES (SingleKES d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.SingleDSIGNMAlgorithm d => FromCBOR (VerKeyKES (SingleKES d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.SingleUnsoundDSIGNMAlgorithm d => FromCBOR (UnsoundPureSignKeyKES (SingleKES d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.SingleTypeable v => FromCBOR (OutputVRF v)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.VRF.ClassTypeError ('TextDefined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.Ed25519"CBOR decoding would violate mlocking guarantees"
) => FromCBOR (SignKeyDSIGNM Ed25519DSIGN)KnownNat n => FromCBOR (PackedBytes n)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.PackedBytes.InternalKnownNat n => FromCBOR (PinnedSizedBytes n)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.PinnedSizedBytesKnownNat t => FromCBOR (SigKES (MockKES t))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.MockKnownNat t => FromCBOR (UnsoundPureSignKeyKES (MockKES t))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.MockKnownNat t => FromCBOR (VerKeyKES (MockKES t))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.Mock(BLS12381CurveConstraints curve, KnownNat (CompressedPointSize (DualCurve curve) + CompressedPointSize (DualCurve curve))) => FromCBOR (PossessionProofDSIGN (BLS12381DSIGN curve))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.BLS12381.Internal(DSIGNMAlgorithm d, KnownNat (SigSizeDSIGN d + VerKeySizeDSIGN d)) => FromCBOR (VerKeyKES (CompactSingleKES d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.CompactSingle(DSIGNMAlgorithm d, KnownNat (SigSizeKES (CompactSingleKES d))) => FromCBOR (SigKES (CompactSingleKES d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.CompactSingle(DSIGNMAlgorithm d, KnownNat t, KnownNat (SeedSizeDSIGN d * t), KnownNat (VerKeySizeDSIGN d * t), KnownNat (SignKeySizeDSIGN d * t)) => FromCBOR (SigKES (SimpleKES d t))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.Simple(DSIGNMAlgorithm d, KnownNat t, KnownNat (SeedSizeDSIGN d * t), KnownNat (VerKeySizeDSIGN d * t), KnownNat (SignKeySizeDSIGN d * t)) => FromCBOR (VerKeyKES (SimpleKES d t))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.Simple(UnsoundDSIGNMAlgorithm d, KnownNat (SigSizeDSIGN d + VerKeySizeDSIGN d)) => FromCBOR (UnsoundPureSignKeyKES (CompactSingleKES d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.CompactSingle(HashSize h ~ SeedSizeKES d, OptimizedKESAlgorithm d, UnsoundPureKESAlgorithm d, SodiumHashAlgorithm h, KESAlgorithm (CompactSumKES h d)) => FromCBOR (UnsoundPureSignKeyKES (CompactSumKES h d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.CompactSum(HashSize h ~ SeedSizeKES d, UnsoundPureKESAlgorithm d, SodiumHashAlgorithm h, KESAlgorithm (SumKES h d)) => FromCBOR (UnsoundPureSignKeyKES (SumKES h d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.Sum(KESAlgorithm (SumKES h d), SodiumHashAlgorithm h, HashSize h ~ SeedSizeKES d) => FromCBOR (SigKES (SumKES h d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.Sum(KESAlgorithm (SumKES h d), SodiumHashAlgorithm h, HashSize h ~ SeedSizeKES d) => FromCBOR (VerKeyKES (SumKES h d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.Sum(OptimizedKESAlgorithm d, SodiumHashAlgorithm h, HashSize h ~ SeedSizeKES d, NoThunks (VerKeyKES (CompactSumKES h d)), KESAlgorithm (CompactSumKES h d)) => FromCBOR (SigKES (CompactSumKES h d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.CompactSum(OptimizedKESAlgorithm d, SodiumHashAlgorithm h, HashSize h ~ SeedSizeKES d, NoThunks (VerKeyKES (CompactSumKES h d)), KESAlgorithm (CompactSumKES h d)) => FromCBOR (VerKeyKES (CompactSumKES h d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.CompactSum(Ord a, FromCBOR a) => FromCBOR (Set a)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBOR(Serialise t, Typeable t) => FromCBOR (WithOrigin t)Defined in cardano-slotting-0.2.2.0 · Cardano.Slotting.SlotTypeable a => FromCBOR (Fixed a)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBOR(FromCBOR a, FromCBOR b) => FromCBOR (Either a b)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBOR(FromCBOR a, FromCBOR b) => FromCBOR (a, b)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBOR(HashAlgorithm h, Typeable a) => FromCBOR (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Class(VRFAlgorithm v, Typeable a) => FromCBOR (CertifiedVRF v a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.VRF.Class(Ord k, FromCBOR k, FromCBOR v) => FromCBOR (Map k v)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBOR(FromCBOR a, FromCBOR b, FromCBOR c) => FromCBOR (a, b, c)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBOR(Typeable s, FromCBOR a) => FromCBOR (Tagged s a)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBOR(FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d) => FromCBOR (a, b, c, d)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBOR(FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d, FromCBOR e) => FromCBOR (a, b, c, d, e)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBOR(FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d, FromCBOR e, FromCBOR f) => FromCBOR (a, b, c, d, e, f)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBOR(FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d, FromCBOR e, FromCBOR f, FromCBOR g) => FromCBOR (a, b, c, d, e, f, g)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBOR(FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d, FromCBOR e, FromCBOR f, FromCBOR g, FromCBOR h) => FromCBOR (a, b, c, d, e, f, g, h)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBOR
Constructors
LengthOf xs
Constructors
SizeConstant SizeSizeExpression ((forall a. ToCBOR a => Proxy a -> Size) -> Size)SelectCases [Text]
Instances122ToCBOR, …
ToCBOR ByteArrayDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR ByteStringDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR ByteStringDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR ShortByteStringDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR IPv4Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR IPv6Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR MessageHashDefined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.EcdsaSecp256k1ToCBOR PointDefined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.VRF.SimpleToCBOR ProofDefined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosToCBOR SignKeyDefined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosToCBOR VerKeyDefined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosToCBOR ProofDefined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosBatchCompatToCBOR SignKeyDefined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosBatchCompatToCBOR VerKeyDefined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosBatchCompatToCBOR VersionDefined in cardano-ledger-binary-1.9.1.0 · Cardano.Ledger.Binary.VersionToCBOR BlockNoDefined in cardano-slotting-0.2.2.0 · Cardano.Slotting.BlockToCBOR EpochIntervalDefined in cardano-slotting-0.2.2.0 · Cardano.Slotting.SlotToCBOR EpochNoDefined in cardano-slotting-0.2.2.0 · Cardano.Slotting.SlotToCBOR EpochSizeDefined in cardano-slotting-0.2.2.0 · Cardano.Slotting.SlotToCBOR SlotIntervalDefined in cardano-slotting-0.2.2.0 · Cardano.Slotting.SlotToCBOR SlotNoDefined in cardano-slotting-0.2.2.0 · Cardano.Slotting.SlotToCBOR RelativeTimeDefined in cardano-slotting-0.2.2.0 · Cardano.Slotting.TimeToCBOR SlotLengthDefined in cardano-slotting-0.2.2.0 · Cardano.Slotting.TimeToCBOR SystemStartDefined in cardano-slotting-0.2.2.0 · Cardano.Slotting.TimeToCBOR ByteArrayDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR EncodingDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR TermDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR VoidDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR IntegerDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR NaturalDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR Int32Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR Int64Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR BoolDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR DoubleDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR FloatDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR IntDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR WordDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR Word16Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR Word32Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR Word64Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR Word8Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR DataDefined in cardano-ledger-binary-1.9.1.0 · Cardano.Ledger.Binary.Encoding.EncCBOR · orphanToCBOR TextDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR UTCTimeDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR ()Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR (SigDSIGN EcdsaSecp256k1DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.EcdsaSecp256k1ToCBOR (SigDSIGN Ed25519DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.Ed25519ToCBOR (SigDSIGN Ed448DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.Ed448ToCBOR (SigDSIGN MockDSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.MockToCBOR (SigDSIGN SchnorrSecp256k1DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.SchnorrSecp256k1ToCBOR (SignKeyDSIGN EcdsaSecp256k1DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.EcdsaSecp256k1ToCBOR (SignKeyDSIGN Ed25519DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.Ed25519ToCBOR (SignKeyDSIGN Ed448DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.Ed448ToCBOR (SignKeyDSIGN MockDSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.MockToCBOR (SignKeyDSIGN SchnorrSecp256k1DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.SchnorrSecp256k1ToCBOR (VerKeyDSIGN EcdsaSecp256k1DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.EcdsaSecp256k1ToCBOR (VerKeyDSIGN Ed25519DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.Ed25519ToCBOR (VerKeyDSIGN Ed448DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.Ed448ToCBOR (VerKeyDSIGN MockDSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.MockToCBOR (VerKeyDSIGN SchnorrSecp256k1DSIGN)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.SchnorrSecp256k1ToCBOR (CertVRF MockVRF)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.VRF.MockToCBOR (CertVRF SimpleVRF)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.VRF.SimpleToCBOR (CertVRF PraosVRF)Defined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosToCBOR (CertVRF PraosBatchCompatVRF)Defined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosBatchCompatToCBOR (SignKeyVRF MockVRF)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.VRF.MockToCBOR (SignKeyVRF SimpleVRF)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.VRF.SimpleToCBOR (SignKeyVRF PraosVRF)Defined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosToCBOR (SignKeyVRF PraosBatchCompatVRF)Defined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosBatchCompatToCBOR (VerKeyVRF MockVRF)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.VRF.MockToCBOR (VerKeyVRF SimpleVRF)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.VRF.SimpleToCBOR (VerKeyVRF PraosVRF)Defined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosToCBOR (VerKeyVRF PraosBatchCompatVRF)Defined in cardano-crypto-praos-2.2.4.0 · Cardano.Crypto.VRF.PraosBatchCompatToCBOR a => ToCBOR (StrictMaybe a)Defined in cardano-strict-containers-0.1.6.0 · Data.Maybe.StrictToCBOR a => ToCBOR (StrictSeq a)Defined in cardano-strict-containers-0.1.6.0 · Data.Sequence.StrictToCBOR a => ToCBOR (Seq a)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR a => ToCBOR (NonEmpty a)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR a => ToCBOR (Maybe a)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR a => ToCBOR (Ratio a)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR a => ToCBOR (Vector a)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORToCBOR a => ToCBOR [a]Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORBLS12381CurveConstraints curve => ToCBOR (SigDSIGN (BLS12381DSIGN curve))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.BLS12381.InternalBLS12381CurveConstraints curve => ToCBOR (SignKeyDSIGN (BLS12381DSIGN curve))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.BLS12381.InternalBLS12381CurveConstraints curve => ToCBOR (VerKeyDSIGN (BLS12381DSIGN curve))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.BLS12381.InternalDSIGNMAlgorithm d => ToCBOR (SigKES (SingleKES d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.SingleDSIGNMAlgorithm d => ToCBOR (VerKeyKES (SingleKES d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.SingleUnsoundDSIGNMAlgorithm d => ToCBOR (UnsoundPureSignKeyKES (SingleKES d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.SingleTypeable v => ToCBOR (OutputVRF v)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.VRF.ClassTypeable xs => ToCBOR (LengthOf xs)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORTypeError ('TextDefined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.Ed25519"CBOR encoding would violate mlocking guarantees"
) => ToCBOR (SignKeyDSIGNM Ed25519DSIGN)KnownNat n => ToCBOR (PackedBytes n)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.PackedBytes.InternalKnownNat n => ToCBOR (PinnedSizedBytes n)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.PinnedSizedBytesKnownNat t => ToCBOR (SigKES (MockKES t))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.MockKnownNat t => ToCBOR (UnsoundPureSignKeyKES (MockKES t))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.MockKnownNat t => ToCBOR (VerKeyKES (MockKES t))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.Mock(BLS12381CurveConstraints curve, KnownNat (CompressedPointSize (DualCurve curve) + CompressedPointSize (DualCurve curve))) => ToCBOR (PossessionProofDSIGN (BLS12381DSIGN curve))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.DSIGN.BLS12381.Internal(DSIGNMAlgorithm d, KnownNat (SigSizeDSIGN d + VerKeySizeDSIGN d)) => ToCBOR (VerKeyKES (CompactSingleKES d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.CompactSingle(DSIGNMAlgorithm d, KnownNat (SigSizeKES (CompactSingleKES d))) => ToCBOR (SigKES (CompactSingleKES d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.CompactSingle(DSIGNMAlgorithm d, KnownNat t, KnownNat (SeedSizeDSIGN d * t), KnownNat (VerKeySizeDSIGN d * t), KnownNat (SignKeySizeDSIGN d * t)) => ToCBOR (SigKES (SimpleKES d t))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.Simple(DSIGNMAlgorithm d, KnownNat t, KnownNat (SeedSizeDSIGN d * t), KnownNat (VerKeySizeDSIGN d * t), KnownNat (SignKeySizeDSIGN d * t)) => ToCBOR (VerKeyKES (SimpleKES d t))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.Simple(UnsoundDSIGNMAlgorithm d, KnownNat (SigSizeDSIGN d + VerKeySizeDSIGN d)) => ToCBOR (UnsoundPureSignKeyKES (CompactSingleKES d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.CompactSingle(HashSize h ~ SeedSizeKES d, OptimizedKESAlgorithm d, UnsoundPureKESAlgorithm d, SodiumHashAlgorithm h, KESAlgorithm (CompactSumKES h d)) => ToCBOR (UnsoundPureSignKeyKES (CompactSumKES h d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.CompactSum(HashSize h ~ SeedSizeKES d, UnsoundPureKESAlgorithm d, SodiumHashAlgorithm h, KESAlgorithm (SumKES h d)) => ToCBOR (UnsoundPureSignKeyKES (SumKES h d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.Sum(KESAlgorithm (SumKES h d), SodiumHashAlgorithm h, HashSize h ~ SeedSizeKES d) => ToCBOR (SigKES (SumKES h d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.Sum(KESAlgorithm (SumKES h d), SodiumHashAlgorithm h, HashSize h ~ SeedSizeKES d) => ToCBOR (VerKeyKES (SumKES h d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.Sum(OptimizedKESAlgorithm d, SodiumHashAlgorithm h, HashSize h ~ SeedSizeKES d, NoThunks (VerKeyKES (CompactSumKES h d)), KESAlgorithm (CompactSumKES h d)) => ToCBOR (SigKES (CompactSumKES h d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.CompactSum(OptimizedKESAlgorithm d, SodiumHashAlgorithm h, HashSize h ~ SeedSizeKES d, NoThunks (VerKeyKES (CompactSumKES h d)), KESAlgorithm (CompactSumKES h d)) => ToCBOR (VerKeyKES (CompactSumKES h d))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.KES.CompactSum(Ord a, ToCBOR a) => ToCBOR (Set a)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBOR(Serialise t, Typeable t) => ToCBOR (WithOrigin t)Defined in cardano-slotting-0.2.2.0 · Cardano.Slotting.SlotToCBOR (Tokens -> Tokens)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORTypeable a => ToCBOR (Fixed a)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBOR(ToCBOR a, ToCBOR b) => ToCBOR (Either a b)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBOR(ToCBOR a, ToCBOR b) => ToCBOR (a, b)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBOR(HashAlgorithm h, Typeable a) => ToCBOR (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Class(VRFAlgorithm v, Typeable a) => ToCBOR (CertifiedVRF v a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.VRF.Class(Ord k, ToCBOR k, ToCBOR v) => ToCBOR (Map k v)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBOR(ToCBOR a, ToCBOR b, ToCBOR c) => ToCBOR (a, b, c)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBOR(Typeable s, ToCBOR a) => ToCBOR (Tagged s a)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBOR(ToCBOR a, ToCBOR b, ToCBOR c, ToCBOR d) => ToCBOR (a, b, c, d)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBOR(ToCBOR a, ToCBOR b, ToCBOR c, ToCBOR d, ToCBOR e) => ToCBOR (a, b, c, d, e)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBOR(ToCBOR a, ToCBOR b, ToCBOR c, ToCBOR d, ToCBOR e, ToCBOR f) => ToCBOR (a, b, c, d, e, f)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBOR(ToCBOR a, ToCBOR b, ToCBOR c, ToCBOR d, ToCBOR e, ToCBOR f, ToCBOR g) => ToCBOR (a, b, c, d, e, f, g)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBOR(ToCBOR a, ToCBOR b, ToCBOR c, ToCBOR d, ToCBOR e, ToCBOR f, ToCBOR g, ToCBOR h) => ToCBOR (a, b, c, d, e, f, g, h)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBOR
An action, representing a step for a decoder to taken and a continuation to invoke with the expected value.
Constructors
ConsumeWord (Word# -> ST s (DecodeAction s a))ConsumeWord8 (Word# -> ST s (DecodeAction s a))ConsumeWord16 (Word# -> ST s (DecodeAction s a))ConsumeWord32 (Word# -> ST s (DecodeAction s a))ConsumeNegWord (Word# -> ST s (DecodeAction s a))ConsumeInt (Int# -> ST s (DecodeAction s a))ConsumeInt8 (Int# -> ST s (DecodeAction s a))ConsumeInt16 (Int# -> ST s (DecodeAction s a))ConsumeInt32 (Int# -> ST s (DecodeAction s a))ConsumeListLen (Int# -> ST s (DecodeAction s a))ConsumeMapLen (Int# -> ST s (DecodeAction s a))ConsumeTag (Word# -> ST s (DecodeAction s a))ConsumeInteger (Integer -> ST s (DecodeAction s a))ConsumeFloat (Float# -> ST s (DecodeAction s a))ConsumeDouble (Double# -> ST s (DecodeAction s a))ConsumeBytes (ByteString -> ST s (DecodeAction s a))ConsumeByteArray (ByteArray -> ST s (DecodeAction s a))ConsumeString (Text -> ST s (DecodeAction s a))ConsumeUtf8ByteArray (ByteArray -> ST s (DecodeAction s a))ConsumeBool (Bool -> ST s (DecodeAction s a))ConsumeSimple (Word# -> ST s (DecodeAction s a))ConsumeBytesIndef (ST s (DecodeAction s a))ConsumeStringIndef (ST s (DecodeAction s a))ConsumeListLenIndef (ST s (DecodeAction s a))ConsumeMapLenIndef (ST s (DecodeAction s a))ConsumeNull (ST s (DecodeAction s a))ConsumeListLenOrIndef (Int# -> ST s (DecodeAction s a))ConsumeMapLenOrIndef (Int# -> ST s (DecodeAction s a))ConsumeBreakOr (Bool -> ST s (DecodeAction s a))PeekTokenType (TokenType -> ST s (DecodeAction s a))PeekAvailable (Int# -> ST s (DecodeAction s a))PeekByteOffset (Int# -> ST s (DecodeAction s a))ConsumeWordCanonical (Word# -> ST s (DecodeAction s a))ConsumeWord8Canonical (Word# -> ST s (DecodeAction s a))ConsumeWord16Canonical (Word# -> ST s (DecodeAction s a))ConsumeWord32Canonical (Word# -> ST s (DecodeAction s a))ConsumeNegWordCanonical (Word# -> ST s (DecodeAction s a))ConsumeIntCanonical (Int# -> ST s (DecodeAction s a))ConsumeInt8Canonical (Int# -> ST s (DecodeAction s a))ConsumeInt16Canonical (Int# -> ST s (DecodeAction s a))ConsumeInt32Canonical (Int# -> ST s (DecodeAction s a))ConsumeListLenCanonical (Int# -> ST s (DecodeAction s a))ConsumeMapLenCanonical (Int# -> ST s (DecodeAction s a))ConsumeTagCanonical (Word# -> ST s (DecodeAction s a))ConsumeIntegerCanonical (Integer -> ST s (DecodeAction s a))ConsumeFloat16Canonical (Float# -> ST s (DecodeAction s a))ConsumeFloatCanonical (Float# -> ST s (DecodeAction s a))ConsumeDoubleCanonical (Double# -> ST s (DecodeAction s a))ConsumeBytesCanonical (ByteString -> ST s (DecodeAction s a))ConsumeByteArrayCanonical (ByteArray -> ST s (DecodeAction s a))ConsumeStringCanonical (Text -> ST s (DecodeAction s a))ConsumeUtf8ByteArrayCanonical (ByteArray -> ST s (DecodeAction s a))ConsumeSimpleCanonical (Word# -> ST s (DecodeAction s a))Fail StringDone 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
The type of a token, which a decoder can ask for at an arbitrary time.
Instances5Bounded, Enum, Eq, Ord, Show
Bounded TokenTypeDefined in cborg-0.2.10.0 · Codec.CBOR.DecodingEnum TokenTypeDefined in cborg-0.2.10.0 · Codec.CBOR.DecodingEq TokenTypeDefined in cborg-0.2.10.0 · Codec.CBOR.DecodingOrd TokenTypeDefined in cborg-0.2.10.0 · Codec.CBOR.DecodingShow TokenTypeDefined in cborg-0.2.10.0 · Codec.CBOR.Decoding
An intermediate form used during serialisation, specified as a Monoid. It supports efficient concatenation, and is equivalent to a specialised Endo Tokens type.
It is used for the stage in serialisation where we flatten out the Haskell data structure but it is independent of any specific external binary or text format.
Traditionally, to build any arbitrary Encoding value, you specify larger structures from smaller ones and append the small ones together using mconcat.
Instances5Show, Semigroup, Monoid, ToCBOR, EncCBOR
Show EncodingDefined in cborg-0.2.10.0 · Codec.CBOR.EncodingSemigroup EncodingDefined in cborg-0.2.10.0 · Codec.CBOR.EncodingMonoid EncodingDefined in cborg-0.2.10.0 · Codec.CBOR.EncodingToCBOR EncodingDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBOREncCBOR EncodingDefined in cardano-ledger-binary-1.9.1.0 · Cardano.Ledger.Binary.Encoding.EncCBOR
A flattened representation of a term, which is independent of any underlying binary representation, but which we later serialise into CBOR format.
Constructors
TkWord !Word TokensTkWord64 !Word64 TokensTkInt !Int TokensTkInt64 !Int64 TokensTkBytes !ByteString TokensTkBytesBegin TokensTkByteArray !SlicedByteArray TokensTkString !Text TokensTkUtf8ByteArray !SlicedByteArray TokensTkStringBegin TokensTkListLen !Word TokensTkListBegin TokensTkMapLen !Word TokensTkMapBegin TokensTkTag !Word TokensTkTag64 !Word64 TokensTkInteger !Integer TokensTkNull TokensTkUndef TokensTkBool !Bool TokensTkSimple !Word8 TokensTkFloat16 !Float TokensTkFloat32 !Float TokensTkFloat64 !Double TokensTkBreak TokensTkEncoded !ByteString TokensTkEnd
Instances4Eq, Show, ToCBOR, EncCBOR
Eq TokensDefined in cborg-0.2.10.0 · Codec.CBOR.EncodingShow TokensDefined in cborg-0.2.10.0 · Codec.CBOR.EncodingToCBOR (Tokens -> Tokens)Defined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBOREncCBOR (Tokens -> Tokens)Defined in cardano-ledger-binary-1.9.1.0 · Cardano.Ledger.Binary.Encoding.EncCBOR
A general CBOR term, which can be used to serialise or deserialise arbitrary CBOR terms for interoperability or debugging. This type is essentially a direct reflection of the CBOR abstract syntax tree as a Haskell data type.
The Term type also comes with a Serialise instance, so you can
easily use to directly decode any arbitrary
CBOR value into Haskell with ease, and likewise with decode :: Decoder Termencode.
Instances9Eq, Ord, Read, Show, Serialise, FromCBOR, …
Eq TermDefined in cborg-0.2.10.0 · Codec.CBOR.TermOrd TermDefined in cborg-0.2.10.0 · Codec.CBOR.TermRead TermDefined in cborg-0.2.10.0 · Codec.CBOR.TermShow TermDefined in cborg-0.2.10.0 · Codec.CBOR.TermSerialise TermDefined in serialise-0.2.6.1 · Codec.Serialise.ClassFromCBOR TermDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORToCBOR TermDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORDecCBOR TermDefined in cardano-ledger-binary-1.9.1.0 · Cardano.Ledger.Binary.Decoding.DecCBOREncCBOR TermDefined in cardano-ledger-binary-1.9.1.0 · Cardano.Ledger.Binary.Encoding.EncCBOR