plutus-core-1.70.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusCore.Flat.Filler

Description

Pre-value and post-value byte alignments

Synopsis

Documentation

data Filler Source #

A meaningless sequence of 0 bits terminated with a 1 bit (easier to implement than the reverse)

Used to align encoded values at byte/word boundaries.

Constructors

FillerBit !Filler 
FillerEnd 

Instances

Instances details
Generic Filler Source # 
Instance details

Defined in PlutusCore.Flat.Filler

Associated Types

type Rep Filler ∷ Type → Type Source #

Methods

from ∷ Filler → Rep Filler x Source #

to ∷ Rep Filler x → Filler Source #

Show Filler Source # 
Instance details

Defined in PlutusCore.Flat.Filler

NFData Filler Source # 
Instance details

Defined in PlutusCore.Flat.Filler

Methods

rnf ∷ Filler → () Source #

Eq Filler Source # 
Instance details

Defined in PlutusCore.Flat.Filler

Methods

(==) ∷ Filler → Filler → Bool Source #

(/=) ∷ Filler → Filler → Bool Source #

Ord Filler Source # 
Instance details

Defined in PlutusCore.Flat.Filler

Flat Filler Source #

Use a special encoding for the filler

Instance details

Defined in PlutusCore.Flat.Filler

type Rep Filler Source # 
Instance details

Defined in PlutusCore.Flat.Filler

type Rep Filler = D1 ('MetaData "Filler" "PlutusCore.Flat.Filler" "plutus-core-1.70.0.0-inplace-flat" 'False) (C1 ('MetaCons "FillerBit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Filler)) :+: C1 ('MetaCons "FillerEnd" 'PrefixI 'False) (U1 ∷ Type → Type))

fillerLength ∷ Num a ⇒ Filler → a Source #

Length of a filler in bits

data PreAligned a Source #

A Pre aligned value, a value preceded by a filler

Useful to prealign ByteArrays, Texts and any structure that can be encoded more efficiently when byte aligned.

Constructors

PreAligned 

Fields

Instances

Instances details
Generic (PreAligned a) Source # 
Instance details

Defined in PlutusCore.Flat.Filler

Associated Types

type Rep (PreAligned a) ∷ Type → Type Source #

Methods

from ∷ PreAligned a → Rep (PreAligned a) x Source #

to ∷ Rep (PreAligned a) x → PreAligned a Source #

Show a ⇒ Show (PreAligned a) Source # 
Instance details

Defined in PlutusCore.Flat.Filler

NFData a ⇒ NFData (PreAligned a) Source # 
Instance details

Defined in PlutusCore.Flat.Filler

Methods

rnf ∷ PreAligned a → () Source #

Eq a ⇒ Eq (PreAligned a) Source # 
Instance details

Defined in PlutusCore.Flat.Filler

Methods

(==) ∷ PreAligned a → PreAligned a → Bool Source #

(/=) ∷ PreAligned a → PreAligned a → Bool Source #

Ord a ⇒ Ord (PreAligned a) Source # 
Instance details

Defined in PlutusCore.Flat.Filler

Flat a ⇒ Flat (PreAligned a) Source # 
Instance details

Defined in PlutusCore.Flat.Filler

type Rep (PreAligned a) Source # 
Instance details

Defined in PlutusCore.Flat.Filler

type Rep (PreAligned a) = D1 ('MetaData "PreAligned" "PlutusCore.Flat.Filler" "plutus-core-1.70.0.0-inplace-flat" 'False) (C1 ('MetaCons "PreAligned" 'PrefixI 'True) (S1 ('MetaSel ('Just "preFiller") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Filler) :*: S1 ('MetaSel ('Just "preValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

preAligned ∷ a → PreAligned a Source #

Pre align a value

data PostAligned a Source #

A Post aligned value, a value followed by a filler

Useful to complete the encoding of a top-level value

Constructors

PostAligned 

Fields

Instances

Instances details
Generic (PostAligned a) Source # 
Instance details

Defined in PlutusCore.Flat.Filler

Associated Types

type Rep (PostAligned a) ∷ Type → Type Source #

Methods

from ∷ PostAligned a → Rep (PostAligned a) x Source #

to ∷ Rep (PostAligned a) x → PostAligned a Source #

Show a ⇒ Show (PostAligned a) Source # 
Instance details

Defined in PlutusCore.Flat.Filler

NFData a ⇒ NFData (PostAligned a) Source # 
Instance details

Defined in PlutusCore.Flat.Filler

Methods

rnf ∷ PostAligned a → () Source #

Eq a ⇒ Eq (PostAligned a) Source # 
Instance details

Defined in PlutusCore.Flat.Filler

Ord a ⇒ Ord (PostAligned a) Source # 
Instance details

Defined in PlutusCore.Flat.Filler

Flat a ⇒ Flat (PostAligned a) Source # 
Instance details

Defined in PlutusCore.Flat.Filler

type Rep (PostAligned a) Source # 
Instance details

Defined in PlutusCore.Flat.Filler

type Rep (PostAligned a) = D1 ('MetaData "PostAligned" "PlutusCore.Flat.Filler" "plutus-core-1.70.0.0-inplace-flat" 'False) (C1 ('MetaCons "PostAligned" 'PrefixI 'True) (S1 ('MetaSel ('Just "postValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "postFiller") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Filler)))

postAligned ∷ a → PostAligned a Source #

Post align a value

preAlignedDecoder ∷ Get b → Get b Source #

Decode a value assuming that is PreAligned

Since: 0.5

postAlignedDecoder ∷ Get b → Get b Source #

Decode a value assuming that is PostAligned