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

PlutusCore.Flat

Description

Flat instances for Plutus Core types. Make sure to read Note [Stable encoding of TPLC] and Note [Stable encoding of UPLC] before touching anything in this file.

Documentation

safeEncodeBits ∷ NumBits → Word8 → Encoding Source #

Orphan instances

Flat Data Source # 
Instance details

Methods

encodeData → Encoding

decode ∷ Get Data

sizeData → NumBits → NumBits

Flat DeBruijn Source # 
Instance details

Methods

encodeDeBruijn → Encoding

decode ∷ Get DeBruijn

sizeDeBruijn → NumBits → NumBits

Flat FakeNamedDeBruijn Source # 
Instance details

Methods

encodeFakeNamedDeBruijn → Encoding

decode ∷ Get FakeNamedDeBruijn

sizeFakeNamedDeBruijn → NumBits → NumBits

Flat Index Source # 
Instance details

Methods

encodeIndex → Encoding

decode ∷ Get Index

sizeIndex → NumBits → NumBits

Flat NamedDeBruijn Source # 
Instance details

Methods

encodeNamedDeBruijn → Encoding

decode ∷ Get NamedDeBruijn

sizeNamedDeBruijn → NumBits → NumBits

Flat NamedTyDeBruijn Source # 
Instance details

Methods

encodeNamedTyDeBruijn → Encoding

decode ∷ Get NamedTyDeBruijn

sizeNamedTyDeBruijn → NumBits → NumBits

Flat TyDeBruijn Source # 
Instance details

Methods

encodeTyDeBruijn → Encoding

decode ∷ Get TyDeBruijn

sizeTyDeBruijn → NumBits → NumBits

Flat Name Source # 
Instance details

Methods

encodeName → Encoding

decode ∷ Get Name

sizeName → NumBits → NumBits

Flat TyName Source # 
Instance details

Methods

encodeTyName → Encoding

decode ∷ Get TyName

sizeTyName → NumBits → NumBits

Flat Unique Source # 
Instance details

Methods

encodeUnique → Encoding

decode ∷ Get Unique

sizeUnique → NumBits → NumBits

Flat Version Source # 
Instance details

Methods

encodeVersion → Encoding

decode ∷ Get Version

sizeVersion → NumBits → NumBits

Flat (Binder DeBruijn) Source # 
Instance details

Methods

encodeBinder DeBruijn → Encoding

decode ∷ Get (Binder DeBruijn)

sizeBinder DeBruijn → NumBits → NumBits

Flat (Binder FakeNamedDeBruijn) Source # 
Instance details

Methods

encodeBinder FakeNamedDeBruijn → Encoding

decode ∷ Get (Binder FakeNamedDeBruijn)

sizeBinder FakeNamedDeBruijn → NumBits → NumBits

Flat (Binder NamedDeBruijn) Source # 
Instance details

Methods

encodeBinder NamedDeBruijn → Encoding

decode ∷ Get (Binder NamedDeBruijn)

sizeBinder NamedDeBruijn → NumBits → NumBits

Flat (Binder NamedTyDeBruijn) Source # 
Instance details

Methods

encodeBinder NamedTyDeBruijn → Encoding

decode ∷ Get (Binder NamedTyDeBruijn)

sizeBinder NamedTyDeBruijn → NumBits → NumBits

Flat (Binder Name) Source # 
Instance details

Methods

encodeBinder Name → Encoding

decode ∷ Get (Binder Name)

sizeBinder Name → NumBits → NumBits

Flat (Binder TyName) Source # 
Instance details

Methods

encodeBinder TyName → Encoding

decode ∷ Get (Binder TyName)

sizeBinder TyName → NumBits → NumBits

Flat ann ⇒ Flat (Kind ann) Source # 
Instance details

Methods

encodeKind ann → Encoding

decode ∷ Get (Kind ann)

sizeKind ann → NumBits → NumBits

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

Methods

encodeNormalized a → Encoding

decode ∷ Get (Normalized a)

sizeNormalized a → NumBits → NumBits

Closed uni ⇒ Flat (SomeTypeIn uni) Source # 
Instance details

Methods

encodeSomeTypeIn uni → Encoding

decode ∷ Get (SomeTypeIn uni)

sizeSomeTypeIn uni → NumBits → NumBits

(Flat ann, Flat tyname) ⇒ Flat (TyVarDecl tyname ann) Source # 
Instance details

Methods

encodeTyVarDecl tyname ann → Encoding

decode ∷ Get (TyVarDecl tyname ann)

sizeTyVarDecl tyname ann → NumBits → NumBits

(Closed uni, Everywhere uni Flat) ⇒ Flat (Some (ValueOf uni)) Source # 
Instance details

Methods

encodeSome (ValueOf uni) → Encoding

decode ∷ Get (Some (ValueOf uni))

sizeSome (ValueOf uni) → NumBits → NumBits

(Closed uni, Flat ann, Flat tyname) ⇒ Flat (Type tyname uni ann) Source # 
Instance details

Methods

encodeType tyname uni ann → Encoding

decode ∷ Get (Type tyname uni ann)

sizeType tyname uni ann → NumBits → NumBits

(Closed uni, Flat ann, Flat tyname, Flat name) ⇒ Flat (VarDecl tyname name uni ann) Source # 
Instance details

Methods

encodeVarDecl tyname name uni ann → Encoding

decode ∷ Get (VarDecl tyname name uni ann)

sizeVarDecl tyname name uni ann → NumBits → NumBits

(Flat ann, Flat (Term tyname name uni fun ann)) ⇒ Flat (Program tyname name uni fun ann) Source # 
Instance details

Methods

encodeProgram tyname name uni fun ann → Encoding

decode ∷ Get (Program tyname name uni fun ann)

sizeProgram tyname name uni fun ann → NumBits → NumBits

(Closed uni, Everywhere uni Flat, Flat fun, Flat ann, Flat tyname, Flat name) ⇒ Flat (Term tyname name uni fun ann) Source # 
Instance details

Methods

encodeTerm tyname name uni fun ann → Encoding

decode ∷ Get (Term tyname name uni fun ann)

sizeTerm tyname name uni fun ann → NumBits → NumBits