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

UntypedPlutusCore.Core.Instance.Flat

Synopsis

Documentation

termTagWidth ∷ NumBits Source #

Using 4 bits to encode term tags.

encodeTermTagWord8 → Encoding Source #

encodeTerm ∷ ∀ name uni fun ann. (Closed uni, uni `Everywhere` Flat, Flat fun, Flat ann, Flat name, Flat (Binder name)) ⇒ Term name uni fun ann → Encoding Source #

decodeTerm ∷ ∀ name uni fun ann. (Closed uni, uni `Everywhere` Flat, Flat fun, Flat ann, Flat name, Flat (Binder name)) ⇒ Version → (fun → Maybe String) → Get (Term name uni fun ann) Source #

sizeTerm ∷ ∀ name uni fun ann. (Closed uni, uni `Everywhere` Flat, Flat fun, Flat ann, Flat name, Flat (Binder name)) ⇒ Term name uni fun ann → NumBits → NumBits Source #

encodeProgram ∷ ∀ name uni fun ann. (Closed uni, uni `Everywhere` Flat, Flat fun, Flat ann, Flat name, Flat (Binder name)) ⇒ Program name uni fun ann → Encoding Source #

An encoder for programs.

It is not easy to use this correctly with flat. The simplest thing is to go via the instance for UnrestrictedProgram, which uses this

decodeProgram ∷ ∀ name uni fun ann. (Closed uni, uni `Everywhere` Flat, Flat fun, Flat ann, Flat name, Flat (Binder name)) ⇒ (fun → Maybe String) → Get (Program name uni fun ann) Source #

sizeProgram ∷ ∀ name uni fun ann. (Closed uni, uni `Everywhere` Flat, Flat fun, Flat ann, Flat name, Flat (Binder name)) ⇒ Program name uni fun ann → NumBits → NumBits Source #

newtype UnrestrictedProgram name uni fun ann Source #

A program that can be serialized without any restrictions, e.g. on the set of allowable builtins or term constructs. It is generally safe to use this newtype for serializing, but it should only be used for deserializing in tests.

Constructors

UnrestrictedProgram 

Fields

Instances

Instances details
DefaultPrettyPlcStrategy (UnrestrictedProgram name uni fun ann) ⇒ PrettyBy PrettyConfigPlc (UnrestrictedProgram name uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Flat

Methods

prettyByPrettyConfigPlcUnrestrictedProgram name uni fun ann → Doc ann0 Source #

prettyListByPrettyConfigPlc → [UnrestrictedProgram name uni fun ann] → Doc ann0 Source #

(PrettyClassic name, PrettyUni uni, Pretty fun, Pretty ann) ⇒ PrettyBy (PrettyConfigClassic PrettyConfigName) (UnrestrictedProgram name uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Flat

(PrettyReadable name, PrettyUni uni, Pretty fun) ⇒ PrettyBy (PrettyConfigReadable PrettyConfigName) (UnrestrictedProgram name uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Flat

Functor (UnrestrictedProgram name uni fun) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Flat

Methods

fmap ∷ (a → b) → UnrestrictedProgram name uni fun a → UnrestrictedProgram name uni fun b Source #

(<$) ∷ a → UnrestrictedProgram name uni fun b → UnrestrictedProgram name uni fun a Source #

(Show name, GShow uni, Everywhere uni Show, Show fun, Show ann, Closed uni) ⇒ Show (UnrestrictedProgram name uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Flat

Methods

showsPrecIntUnrestrictedProgram name uni fun ann → ShowS Source #

showUnrestrictedProgram name uni fun ann → String Source #

showList ∷ [UnrestrictedProgram name uni fun ann] → ShowS Source #

(Closed uni, Everywhere uni Flat, Flat fun, Flat ann, Flat name, Flat (Binder name)) ⇒ Flat (UnrestrictedProgram name uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Flat

Methods

encodeUnrestrictedProgram name uni fun ann → Encoding

decode ∷ Get (UnrestrictedProgram name uni fun ann)

sizeUnrestrictedProgram name uni fun ann → NumBits → NumBits

Wrapped (UnrestrictedProgram name uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Flat

Associated Types

type Unwrapped (UnrestrictedProgram name uni fun ann)

Methods

_Wrapped' ∷ Iso' (UnrestrictedProgram name uni fun ann) (Unwrapped (UnrestrictedProgram name uni fun ann))

UnrestrictedProgram name1 uni1 fun1 ann1 ~ t ⇒ Rewrapped (UnrestrictedProgram name2 uni2 fun2 ann2) t Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Flat

type Unwrapped (UnrestrictedProgram name uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Flat

type Unwrapped (UnrestrictedProgram name uni fun ann) = Program name uni fun ann