plutus-core-1.36.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

encode :: Data -> Encoding

decode :: Get Data

size :: Data -> NumBits -> NumBits

Flat DeBruijn Source # 
Instance details

Methods

encode :: DeBruijn -> Encoding

decode :: Get DeBruijn

size :: DeBruijn -> NumBits -> NumBits

Flat FakeNamedDeBruijn Source # 
Instance details

Methods

encode :: FakeNamedDeBruijn -> Encoding

decode :: Get FakeNamedDeBruijn

size :: FakeNamedDeBruijn -> NumBits -> NumBits

Flat Index Source # 
Instance details

Methods

encode :: Index -> Encoding

decode :: Get Index

size :: Index -> NumBits -> NumBits

Flat NamedDeBruijn Source # 
Instance details

Methods

encode :: NamedDeBruijn -> Encoding

decode :: Get NamedDeBruijn

size :: NamedDeBruijn -> NumBits -> NumBits

Flat NamedTyDeBruijn Source # 
Instance details

Methods

encode :: NamedTyDeBruijn -> Encoding

decode :: Get NamedTyDeBruijn

size :: NamedTyDeBruijn -> NumBits -> NumBits

Flat TyDeBruijn Source # 
Instance details

Methods

encode :: TyDeBruijn -> Encoding

decode :: Get TyDeBruijn

size :: TyDeBruijn -> NumBits -> NumBits

Flat Name Source # 
Instance details

Methods

encode :: Name -> Encoding

decode :: Get Name

size :: Name -> NumBits -> NumBits

Flat TyName Source # 
Instance details

Methods

encode :: TyName -> Encoding

decode :: Get TyName

size :: TyName -> NumBits -> NumBits

Flat Unique Source # 
Instance details

Methods

encode :: Unique -> Encoding

decode :: Get Unique

size :: Unique -> NumBits -> NumBits

Flat Version Source # 
Instance details

Methods

encode :: Version -> Encoding

decode :: Get Version

size :: Version -> NumBits -> NumBits

Flat (Binder DeBruijn) Source # 
Instance details

Methods

encode :: Binder DeBruijn -> Encoding

decode :: Get (Binder DeBruijn)

size :: Binder DeBruijn -> NumBits -> NumBits

Flat (Binder FakeNamedDeBruijn) Source # 
Instance details

Methods

encode :: Binder FakeNamedDeBruijn -> Encoding

decode :: Get (Binder FakeNamedDeBruijn)

size :: Binder FakeNamedDeBruijn -> NumBits -> NumBits

Flat (Binder NamedDeBruijn) Source # 
Instance details

Methods

encode :: Binder NamedDeBruijn -> Encoding

decode :: Get (Binder NamedDeBruijn)

size :: Binder NamedDeBruijn -> NumBits -> NumBits

Flat (Binder NamedTyDeBruijn) Source # 
Instance details

Methods

encode :: Binder NamedTyDeBruijn -> Encoding

decode :: Get (Binder NamedTyDeBruijn)

size :: Binder NamedTyDeBruijn -> NumBits -> NumBits

Flat (Binder Name) Source # 
Instance details

Methods

encode :: Binder Name -> Encoding

decode :: Get (Binder Name)

size :: Binder Name -> NumBits -> NumBits

Flat (Binder TyName) Source # 
Instance details

Methods

encode :: Binder TyName -> Encoding

decode :: Get (Binder TyName)

size :: Binder TyName -> NumBits -> NumBits

Flat ann => Flat (Kind ann) Source # 
Instance details

Methods

encode :: Kind ann -> Encoding

decode :: Get (Kind ann)

size :: Kind ann -> NumBits -> NumBits

Flat a => Flat (Normalized a) Source # 
Instance details

Methods

encode :: Normalized a -> Encoding

decode :: Get (Normalized a)

size :: Normalized a -> NumBits -> NumBits

Closed uni => Flat (SomeTypeIn uni) Source # 
Instance details

Methods

encode :: SomeTypeIn uni -> Encoding

decode :: Get (SomeTypeIn uni)

size :: SomeTypeIn uni -> NumBits -> NumBits

(Flat ann, Flat tyname) => Flat (TyVarDecl tyname ann) Source # 
Instance details

Methods

encode :: TyVarDecl tyname ann -> Encoding

decode :: Get (TyVarDecl tyname ann)

size :: TyVarDecl tyname ann -> NumBits -> NumBits

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

Methods

encode :: Some (ValueOf uni) -> Encoding

decode :: Get (Some (ValueOf uni))

size :: Some (ValueOf uni) -> NumBits -> NumBits

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

Methods

encode :: Type tyname uni ann -> Encoding

decode :: Get (Type tyname uni ann)

size :: Type tyname uni ann -> NumBits -> NumBits

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

Methods

encode :: VarDecl tyname name uni ann -> Encoding

decode :: Get (VarDecl tyname name uni ann)

size :: VarDecl 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

encode :: Program tyname name uni fun ann -> Encoding

decode :: Get (Program tyname name uni fun ann)

size :: Program 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

encode :: Term tyname name uni fun ann -> Encoding

decode :: Get (Term tyname name uni fun ann)

size :: Term tyname name uni fun ann -> NumBits -> NumBits