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

PlutusCore.Pretty.Plc

Description

The global pretty-printing config used to pretty-print everything in the PLC world. This module also defines custom pretty-printing functions for PLC types as a convenience.

Synopsis

Global configuration

data CondensedErrors Source #

Whether to pretty-print PLC errors in full or with some information omitted.

newtype PrettyConfigPlcOptions Source #

Options for pretty-printing PLC entities.

data PrettyConfigPlc Source #

Global configuration used for pretty-printing PLC entities.

Instances

Instances details
Show PrettyConfigPlc Source # 
Instance details

Defined in PlutusCore.Pretty.Plc

HasPrettyConfigName PrettyConfigPlc Source # 
Instance details

Defined in PlutusCore.Pretty.Plc

PrettyBy PrettyConfigPlc DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

DefaultPrettyPlcStrategy (Kind ann) ⇒ PrettyBy PrettyConfigPlc (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Plc

Methods

prettyBy ∷ PrettyConfigPlc → Kind ann → Doc ann0 Source #

prettyListBy ∷ PrettyConfigPlc → [Kind ann] → Doc ann0 Source #

PrettyBy PrettyConfigPlc a ⇒ PrettyBy PrettyConfigPlc (ExpectedShapeOr a) Source # 
Instance details

Defined in PlutusCore.Error

DefaultPrettyPlcStrategy a ⇒ PrettyBy PrettyConfigPlc (PrettyAny a) Source # 
Instance details

Defined in PlutusCore.Pretty.Plc

(PrettyUni uni, Pretty fun) ⇒ PrettyBy PrettyConfigPlc (CkValue uni fun) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Ck

Methods

prettyBy ∷ PrettyConfigPlc → CkValue uni fun → Doc ann Source #

prettyListBy ∷ PrettyConfigPlc → [CkValue uni fun] → Doc ann Source #

(PrettyUni uni, Pretty fun) ⇒ PrettyBy PrettyConfigPlc (DischargeResult uni fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Methods

prettyBy ∷ PrettyConfigPlc → DischargeResult uni fun → Doc ann Source #

prettyListBy ∷ PrettyConfigPlc → [DischargeResult uni fun] → Doc ann Source #

DefaultPrettyPlcStrategy (Type tyname uni ann) ⇒ PrettyBy PrettyConfigPlc (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Plc

Methods

prettyBy ∷ PrettyConfigPlc → Type tyname uni ann → Doc ann0 Source #

prettyListBy ∷ PrettyConfigPlc → [Type tyname uni ann] → Doc ann0 Source #

(PrettyUni uni, Pretty fun, Pretty ann) ⇒ PrettyBy PrettyConfigPlc (Error uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

prettyBy ∷ PrettyConfigPlc → Error uni fun ann → Doc ann0 Source #

prettyListBy ∷ PrettyConfigPlc → [Error uni fun ann] → Doc ann0 Source #

(PrettyUni uni, Pretty fun) ⇒ PrettyBy PrettyConfigPlc (CekValue uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Methods

prettyBy ∷ PrettyConfigPlc → CekValue uni fun ann → Doc ann0 Source #

prettyListBy ∷ PrettyConfigPlc → [CekValue uni fun ann] → Doc ann0 Source #

(Pretty term, PrettyUni uni, Pretty fun, Pretty ann) ⇒ PrettyBy PrettyConfigPlc (TypeError term uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

prettyBy ∷ PrettyConfigPlc → TypeError term uni fun ann → Doc ann0 Source #

prettyListBy ∷ PrettyConfigPlc → [TypeError term uni fun ann] → Doc ann0 Source #

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

Defined in UntypedPlutusCore.Core.Instance.Flat

Methods

prettyBy ∷ PrettyConfigPlc → UnrestrictedProgram name uni fun ann → Doc ann0 Source #

prettyListBy ∷ PrettyConfigPlc → [UnrestrictedProgram name uni fun ann] → Doc ann0 Source #

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

Defined in UntypedPlutusCore.Core.Instance.Pretty.Plc

Methods

prettyBy ∷ PrettyConfigPlc → Program name uni fun ann → Doc ann0 Source #

prettyListBy ∷ PrettyConfigPlc → [Program name uni fun ann] → Doc ann0 Source #

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

Defined in UntypedPlutusCore.Core.Instance.Pretty.Plc

Methods

prettyBy ∷ PrettyConfigPlc → Term name uni fun ann → Doc ann0 Source #

prettyListBy ∷ PrettyConfigPlc → [Term name uni fun ann] → Doc ann0 Source #

DefaultPrettyPlcStrategy (Program tyname name uni fun ann) ⇒ PrettyBy PrettyConfigPlc (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Plc

Methods

prettyBy ∷ PrettyConfigPlc → Program tyname name uni fun ann → Doc ann0 Source #

prettyListBy ∷ PrettyConfigPlc → [Program tyname name uni fun ann] → Doc ann0 Source #

DefaultPrettyPlcStrategy (Term tyname name uni fun ann) ⇒ PrettyBy PrettyConfigPlc (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Plc

Methods

prettyBy ∷ PrettyConfigPlc → Term tyname name uni fun ann → Doc ann0 Source #

prettyListBy ∷ PrettyConfigPlc → [Term tyname name uni fun ann] → Doc ann0 Source #

type HasPrettyDefaults PrettyConfigPlc Source # 
Instance details

Defined in PlutusCore.Pretty.Plc

type PrettyPlc = PrettyBy PrettyConfigPlc Source #

The "pretty-printable PLC entity" constraint.

type DefaultPrettyPlcStrategy a = (PrettyClassic a, PrettyReadable a) Source #

A constraint that allows to derive PrettyBy PrettyConfigPlc instances, see below.

prettyConfigPlcOptions ∷ PrettyConfigPlcOptions Source #

The PrettyConfigPlcOptions used by default: print errors in full.

prettyConfigPlcClassic ∷ PrettyConfigPlcOptions → PrettyConfigPlc Source #

The PrettyConfigPlc used by default: use the classic view and print neither Uniques, nor name attachments.

prettyConfigPlcClassicSimple ∷ PrettyConfigPlcOptions → PrettyConfigPlc Source #

The PrettyConfigPlc used for debugging: use the classic view and print Uniques, but not name attachments.

prettyConfigPlcReadable ∷ PrettyConfigPlcOptions → PrettyConfigPlc Source #

The PrettyConfigPlc used by default and for readability: use the refined view and print Uniques but not name attachments.

prettyConfigPlcReadableSimple ∷ PrettyConfigPlcOptions → PrettyConfigPlc Source #

The PrettyConfigPlc used for debugging and readability: use the refined view and print neither Uniques nor name attachments.

Custom functions for PLC types.

prettyPlcClassic ∷ PrettyPlc a ⇒ a → Doc ann Source #

Pretty-print a PLC value in the default mode using the classic view.

prettyPlcClassicSimple ∷ PrettyPlc a ⇒ a → Doc ann Source #

Pretty-print a PLC value without unique indices using the classic view.

prettyPlcReadable ∷ PrettyPlc a ⇒ a → Doc ann Source #

Pretty-print a PLC value in the default mode using the readable view.

prettyPlcReadableSimple ∷ PrettyPlc a ⇒ a → Doc ann Source #

Pretty-print a PLC value without unique indices using the readable view.

prettyPlcCondensedErrorBy ∷ PrettyPlc a ⇒ (PrettyConfigPlcOptions → PrettyConfigPlc) → a → Doc ann Source #

Pretty-print a PLC value using the condensed way (see CondensedErrors) of pretty-printing PLC errors (in case there are any).