shelley-spec-ledger-0.1.0.0
Safe HaskellNone
LanguageHaskell98

Shelley.Spec.Ledger.Serialization

Synopsis

Documentation

class Typeable a ⇒ ToCBORGroup a where Source #

Methods

toCBORGroup ∷ a → Encoding Source #

encodedGroupSizeExpr ∷ (∀ x. ToCBOR x ⇒ Proxy x → Size) → Proxy a → Size Source #

listLen ∷ a → Word Source #

listLenBoundProxy a → Word Source #

an upper bound for listLen, used in Size expressions.

Instances

Instances details
ToCBORGroup ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

ToCBORGroup Ptr Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Crypto crypto ⇒ ToCBORGroup (OCert crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.OCert

Methods

toCBORGroupOCert crypto → Encoding Source #

encodedGroupSizeExpr ∷ (∀ x. ToCBOR x ⇒ Proxy x → Size) → Proxy (OCert crypto) → Size Source #

listLenOCert crypto → Word Source #

listLenBoundProxy (OCert crypto) → Word Source #

Era era ⇒ ToCBORGroup (PoolParams era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.TxBody

Era era ⇒ ToCBORGroup (TxSeq era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.BlockChain

Methods

toCBORGroupTxSeq era → Encoding Source #

encodedGroupSizeExpr ∷ (∀ x. ToCBOR x ⇒ Proxy x → Size) → Proxy (TxSeq era) → Size Source #

listLenTxSeq era → Word Source #

listLenBoundProxy (TxSeq era) → Word Source #

class Typeable a ⇒ FromCBORGroup a where Source #

Methods

fromCBORGroupDecoder s a Source #

Instances

Instances details
FromCBORGroup ProtVer Source # 
Instance details

Defined in Shelley.Spec.Ledger.PParams

FromCBORGroup Ptr Source # 
Instance details

Defined in Shelley.Spec.Ledger.Credential

Crypto crypto ⇒ FromCBORGroup (OCert crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.OCert

Methods

fromCBORGroupDecoder s (OCert crypto) Source #

Era era ⇒ FromCBORGroup (PoolParams era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.TxBody

newtype CBORGroup a Source #

Constructors

CBORGroup 

Fields

Instances

Instances details
ToCBORGroup a ⇒ ToCBOR (CBORGroup a) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Serialization

Methods

toCBORCBORGroup a → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (CBORGroup a) → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [CBORGroup a] → Size Source #

(FromCBORGroup a, ToCBORGroup a) ⇒ FromCBOR (CBORGroup a) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Serialization

newtype CborSeq a Source #

Constructors

CborSeq 

Fields

Instances

Instances details
Foldable CborSeq Source # 
Instance details

Defined in Shelley.Spec.Ledger.Serialization

Methods

foldMonoid m ⇒ CborSeq m → m #

foldMapMonoid m ⇒ (a → m) → CborSeq a → m #

foldMap'Monoid m ⇒ (a → m) → CborSeq a → m #

foldr ∷ (a → b → b) → b → CborSeq a → b #

foldr' ∷ (a → b → b) → b → CborSeq a → b #

foldl ∷ (b → a → b) → b → CborSeq a → b #

foldl' ∷ (b → a → b) → b → CborSeq a → b #

foldr1 ∷ (a → a → a) → CborSeq a → a #

foldl1 ∷ (a → a → a) → CborSeq a → a #

toListCborSeq a → [a] #

nullCborSeq a → Bool #

lengthCborSeq a → Int #

elemEq a ⇒ a → CborSeq a → Bool #

maximumOrd a ⇒ CborSeq a → a #

minimumOrd a ⇒ CborSeq a → a #

sumNum a ⇒ CborSeq a → a #

productNum a ⇒ CborSeq a → a #

ToCBOR a ⇒ ToCBOR (CborSeq a) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Serialization

Methods

toCBORCborSeq a → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (CborSeq a) → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [CborSeq a] → Size Source #

FromCBOR a ⇒ FromCBOR (CborSeq a) Source # 
Instance details

Defined in Shelley.Spec.Ledger.Serialization

Methods

fromCBORDecoder s (CborSeq a) Source #

labelProxy (CborSeq a) → Text Source #

decodeListDecoder s a → Decoder s [a] Source #

decodeSeqDecoder s a → Decoder s (Seq a) Source #

decodeSetOrd a ⇒ Decoder s a → Decoder s (Set a) Source #

decodeMapOrd a ⇒ Decoder s a → Decoder s b → Decoder s (Map a b) Source #

decodeMapTraverse ∷ (Ord a, Applicative t) ⇒ Decoder s (t a) → Decoder s (t b) → Decoder s (t (Map a b)) Source #

decodeRecordNamedText → (a → Int) → Decoder s a → Decoder s a Source #

decodeRecordSumString → (WordDecoder s (Int, a)) → Decoder s a Source #

encodeFoldableEncoderFoldable f ⇒ (a → Encoding) → f a → Encoding Source #

groupRecord ∷ ∀ a s. (ToCBORGroup a, FromCBORGroup a) ⇒ Decoder s a Source #

mapToCBOR ∷ (ToCBOR a, ToCBOR b) ⇒ Map a b → Encoding Source #

mapFromCBOR ∷ (Ord a, FromCBOR a, FromCBOR b) ⇒ Decoder s (Map a b) Source #

runByteBuilderIntBuilderByteString Source #

Run a ByteString Builder using a strategy aimed at making smaller things efficiently.

It takes a size hint and produces a strict ByteString. This will be fast when the size hint is the same or slightly bigger than the true size.