cardano-data-0.1.0.0: Specialized data for Cardano project
Safe Haskell None
Language Haskell2010

Data.MemoBytes

Description

MemoBytes is an abstraction for a data type that encodes its own serialization. The idea is to use a newtype around a MemoBytes non-memoizing version. For example: newtype Foo = Foo (MemoBytes NonMemoizingFoo) This way all the instances for Foo (Eq,Show,Ord,ToCBOR,FromCBOR,NoThunks,Generic) can be derived for free.

Synopsis

Documentation

data MemoBytes t Source #

Instances

Instances details
Eq ( MemoBytes t) Source #
Instance details

Defined in Data.MemoBytes

Ord t => Ord ( MemoBytes t) Source #
Instance details

Defined in Data.MemoBytes

Show t => Show ( MemoBytes t) Source #
Instance details

Defined in Data.MemoBytes

Generic ( MemoBytes t) Source #
Instance details

Defined in Data.MemoBytes

Associated Types

type Rep ( MemoBytes t) :: Type -> Type Source #

Typeable t => ToCBOR ( MemoBytes t) Source #
Instance details

Defined in Data.MemoBytes

( Typeable t, FromCBOR ( Annotator t)) => FromCBOR ( Annotator ( MemoBytes t)) Source #
Instance details

Defined in Data.MemoBytes

NFData t => NFData ( MemoBytes t) Source #
Instance details

Defined in Data.MemoBytes

( Typeable t, NoThunks t) => NoThunks ( MemoBytes t) Source #
Instance details

Defined in Data.MemoBytes

type Rep ( MemoBytes t) Source #
Instance details

Defined in Data.MemoBytes

type Mem t = Annotator ( MemoBytes t) Source #

Useful when deriving FromCBOR(Annotator T) deriving via (Mem T) instance (Era era) => FromCBOR (Annotator T)