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

PlutusCore.Pretty

Synopsis

Basic types and functions

data Doc ann #

Instances

Instances details
Functor Doc 
Instance details

Defined in Prettyprinter.Internal

Methods

fmap :: (a -> b) -> Doc a -> Doc b Source #

(<$) :: a -> Doc b -> Doc a Source #

IsString (Doc ann) 
Instance details

Defined in Prettyprinter.Internal

Methods

fromString :: String -> Doc ann Source #

Monoid (Doc ann) 
Instance details

Defined in Prettyprinter.Internal

Methods

mempty :: Doc ann Source #

mappend :: Doc ann -> Doc ann -> Doc ann Source #

mconcat :: [Doc ann] -> Doc ann Source #

Semigroup (Doc ann) 
Instance details

Defined in Prettyprinter.Internal

Methods

(<>) :: Doc ann -> Doc ann -> Doc ann Source #

sconcat :: NonEmpty (Doc ann) -> Doc ann Source #

stimes :: Integral b => b -> Doc ann -> Doc ann Source #

Generic (Doc ann) 
Instance details

Defined in Prettyprinter.Internal

Associated Types

type Rep (Doc ann) :: Type -> Type Source #

Methods

from :: Doc ann -> Rep (Doc ann) x Source #

to :: Rep (Doc ann) x -> Doc ann Source #

Show (Doc ann) 
Instance details

Defined in Prettyprinter.Internal

Methods

showsPrec :: Int -> Doc ann -> ShowS Source #

show :: Doc ann -> String Source #

showList :: [Doc ann] -> ShowS Source #

type Rep (Doc ann) 
Instance details

Defined in Prettyprinter.Internal

type Rep (Doc ann) = D1 ('MetaData "Doc" "Prettyprinter.Internal" "prettyprinter-1.7.1-60yVE7QePDs8FHIPsacPFF" 'False) (((C1 ('MetaCons "Fail" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Empty" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Char" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Char)))) :+: (C1 ('MetaCons "Text" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: (C1 ('MetaCons "Line" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FlatAlt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Doc ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Doc ann)))))) :+: ((C1 ('MetaCons "Cat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Doc ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Doc ann))) :+: (C1 ('MetaCons "Nest" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Doc ann))) :+: C1 ('MetaCons "Union" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Doc ann)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Doc ann))))) :+: ((C1 ('MetaCons "Column" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Int -> Doc ann))) :+: C1 ('MetaCons "WithPageWidth" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PageWidth -> Doc ann)))) :+: (C1 ('MetaCons "Nesting" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Int -> Doc ann))) :+: C1 ('MetaCons "Annotated" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ann) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Doc ann)))))))

class Pretty a where #

Minimal complete definition

pretty

Methods

pretty :: a -> Doc ann #

prettyList :: [a] -> Doc ann #

Instances

Instances details
Pretty Void 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Void -> Doc ann #

prettyList :: [Void] -> Doc ann #

Pretty Int16 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Int16 -> Doc ann #

prettyList :: [Int16] -> Doc ann #

Pretty Int32 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Int32 -> Doc ann #

prettyList :: [Int32] -> Doc ann #

Pretty Int64 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Int64 -> Doc ann #

prettyList :: [Int64] -> Doc ann #

Pretty Int8 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Int8 -> Doc ann #

prettyList :: [Int8] -> Doc ann #

Pretty Word16 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Word16 -> Doc ann #

prettyList :: [Word16] -> Doc ann #

Pretty Word32 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Word32 -> Doc ann #

prettyList :: [Word32] -> Doc ann #

Pretty Word64 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Word64 -> Doc ann #

prettyList :: [Word64] -> Doc ann #

Pretty Word8 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Word8 -> Doc ann #

prettyList :: [Word8] -> Doc ann #

Pretty SourcePos Source # 
Instance details

Defined in PlutusCore.Error

Methods

pretty :: SourcePos -> Doc ann #

prettyList :: [SourcePos] -> Doc ann #

Pretty DeserialiseFailureInfo Source # 
Instance details

Defined in Codec.Extras.SerialiseViaFlat

Pretty DeserialiseFailureReason Source # 
Instance details

Defined in Codec.Extras.SerialiseViaFlat

Pretty Ann Source # 
Instance details

Defined in PlutusCore.Annotation

Methods

pretty :: Ann -> Doc ann #

prettyList :: [Ann] -> Doc ann #

Pretty SrcSpan Source # 
Instance details

Defined in PlutusCore.Annotation

Methods

pretty :: SrcSpan -> Doc ann #

prettyList :: [SrcSpan] -> Doc ann #

Pretty SrcSpans Source # 
Instance details

Defined in PlutusCore.Annotation

Methods

pretty :: SrcSpans -> Doc ann #

prettyList :: [SrcSpans] -> Doc ann #

Pretty Param Source # 
Instance details

Defined in PlutusCore.Arity

Methods

pretty :: Param -> Doc ann #

prettyList :: [Param] -> Doc ann #

Pretty BuiltinError Source # 
Instance details

Defined in PlutusCore.Builtin.Result

Methods

pretty :: BuiltinError -> Doc ann #

prettyList :: [BuiltinError] -> Doc ann #

Pretty UnliftingError Source # 
Instance details

Defined in PlutusCore.Builtin.Result

Methods

pretty :: UnliftingError -> Doc ann #

prettyList :: [UnliftingError] -> Doc ann #

Pretty UnliftingEvaluationError Source # 
Instance details

Defined in PlutusCore.Builtin.Result

Pretty NameAnn Source # 
Instance details

Defined in PlutusCore.Check.Scoping

Methods

pretty :: NameAnn -> Doc ann #

prettyList :: [NameAnn] -> Doc ann #

Pretty ScopeError Source # 
Instance details

Defined in PlutusCore.Check.Scoping

Methods

pretty :: ScopeError -> Doc ann #

prettyList :: [ScopeError] -> Doc ann #

Pretty Element Source # 
Instance details

Defined in PlutusCore.Crypto.BLS12_381.G1

Methods

pretty :: Element -> Doc ann #

prettyList :: [Element] -> Doc ann #

Pretty Element Source # 
Instance details

Defined in PlutusCore.Crypto.BLS12_381.G2

Methods

pretty :: Element -> Doc ann #

prettyList :: [Element] -> Doc ann #

Pretty MlResult Source # 
Instance details

Defined in PlutusCore.Crypto.BLS12_381.Pairing

Methods

pretty :: MlResult -> Doc ann #

prettyList :: [MlResult] -> Doc ann #

Pretty Data Source # 
Instance details

Defined in PlutusCore.Data

Methods

pretty :: Data -> Doc ann #

prettyList :: [Data] -> Doc ann #

Pretty FreeVariableError Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Pretty Index Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Methods

pretty :: Index -> Doc ann #

prettyList :: [Index] -> Doc ann #

Pretty DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

Methods

pretty :: DefaultFun -> Doc ann #

prettyList :: [DefaultFun] -> Doc ann #

Pretty ParserError Source # 
Instance details

Defined in PlutusCore.Error

Methods

pretty :: ParserError -> Doc ann #

prettyList :: [ParserError] -> Doc ann #

Pretty ParserErrorBundle Source # 
Instance details

Defined in PlutusCore.Error

Pretty CostModelApplyError Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostModelInterface

Pretty CostModelApplyWarn Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.CostModelInterface

Pretty ExBudget Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Methods

pretty :: ExBudget -> Doc ann #

prettyList :: [ExBudget] -> Doc ann #

Pretty ExRestrictingBudget Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Pretty ExCPU Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

pretty :: ExCPU -> Doc ann #

prettyList :: [ExCPU] -> Doc ann #

Pretty ExMemory Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

pretty :: ExMemory -> Doc ann #

prettyList :: [ExMemory] -> Doc ann #

Pretty ExtensionFun Source # 
Instance details

Defined in PlutusCore.Examples.Builtins

Methods

pretty :: ExtensionFun -> Doc ann #

prettyList :: [ExtensionFun] -> Doc ann #

Pretty Name Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

pretty :: Name -> Doc ann #

prettyList :: [Name] -> Doc ann #

Pretty TyName Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

pretty :: TyName -> Doc ann #

prettyList :: [TyName] -> Doc ann #

Pretty Unique Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

pretty :: Unique -> Doc ann #

prettyList :: [Unique] -> Doc ann #

Pretty Size Source # 
Instance details

Defined in PlutusCore.Size

Methods

pretty :: Size -> Doc ann #

prettyList :: [Size] -> Doc ann #

Pretty Version Source # 
Instance details

Defined in PlutusCore.Version

Methods

pretty :: Version -> Doc ann #

prettyList :: [Version] -> Doc ann #

Pretty CountingSt Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

pretty :: CountingSt -> Doc ann #

prettyList :: [CountingSt] -> Doc ann #

Pretty RestrictingSt Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

pretty :: RestrictingSt -> Doc ann #

prettyList :: [RestrictingSt] -> Doc ann #

Pretty CekUserError Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Methods

pretty :: CekUserError -> Doc ann #

prettyList :: [CekUserError] -> Doc ann #

Pretty Purity Source # 
Instance details

Defined in UntypedPlutusCore.Purity

Methods

pretty :: Purity -> Doc ann #

prettyList :: [Purity] -> Doc ann #

Pretty Text 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Text -> Doc ann #

prettyList :: [Text] -> Doc ann #

Pretty Text 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Text -> Doc ann #

prettyList :: [Text] -> Doc ann #

Pretty Integer 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Integer -> Doc ann #

prettyList :: [Integer] -> Doc ann #

Pretty Natural 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Natural -> Doc ann #

prettyList :: [Natural] -> Doc ann #

Pretty () 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: () -> Doc ann #

prettyList :: [()] -> Doc ann #

Pretty Bool 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Bool -> Doc ann #

prettyList :: [Bool] -> Doc ann #

Pretty Char 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Char -> Doc ann #

prettyList :: [Char] -> Doc ann #

Pretty Double 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Double -> Doc ann #

prettyList :: [Double] -> Doc ann #

Pretty Float 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Float -> Doc ann #

prettyList :: [Float] -> Doc ann #

Pretty Int 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Int -> Doc ann #

prettyList :: [Int] -> Doc ann #

Pretty Word 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Word -> Doc ann #

prettyList :: [Word] -> Doc ann #

Pretty a => Pretty (Identity a) 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Identity a -> Doc ann #

prettyList :: [Identity a] -> Doc ann #

Pretty a => Pretty (NonEmpty a) 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: NonEmpty a -> Doc ann #

prettyList :: [NonEmpty a] -> Doc ann #

Pretty (BuiltinSemanticsVariant DefaultFun) Source # 
Instance details

Defined in PlutusCore.Default.Builtins

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

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

pretty :: Kind ann -> Doc ann0 #

prettyList :: [Kind ann] -> Doc ann0 #

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

Defined in PlutusCore.Core.Type

Methods

pretty :: Normalized a -> Doc ann #

prettyList :: [Normalized a] -> Doc ann #

Pretty (DefaultUni a) Source #

This always pretty-prints parens around type applications (e.g. (list bool)) and doesn't pretty-print them otherwise (e.g. integer).

Instance details

Defined in PlutusCore.Default.Universe

Methods

pretty :: DefaultUni a -> Doc ann #

prettyList :: [DefaultUni a] -> Doc ann #

Pretty ann => Pretty (UniqueError ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

pretty :: UniqueError ann -> Doc ann0 #

prettyList :: [UniqueError ann] -> Doc ann0 #

PrettyClassic a => Pretty (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Methods

pretty :: EvaluationResult a -> Doc ann #

prettyList :: [EvaluationResult a] -> Doc ann #

PrettyReadable a => Pretty (AsReadable a) Source # 
Instance details

Defined in PlutusCore.Pretty.Readable

Methods

pretty :: AsReadable a -> Doc ann #

prettyList :: [AsReadable a] -> Doc ann #

Pretty (SomeTypeIn DefaultUni) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Pretty (SomeTypeIn uni) => Pretty (SomeTypeIn (Kinded uni)) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

pretty :: SomeTypeIn (Kinded uni) -> Doc ann #

prettyList :: [SomeTypeIn (Kinded uni)] -> Doc ann #

(Show fun, Ord fun) => Pretty (CekExTally fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

pretty :: CekExTally fun -> Doc ann #

prettyList :: [CekExTally fun] -> Doc ann #

(Show fun, Ord fun) => Pretty (TallyingSt fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

pretty :: TallyingSt fun -> Doc ann #

prettyList :: [TallyingSt fun] -> Doc ann #

Show fun => Pretty (ExBudgetCategory fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Methods

pretty :: ExBudgetCategory fun -> Doc ann #

prettyList :: [ExBudgetCategory fun] -> Doc ann #

Pretty a => Pretty (Maybe a) 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Maybe a -> Doc ann #

prettyList :: [Maybe a] -> Doc ann #

Pretty a => Pretty [a] 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: [a] -> Doc ann #

prettyList :: [[a]] -> Doc ann #

(Pretty a, Pretty b) => Pretty (Either a b) Source # 
Instance details

Defined in PlutusPrelude

Methods

pretty :: Either a b -> Doc ann #

prettyList :: [Either a b] -> Doc ann #

(Pretty structural, Pretty operational) => Pretty (EvaluationError structural operational) Source # 
Instance details

Defined in PlutusCore.Evaluation.Error

Methods

pretty :: EvaluationError structural operational -> Doc ann #

prettyList :: [EvaluationError structural operational] -> Doc ann #

(Pretty err, Pretty cause) => Pretty (ErrorWithCause err cause) Source # 
Instance details

Defined in PlutusCore.Evaluation.ErrorWithCause

Methods

pretty :: ErrorWithCause err cause -> Doc ann #

prettyList :: [ErrorWithCause err cause] -> Doc ann #

(Closed uni, Everywhere uni PrettyConst) => Pretty (ValueOf uni a) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

pretty :: ValueOf uni a -> Doc ann #

prettyList :: [ValueOf uni a] -> Doc ann #

DefaultPrettyBy config a => Pretty (AttachDefaultPrettyConfig config a) 
Instance details

Defined in Text.PrettyBy.Internal

Methods

pretty :: AttachDefaultPrettyConfig config a -> Doc ann #

prettyList :: [AttachDefaultPrettyConfig config a] -> Doc ann #

PrettyBy config a => Pretty (AttachPrettyConfig config a) 
Instance details

Defined in Text.PrettyBy.Internal

Methods

pretty :: AttachPrettyConfig config a -> Doc ann #

prettyList :: [AttachPrettyConfig config a] -> Doc ann #

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

Defined in PlutusCore.Pretty.PrettyConst

Methods

pretty :: Some (ValueOf uni) -> Doc ann #

prettyList :: [Some (ValueOf uni)] -> Doc ann #

(Pretty a1, Pretty a2) => Pretty (a1, a2) 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: (a1, a2) -> Doc ann #

prettyList :: [(a1, a2)] -> Doc ann #

Pretty a => Pretty (Const a b) 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Const a b -> Doc ann #

prettyList :: [Const a b] -> Doc ann #

(PrettyClassic tyname, PrettyParens (SomeTypeIn uni), Pretty ann) => Pretty (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

pretty :: Type tyname uni ann -> Doc ann0 #

prettyList :: [Type tyname uni ann] -> Doc ann0 #

Pretty (CekState uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.SteppableCek.Internal

Methods

pretty :: CekState uni fun ann -> Doc ann0 #

prettyList :: [CekState uni fun ann] -> Doc ann0 #

(Pretty a1, Pretty a2, Pretty a3) => Pretty (a1, a2, a3) 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: (a1, a2, a3) -> Doc ann #

prettyList :: [(a1, a2, a3)] -> Doc ann #

(PrettyClassic name, PrettyUni uni, Pretty fun, Pretty ann) => Pretty (Program name uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Pretty.Default

Methods

pretty :: Program name uni fun ann -> Doc ann0 #

prettyList :: [Program name uni fun ann] -> Doc ann0 #

(PrettyClassic name, PrettyUni uni, Pretty fun, Pretty ann) => Pretty (Term name uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Pretty.Default

Methods

pretty :: Term name uni fun ann -> Doc ann0 #

prettyList :: [Term name uni fun ann] -> Doc ann0 #

(PrettyClassic tyname, PrettyClassic name, PrettyUni uni, Pretty fun, Pretty ann) => Pretty (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

pretty :: Program tyname name uni fun ann -> Doc ann0 #

prettyList :: [Program tyname name uni fun ann] -> Doc ann0 #

(PrettyClassic tyname, PrettyClassic name, PrettyUni uni, Pretty fun, Pretty ann) => Pretty (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Default

Methods

pretty :: Term tyname name uni fun ann -> Doc ann0 #

prettyList :: [Term tyname name uni fun ann] -> Doc ann0 #

class PrettyBy config a where #

Minimal complete definition

Nothing

Methods

prettyBy :: config -> a -> Doc ann #

prettyListBy :: config -> [a] -> Doc ann #

Instances

Instances details
PrettyBy PrettyConfigPlc DefaultFun Source # 
Instance details

Defined in PlutusCore.Default.Builtins

PrettyBy ConstConfig ByteString Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

PrettyBy ConstConfig Element Source # 
Instance details

Defined in PlutusCore.Crypto.BLS12_381.G1

Methods

prettyBy :: ConstConfig -> Element -> Doc ann #

prettyListBy :: ConstConfig -> [Element] -> Doc ann #

PrettyBy ConstConfig Element Source # 
Instance details

Defined in PlutusCore.Crypto.BLS12_381.G2

Methods

prettyBy :: ConstConfig -> Element -> Doc ann #

prettyListBy :: ConstConfig -> [Element] -> Doc ann #

PrettyBy ConstConfig MlResult Source # 
Instance details

Defined in PlutusCore.Crypto.BLS12_381.Pairing

PrettyBy ConstConfig Data Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettyBy :: ConstConfig -> Data -> Doc ann #

prettyListBy :: ConstConfig -> [Data] -> Doc ann #

PrettyDefaultBy config Void => PrettyBy config Void 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Void -> Doc ann #

prettyListBy :: config -> [Void] -> Doc ann #

PrettyDefaultBy config Int16 => PrettyBy config Int16 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Int16 -> Doc ann #

prettyListBy :: config -> [Int16] -> Doc ann #

PrettyDefaultBy config Int32 => PrettyBy config Int32 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Int32 -> Doc ann #

prettyListBy :: config -> [Int32] -> Doc ann #

PrettyDefaultBy config Int64 => PrettyBy config Int64 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Int64 -> Doc ann #

prettyListBy :: config -> [Int64] -> Doc ann #

PrettyDefaultBy config Int8 => PrettyBy config Int8 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Int8 -> Doc ann #

prettyListBy :: config -> [Int8] -> Doc ann #

PrettyDefaultBy config Word16 => PrettyBy config Word16 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Word16 -> Doc ann #

prettyListBy :: config -> [Word16] -> Doc ann #

PrettyDefaultBy config Word32 => PrettyBy config Word32 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Word32 -> Doc ann #

prettyListBy :: config -> [Word32] -> Doc ann #

PrettyDefaultBy config Word64 => PrettyBy config Word64 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Word64 -> Doc ann #

prettyListBy :: config -> [Word64] -> Doc ann #

PrettyDefaultBy config Word8 => PrettyBy config Word8 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Word8 -> Doc ann #

prettyListBy :: config -> [Word8] -> Doc ann #

HasPrettyConfigName config => PrettyBy config DeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Methods

prettyBy :: config -> DeBruijn -> Doc ann #

prettyListBy :: config -> [DeBruijn] -> Doc ann #

HasPrettyConfigName config => PrettyBy config FakeNamedDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Methods

prettyBy :: config -> FakeNamedDeBruijn -> Doc ann #

prettyListBy :: config -> [FakeNamedDeBruijn] -> Doc ann #

HasPrettyConfigName config => PrettyBy config NamedDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Methods

prettyBy :: config -> NamedDeBruijn -> Doc ann #

prettyListBy :: config -> [NamedDeBruijn] -> Doc ann #

HasPrettyConfigName config => PrettyBy config NamedTyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Methods

prettyBy :: config -> NamedTyDeBruijn -> Doc ann #

prettyListBy :: config -> [NamedTyDeBruijn] -> Doc ann #

HasPrettyConfigName config => PrettyBy config TyDeBruijn Source # 
Instance details

Defined in PlutusCore.DeBruijn.Internal

Methods

prettyBy :: config -> TyDeBruijn -> Doc ann #

prettyListBy :: config -> [TyDeBruijn] -> Doc ann #

PrettyBy config ExBudget Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Methods

prettyBy :: config -> ExBudget -> Doc ann #

prettyListBy :: config -> [ExBudget] -> Doc ann #

PrettyBy config ExRestrictingBudget Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

Methods

prettyBy :: config -> ExRestrictingBudget -> Doc ann #

prettyListBy :: config -> [ExRestrictingBudget] -> Doc ann #

PrettyBy config ExCPU Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

prettyBy :: config -> ExCPU -> Doc ann #

prettyListBy :: config -> [ExCPU] -> Doc ann #

PrettyBy config ExMemory Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

Methods

prettyBy :: config -> ExMemory -> Doc ann #

prettyListBy :: config -> [ExMemory] -> Doc ann #

HasPrettyConfigName config => PrettyBy config Name Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

prettyBy :: config -> Name -> Doc ann #

prettyListBy :: config -> [Name] -> Doc ann #

HasPrettyConfigName config => PrettyBy config TyName Source # 
Instance details

Defined in PlutusCore.Name.Unique

Methods

prettyBy :: config -> TyName -> Doc ann #

prettyListBy :: config -> [TyName] -> Doc ann #

PrettyBy config CountingSt Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

prettyBy :: config -> CountingSt -> Doc ann #

prettyListBy :: config -> [CountingSt] -> Doc ann #

PrettyBy config RestrictingSt Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

prettyBy :: config -> RestrictingSt -> Doc ann #

prettyListBy :: config -> [RestrictingSt] -> Doc ann #

PrettyDefaultBy config Text => PrettyBy config Text 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Text -> Doc ann #

prettyListBy :: config -> [Text] -> Doc ann #

PrettyDefaultBy config Text => PrettyBy config Text 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Text -> Doc ann #

prettyListBy :: config -> [Text] -> Doc ann #

PrettyDefaultBy config Integer => PrettyBy config Integer 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Integer -> Doc ann #

prettyListBy :: config -> [Integer] -> Doc ann #

PrettyDefaultBy config Natural => PrettyBy config Natural 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Natural -> Doc ann #

prettyListBy :: config -> [Natural] -> Doc ann #

PrettyDefaultBy config () => PrettyBy config () 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> () -> Doc ann #

prettyListBy :: config -> [()] -> Doc ann #

PrettyDefaultBy config Bool => PrettyBy config Bool 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Bool -> Doc ann #

prettyListBy :: config -> [Bool] -> Doc ann #

PrettyDefaultBy config Char => PrettyBy config Char 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Char -> Doc ann #

prettyListBy :: config -> [Char] -> Doc ann #

PrettyDefaultBy config Double => PrettyBy config Double 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Double -> Doc ann #

prettyListBy :: config -> [Double] -> Doc ann #

PrettyDefaultBy config Float => PrettyBy config Float 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Float -> Doc ann #

prettyListBy :: config -> [Float] -> Doc ann #

PrettyDefaultBy config Int => PrettyBy config Int 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Int -> Doc ann #

prettyListBy :: config -> [Int] -> Doc ann #

PrettyDefaultBy config Word => PrettyBy config Word 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Word -> Doc ann #

prettyListBy :: config -> [Word] -> Doc ann #

DefaultPrettyPlcStrategy (Kind ann) => PrettyBy PrettyConfigPlc (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Plc

Methods

prettyBy :: PrettyConfigPlc -> Kind ann -> Doc ann0 #

prettyListBy :: PrettyConfigPlc -> [Kind ann] -> Doc ann0 #

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

DefaultPrettyPlcStrategy a => PrettyBy PrettyConfigPlcStrategy (PrettyAny a) Source # 
Instance details

Defined in PlutusCore.Pretty.Plc

DefaultPrettyBy ConstConfig (PrettyAny a) => PrettyBy ConstConfig (PrettyAny a) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettyBy :: ConstConfig -> PrettyAny a -> Doc ann #

prettyListBy :: ConstConfig -> [PrettyAny a] -> Doc ann #

PrettyBy RenderContext (DefaultUni a) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

prettyBy :: RenderContext -> DefaultUni a -> Doc ann #

prettyListBy :: RenderContext -> [DefaultUni a] -> Doc ann #

PrettyBy RenderContext (SomeTypeIn DefaultUni) Source # 
Instance details

Defined in PlutusCore.Default.Universe

Methods

prettyBy :: RenderContext -> SomeTypeIn DefaultUni -> Doc ann #

prettyListBy :: RenderContext -> [SomeTypeIn DefaultUni] -> Doc ann #

PrettyDefaultBy config (Identity a) => PrettyBy config (Identity a) 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Identity a -> Doc ann #

prettyListBy :: config -> [Identity a] -> Doc ann #

PrettyDefaultBy config (NonEmpty a) => PrettyBy config (NonEmpty a) 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> NonEmpty a -> Doc ann #

prettyListBy :: config -> [NonEmpty a] -> Doc ann #

PrettyDefaultBy config (Set a) => PrettyBy config (Set a) Source # 
Instance details

Defined in PlutusCore.Pretty.Extra

Methods

prettyBy :: config -> Set a -> Doc ann #

prettyListBy :: config -> [Set a] -> Doc ann #

PrettyBy config (t NameAnn) => PrettyBy config (ScopeCheckError t) Source # 
Instance details

Defined in PlutusCore.Check.Scoping

Methods

prettyBy :: config -> ScopeCheckError t -> Doc ann #

prettyListBy :: config -> [ScopeCheckError t] -> Doc ann #

PrettyBy config a => PrettyBy config (Normalized a) Source # 
Instance details

Defined in PlutusCore.Core.Type

Methods

prettyBy :: config -> Normalized a -> Doc ann #

prettyListBy :: config -> [Normalized a] -> Doc ann #

(HasPrettyDefaults config ~ 'True, Pretty fun) => PrettyBy config (MachineError fun) Source # 
Instance details

Defined in PlutusCore.Evaluation.Machine.Exception

Methods

prettyBy :: config -> MachineError fun -> Doc ann #

prettyListBy :: config -> [MachineError fun] -> Doc ann #

PrettyBy config a => PrettyBy config (EvaluationResult a) Source # 
Instance details

Defined in PlutusCore.Evaluation.Result

Methods

prettyBy :: config -> EvaluationResult a -> Doc ann #

prettyListBy :: config -> [EvaluationResult a] -> Doc ann #

PrettyDefaultBy config (AsReadable a) => PrettyBy config (AsReadable a) Source # 
Instance details

Defined in PlutusCore.Pretty.Readable

Methods

prettyBy :: config -> AsReadable a -> Doc ann #

prettyListBy :: config -> [AsReadable a] -> Doc ann #

(Show fun, Ord fun) => PrettyBy config (CekExTally fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

prettyBy :: config -> CekExTally fun -> Doc ann #

prettyListBy :: config -> [CekExTally fun] -> Doc ann #

(Show fun, Ord fun) => PrettyBy config (TallyingSt fun) Source # 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode

Methods

prettyBy :: config -> TallyingSt fun -> Doc ann #

prettyListBy :: config -> [TallyingSt fun] -> Doc ann #

Pretty a => PrettyBy config (IgnorePrettyConfig a) 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> IgnorePrettyConfig a -> Doc ann #

prettyListBy :: config -> [IgnorePrettyConfig a] -> Doc ann #

PrettyDefaultBy config a => PrettyBy config (PrettyCommon a) 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> PrettyCommon a -> Doc ann #

prettyListBy :: config -> [PrettyCommon a] -> Doc ann #

PrettyDefaultBy config (Maybe a) => PrettyBy config (Maybe a) 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Maybe a -> Doc ann #

prettyListBy :: config -> [Maybe a] -> Doc ann #

PrettyDefaultBy config [a] => PrettyBy config [a] 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> [a] -> Doc ann #

prettyListBy :: config -> [[a]] -> Doc ann #

(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 #

prettyListBy :: PrettyConfigPlc -> [CkValue uni fun] -> Doc ann #

(Closed uni, Everywhere uni PrettyConst) => PrettyBy ConstConfig (ValueOf uni a) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettyBy :: ConstConfig -> ValueOf uni a -> Doc ann #

prettyListBy :: ConstConfig -> [ValueOf uni a] -> Doc ann #

(Closed uni, Everywhere uni PrettyConst) => PrettyBy ConstConfig (Some (ValueOf uni)) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettyBy :: ConstConfig -> Some (ValueOf uni) -> Doc ann #

prettyListBy :: ConstConfig -> [Some (ValueOf uni)] -> Doc ann #

PrettyDefaultBy config (Either a b) => PrettyBy config (Either a b) Source #

An instance extending the set of types supporting default pretty-printing with Either.

Instance details

Defined in PlutusPrelude

Methods

prettyBy :: config -> Either a b -> Doc ann #

prettyListBy :: config -> [Either a b] -> Doc ann #

PrettyDefaultBy config (Map k v) => PrettyBy config (Map k v) Source # 
Instance details

Defined in PlutusCore.Pretty.Extra

Methods

prettyBy :: config -> Map k v -> Doc ann #

prettyListBy :: config -> [Map k v] -> Doc ann #

(HasPrettyDefaults config ~ 'True, PrettyBy config structural, Pretty operational) => PrettyBy config (EvaluationError structural operational) Source # 
Instance details

Defined in PlutusCore.Evaluation.Error

Methods

prettyBy :: config -> EvaluationError structural operational -> Doc ann #

prettyListBy :: config -> [EvaluationError structural operational] -> Doc ann #

(PrettyBy config cause, PrettyBy config err) => PrettyBy config (ErrorWithCause err cause) Source # 
Instance details

Defined in PlutusCore.Evaluation.ErrorWithCause

Methods

prettyBy :: config -> ErrorWithCause err cause -> Doc ann #

prettyListBy :: config -> [ErrorWithCause err cause] -> Doc ann #

PrettyDefaultBy config (a, b) => PrettyBy config (a, b) 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> (a, b) -> Doc ann #

prettyListBy :: config -> [(a, b)] -> Doc ann #

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 #

prettyListBy :: PrettyConfigPlc -> [Type tyname uni ann] -> Doc ann0 #

(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 #

prettyListBy :: PrettyConfigPlc -> [Error uni fun ann] -> Doc ann0 #

(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 #

prettyListBy :: PrettyConfigPlc -> [CekValue uni fun ann] -> Doc ann0 #

PrettyDefaultBy config (Const a b) => PrettyBy config (Const a b) 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> Const a b -> Doc ann #

prettyListBy :: config -> [Const a b] -> Doc ann #

PrettyDefaultBy config (a, b, c) => PrettyBy config (a, b, c) 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> (a, b, c) -> Doc ann #

prettyListBy :: config -> [(a, b, c)] -> Doc ann #

(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 #

prettyListBy :: PrettyConfigPlc -> [TypeError term uni fun ann] -> Doc ann0 #

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 #

prettyListBy :: PrettyConfigPlc -> [UnrestrictedProgram name uni fun ann] -> Doc ann0 #

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 #

prettyListBy :: PrettyConfigPlc -> [Program name uni fun ann] -> Doc ann0 #

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 #

prettyListBy :: PrettyConfigPlc -> [Term name uni fun ann] -> Doc ann0 #

PrettyBy config (Term name uni fun a) => PrettyBy config (EvalOrder name uni fun a) Source # 
Instance details

Defined in UntypedPlutusCore.Purity

Methods

prettyBy :: config -> EvalOrder name uni fun a -> Doc ann #

prettyListBy :: config -> [EvalOrder name uni fun a] -> Doc ann #

PrettyBy config (Term name uni fun a) => PrettyBy config (EvalTerm name uni fun a) Source # 
Instance details

Defined in UntypedPlutusCore.Purity

Methods

prettyBy :: config -> EvalTerm name uni fun a -> Doc ann #

prettyListBy :: config -> [EvalTerm name uni fun a] -> Doc ann #

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 #

prettyListBy :: PrettyConfigPlc -> [Program tyname name uni fun ann] -> Doc ann0 #

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 #

prettyListBy :: PrettyConfigPlc -> [Term tyname name uni fun ann] -> Doc ann0 #

(Pretty ann, PrettyBy config (Type tyname uni ann), PrettyBy config (Term tyname name uni fun ann)) => PrettyBy config (NormCheckError tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Error

Methods

prettyBy :: config -> NormCheckError tyname name uni fun ann -> Doc ann0 #

prettyListBy :: config -> [NormCheckError tyname name uni fun ann] -> Doc ann0 #

Pretty ann => PrettyBy (PrettyConfigClassic configName) (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

prettyBy :: PrettyConfigClassic configName -> Kind ann -> Doc ann0 #

prettyListBy :: PrettyConfigClassic configName -> [Kind ann] -> Doc ann0 #

PrettyBy (PrettyConfigReadable configName) (Kind a) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Kind a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Kind a] -> Doc ann #

PrettyReadableBy configName a => PrettyBy (PrettyConfigReadable configName) (Parened a) Source # 
Instance details

Defined in PlutusCore.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Parened a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Parened a] -> Doc ann #

PrettyReadableBy configName tyname => PrettyBy (PrettyConfigReadable configName) (TyVarDecl tyname ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> TyVarDecl tyname ann -> Doc ann0 #

prettyListBy :: PrettyConfigReadable configName -> [TyVarDecl tyname ann] -> Doc ann0 #

(PrettyClassicBy configName tyname, PrettyParens (SomeTypeIn uni), Pretty ann) => PrettyBy (PrettyConfigClassic configName) (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

prettyBy :: PrettyConfigClassic configName -> Type tyname uni ann -> Doc ann0 #

prettyListBy :: PrettyConfigClassic configName -> [Type tyname uni ann] -> Doc ann0 #

(PrettyReadableBy configName tyname, PrettyParens (SomeTypeIn uni)) => PrettyBy (PrettyConfigReadable configName) (Type tyname uni a) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Type tyname uni a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Type tyname uni a] -> Doc ann #

(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

(PrettyClassicBy configName (Term name uni fun ann), Pretty ann) => PrettyBy (PrettyConfigClassic configName) (Program name uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Pretty.Classic

Methods

prettyBy :: PrettyConfigClassic configName -> Program name uni fun ann -> Doc ann0 #

prettyListBy :: PrettyConfigClassic configName -> [Program name uni fun ann] -> Doc ann0 #

(PrettyClassicBy configName name, PrettyUni uni, Pretty fun, Pretty ann) => PrettyBy (PrettyConfigClassic configName) (Term name uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Pretty.Classic

Methods

prettyBy :: PrettyConfigClassic configName -> Term name uni fun ann -> Doc ann0 #

prettyListBy :: PrettyConfigClassic configName -> [Term name uni fun ann] -> Doc ann0 #

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

Defined in UntypedPlutusCore.Core.Instance.Flat

(PrettyReadableBy configName tyname, PrettyReadableBy configName name, PrettyUni uni) => PrettyBy (PrettyConfigReadable configName) (VarDecl tyname name uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> VarDecl tyname name uni ann -> Doc ann0 #

prettyListBy :: PrettyConfigReadable configName -> [VarDecl tyname name uni ann] -> Doc ann0 #

PrettyReadableBy configName (Term name uni fun a) => PrettyBy (PrettyConfigReadable configName) (Program name uni fun a) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Program name uni fun a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Program name uni fun a] -> Doc ann #

(PrettyReadableBy configName name, PrettyUni uni, Pretty fun, Show configName) => PrettyBy (PrettyConfigReadable configName) (Term name uni fun a) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Term name uni fun a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Term name uni fun a] -> Doc ann #

(PrettyClassicBy configName (Term tyname name uni fun ann), Pretty ann) => PrettyBy (PrettyConfigClassic configName) (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

prettyBy :: PrettyConfigClassic configName -> Program tyname name uni fun ann -> Doc ann0 #

prettyListBy :: PrettyConfigClassic configName -> [Program tyname name uni fun ann] -> Doc ann0 #

(PrettyClassicBy configName tyname, PrettyClassicBy configName name, PrettyUni uni, Pretty fun, Pretty ann) => PrettyBy (PrettyConfigClassic configName) (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

prettyBy :: PrettyConfigClassic configName -> Term tyname name uni fun ann -> Doc ann0 #

prettyListBy :: PrettyConfigClassic configName -> [Term tyname name uni fun ann] -> Doc ann0 #

PrettyReadableBy configName (Term tyname name uni fun a) => PrettyBy (PrettyConfigReadable configName) (Program tyname name uni fun a) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Program tyname name uni fun a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Program tyname name uni fun a] -> Doc ann #

(PrettyReadableBy configName tyname, PrettyReadableBy configName name, PrettyUni uni, Pretty fun) => PrettyBy (PrettyConfigReadable configName) (Term tyname name uni fun a) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Term tyname name uni fun a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Term tyname name uni fun a] -> Doc ann #

newtype IgnorePrettyConfig a #

Constructors

IgnorePrettyConfig 

Instances

Instances details
Pretty a => PrettyBy config (IgnorePrettyConfig a) 
Instance details

Defined in Text.PrettyBy.Internal

Methods

prettyBy :: config -> IgnorePrettyConfig a -> Doc ann #

prettyListBy :: config -> [IgnorePrettyConfig a] -> Doc ann #

data AttachPrettyConfig config a #

Constructors

AttachPrettyConfig !config !a 

Instances

Instances details
PrettyBy config a => Pretty (AttachPrettyConfig config a) 
Instance details

Defined in Text.PrettyBy.Internal

Methods

pretty :: AttachPrettyConfig config a -> Doc ann #

prettyList :: [AttachPrettyConfig config a] -> Doc ann #

class Render str where #

Methods

render :: Doc ann -> str #

Instances

Instances details
Render Text 
Instance details

Defined in Text.PrettyBy.Default

Methods

render :: Doc ann -> Text #

Render Text 
Instance details

Defined in Text.PrettyBy.Default

Methods

render :: Doc ann -> Text #

a ~ Char => Render [a] 
Instance details

Defined in Text.PrettyBy.Default

Methods

render :: Doc ann -> [a] #

type PrettyParens = PrettyBy RenderContext Source #

For pretty-printing a value with a minimum amount of parens.

display :: forall str a. (Pretty a, Render str) => a -> str #

displayBy :: forall str a config. (PrettyBy config a, Render str) => config -> a -> str #

juxtRenderContext :: RenderContext Source #

An initial RenderContextOver. An expression printed in this context gets enclosed in parens unless its outermost operator (if any) binds even stronger than function application.

Defaults

prettyPlc :: PrettyPlc a => a -> Doc ann Source #

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

displayPlc :: (PrettyPlc a, Render str) => a -> str Source #

Render a value to String in the default mode using the classic view.

prettyPlcSimple :: PrettyPlc a => a -> Doc ann Source #

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

displayPlcSimple :: (PrettyPlc a, Render str) => a -> str Source #

Render a value to String in the debug mode using the classic view.

Global configuration

data CondensedErrors Source #

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

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

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

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 #

prettyListBy :: PrettyConfigPlc -> [Kind ann] -> Doc ann0 #

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 #

prettyListBy :: PrettyConfigPlc -> [CkValue uni fun] -> Doc ann #

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 #

prettyListBy :: PrettyConfigPlc -> [Type tyname uni ann] -> Doc ann0 #

(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 #

prettyListBy :: PrettyConfigPlc -> [Error uni fun ann] -> Doc ann0 #

(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 #

prettyListBy :: PrettyConfigPlc -> [CekValue uni fun ann] -> Doc ann0 #

(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 #

prettyListBy :: PrettyConfigPlc -> [TypeError term uni fun ann] -> Doc ann0 #

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 #

prettyListBy :: PrettyConfigPlc -> [UnrestrictedProgram name uni fun ann] -> Doc ann0 #

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 #

prettyListBy :: PrettyConfigPlc -> [Program name uni fun ann] -> Doc ann0 #

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 #

prettyListBy :: PrettyConfigPlc -> [Term name uni fun ann] -> Doc ann0 #

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 #

prettyListBy :: PrettyConfigPlc -> [Program tyname name uni fun ann] -> Doc ann0 #

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 #

prettyListBy :: PrettyConfigPlc -> [Term tyname name uni fun ann] -> Doc ann0 #

type HasPrettyDefaults PrettyConfigPlc Source # 
Instance details

Defined in PlutusCore.Pretty.Plc

type PrettyPlc = PrettyBy PrettyConfigPlc Source #

The "pretty-printable PLC entity" constraint.

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).

displayPlcCondensedErrorClassic :: (PrettyPlc a, Render str) => a -> str Source #

Render an error to String in the condensed manner using the classic view.

Names

newtype PrettyConfigName Source #

A config that determines how to pretty-print a PLC name.

Constructors

PrettyConfigName 

Fields

Instances

Instances details
Show PrettyConfigName Source # 
Instance details

Defined in PlutusCore.Pretty.ConfigName

Eq PrettyConfigName Source # 
Instance details

Defined in PlutusCore.Pretty.ConfigName

HasPrettyConfigName (Sole PrettyConfigName) Source # 
Instance details

Defined in PlutusCore.Pretty.ConfigName

(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

type HasPrettyDefaults PrettyConfigName Source # 
Instance details

Defined in PlutusCore.Pretty.ConfigName

prettyConfigName :: PrettyConfigName Source #

The PrettyConfigName used by default: print Unique indexes after nams.

prettyConfigNameSimple :: PrettyConfigName Source #

The PrettyConfigName to be used when Unique indices don't matter. Easier to read.

Classic view

data PrettyConfigClassic configName Source #

Configuration for the classic pretty-printing.

Constructors

PrettyConfigClassic 

Fields

Instances

Instances details
Show configName => Show (PrettyConfigClassic configName) Source # 
Instance details

Defined in PlutusCore.Pretty.Classic

configName ~ PrettyConfigName => HasPrettyConfigName (PrettyConfigClassic configName) Source # 
Instance details

Defined in PlutusCore.Pretty.Classic

Pretty ann => PrettyBy (PrettyConfigClassic configName) (Kind ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

prettyBy :: PrettyConfigClassic configName -> Kind ann -> Doc ann0 #

prettyListBy :: PrettyConfigClassic configName -> [Kind ann] -> Doc ann0 #

(PrettyClassicBy configName tyname, PrettyParens (SomeTypeIn uni), Pretty ann) => PrettyBy (PrettyConfigClassic configName) (Type tyname uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

prettyBy :: PrettyConfigClassic configName -> Type tyname uni ann -> Doc ann0 #

prettyListBy :: PrettyConfigClassic configName -> [Type tyname uni ann] -> Doc ann0 #

(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

(PrettyClassicBy configName (Term name uni fun ann), Pretty ann) => PrettyBy (PrettyConfigClassic configName) (Program name uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Pretty.Classic

Methods

prettyBy :: PrettyConfigClassic configName -> Program name uni fun ann -> Doc ann0 #

prettyListBy :: PrettyConfigClassic configName -> [Program name uni fun ann] -> Doc ann0 #

(PrettyClassicBy configName name, PrettyUni uni, Pretty fun, Pretty ann) => PrettyBy (PrettyConfigClassic configName) (Term name uni fun ann) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Pretty.Classic

Methods

prettyBy :: PrettyConfigClassic configName -> Term name uni fun ann -> Doc ann0 #

prettyListBy :: PrettyConfigClassic configName -> [Term name uni fun ann] -> Doc ann0 #

(PrettyClassicBy configName (Term tyname name uni fun ann), Pretty ann) => PrettyBy (PrettyConfigClassic configName) (Program tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

prettyBy :: PrettyConfigClassic configName -> Program tyname name uni fun ann -> Doc ann0 #

prettyListBy :: PrettyConfigClassic configName -> [Program tyname name uni fun ann] -> Doc ann0 #

(PrettyClassicBy configName tyname, PrettyClassicBy configName name, PrettyUni uni, Pretty fun, Pretty ann) => PrettyBy (PrettyConfigClassic configName) (Term tyname name uni fun ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Classic

Methods

prettyBy :: PrettyConfigClassic configName -> Term tyname name uni fun ann -> Doc ann0 #

prettyListBy :: PrettyConfigClassic configName -> [Term tyname name uni fun ann] -> Doc ann0 #

type HasPrettyDefaults (PrettyConfigClassic _1) Source # 
Instance details

Defined in PlutusCore.Pretty.Classic

type PrettyClassicBy configName = PrettyBy (PrettyConfigClassic configName) Source #

The "classically pretty-printable" constraint.

consAnnIf :: Pretty ann => PrettyConfigClassic configName -> ann -> [Doc dann] -> [Doc dann] Source #

Add a pretty-printed annotation to a list of Docs if the given config enables pretty-printing of annotations.

prettyClassic :: PrettyClassic a => a -> Doc ann Source #

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

prettyClassicSimple :: PrettyClassic a => a -> Doc ann Source #

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

Readable view

data ShowKinds Source #

Instances

Instances details
Show ShowKinds Source # 
Instance details

Defined in PlutusCore.Pretty.Readable

Default ShowKinds Source # 
Instance details

Defined in PlutusCore.Pretty.Readable

Methods

def :: ShowKinds #

Eq ShowKinds Source # 
Instance details

Defined in PlutusCore.Pretty.Readable

data PrettyConfigReadable configName Source #

Configuration for the readable pretty-printing.

Constructors

PrettyConfigReadable 

Fields

Instances

Instances details
Show configName => Show (PrettyConfigReadable configName) Source # 
Instance details

Defined in PlutusCore.Pretty.Readable

configName ~ PrettyConfigName => HasPrettyConfigName (PrettyConfigReadable configName) Source # 
Instance details

Defined in PlutusCore.Pretty.Readable

HasRenderContext (PrettyConfigReadable configName) Source # 
Instance details

Defined in PlutusCore.Pretty.Readable

Methods

renderContext :: Lens' (PrettyConfigReadable configName) RenderContext

PrettyBy (PrettyConfigReadable configName) (Kind a) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Kind a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Kind a] -> Doc ann #

PrettyReadableBy configName a => PrettyBy (PrettyConfigReadable configName) (Parened a) Source # 
Instance details

Defined in PlutusCore.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Parened a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Parened a] -> Doc ann #

PrettyReadableBy configName tyname => PrettyBy (PrettyConfigReadable configName) (TyVarDecl tyname ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> TyVarDecl tyname ann -> Doc ann0 #

prettyListBy :: PrettyConfigReadable configName -> [TyVarDecl tyname ann] -> Doc ann0 #

(PrettyReadableBy configName tyname, PrettyParens (SomeTypeIn uni)) => PrettyBy (PrettyConfigReadable configName) (Type tyname uni a) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Type tyname uni a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Type tyname uni a] -> Doc ann #

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

Defined in UntypedPlutusCore.Core.Instance.Flat

(PrettyReadableBy configName tyname, PrettyReadableBy configName name, PrettyUni uni) => PrettyBy (PrettyConfigReadable configName) (VarDecl tyname name uni ann) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> VarDecl tyname name uni ann -> Doc ann0 #

prettyListBy :: PrettyConfigReadable configName -> [VarDecl tyname name uni ann] -> Doc ann0 #

PrettyReadableBy configName (Term name uni fun a) => PrettyBy (PrettyConfigReadable configName) (Program name uni fun a) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Program name uni fun a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Program name uni fun a] -> Doc ann #

(PrettyReadableBy configName name, PrettyUni uni, Pretty fun, Show configName) => PrettyBy (PrettyConfigReadable configName) (Term name uni fun a) Source # 
Instance details

Defined in UntypedPlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Term name uni fun a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Term name uni fun a] -> Doc ann #

PrettyReadableBy configName (Term tyname name uni fun a) => PrettyBy (PrettyConfigReadable configName) (Program tyname name uni fun a) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Program tyname name uni fun a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Program tyname name uni fun a] -> Doc ann #

(PrettyReadableBy configName tyname, PrettyReadableBy configName name, PrettyUni uni, Pretty fun) => PrettyBy (PrettyConfigReadable configName) (Term tyname name uni fun a) Source # 
Instance details

Defined in PlutusCore.Core.Instance.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Term tyname name uni fun a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Term tyname name uni fun a] -> Doc ann #

type HasPrettyDefaults (PrettyConfigReadable _1) Source # 
Instance details

Defined in PlutusCore.Pretty.Readable

prettyReadable :: PrettyReadable a => a -> Doc ann Source #

Pretty-print something with the PrettyConfigReadable config.

prettyReadableSimple :: PrettyReadable a => a -> Doc ann Source #

Pretty-print something with the PrettyConfigReadableSimple config.

pcrConfigName :: forall configName configName. Lens (PrettyConfigReadable configName) (PrettyConfigReadable configName) configName configName Source #

pcrRenderContext :: forall configName. Lens' (PrettyConfigReadable configName) RenderContext Source #

pcrShowKinds :: forall configName. Lens' (PrettyConfigReadable configName) ShowKinds Source #

type PrettyReadableBy configName = PrettyBy (PrettyConfigReadable configName) Source #

The "readably pretty-printable" constraint.

newtype AsReadable a Source #

For rendering things in a readable manner regardless of the pretty-printing function chosen. I.e. all of show, pretty, prettyClassic will use PrettyReadable instead of doing what they normally do. prettyBy config (AsReadable x) requires config to have a PrettyConfigName and respects it.

This wrapper can be particularly useful if you want to apply a function having a Show or Pretty or PrettyClassic or PrettyPlc or whatever constraint, but want to get the argument rendered in a readable manner instead.

Constructors

AsReadable 

Fields

Instances

Instances details
(HasPrettyConfigName config, PrettyReadable a) => DefaultPrettyBy config (AsReadable a) Source # 
Instance details

Defined in PlutusCore.Pretty.Readable

Methods

defaultPrettyBy :: config -> AsReadable a -> Doc ann

defaultPrettyListBy :: config -> [AsReadable a] -> Doc ann

PrettyDefaultBy config (AsReadable a) => PrettyBy config (AsReadable a) Source # 
Instance details

Defined in PlutusCore.Pretty.Readable

Methods

prettyBy :: config -> AsReadable a -> Doc ann #

prettyListBy :: config -> [AsReadable a] -> Doc ann #

PrettyReadable a => Show (AsReadable a) Source # 
Instance details

Defined in PlutusCore.Pretty.Readable

PrettyReadable a => Pretty (AsReadable a) Source # 
Instance details

Defined in PlutusCore.Pretty.Readable

Methods

pretty :: AsReadable a -> Doc ann #

prettyList :: [AsReadable a] -> Doc ann #

data Parened a Source #

A value of type a to render in parens using the readable pretty-printer.

Constructors

Parened 

Instances

Instances details
PrettyReadableBy configName a => PrettyBy (PrettyConfigReadable configName) (Parened a) Source # 
Instance details

Defined in PlutusCore.Pretty.Readable

Methods

prettyBy :: PrettyConfigReadable configName -> Parened a -> Doc ann #

prettyListBy :: PrettyConfigReadable configName -> [Parened a] -> Doc ann #

inBraces :: a -> Parened a Source #

Enclose the given value, so that it's rendered inside of braces with no additional parens regardless of the RenderContextOver.

topPrettyConfigReadable :: configName -> ShowKinds -> PrettyConfigReadable configName Source #

A PrettyConfigReadable with the fixity specified to topFixity.

botPrettyConfigReadable :: configName -> ShowKinds -> PrettyConfigReadable configName Source #

A PrettyConfigReadable with the fixity specified to botFixity.

binderFixity :: Fixity Source #

The fixity of a binder.

arrowFixity :: Fixity Source #

The fixity of (->).

iterTyForallPrettyM :: (MonadPrettyReadable configName env m, PrettyReadableBy configName arg, PrettyReadableBy configName body) => [arg] -> body -> m (Doc ann) Source #

Lay out an iterated TyForall via iterBinderPrettyM.

iterLamAbsPrettyM :: (MonadPrettyReadable configName env m, PrettyReadableBy configName arg, PrettyReadableBy configName body) => [arg] -> body -> m (Doc ann) Source #

Lay out an iterated LamAbs via iterBinderPrettyM.

iterTyAbsPrettyM :: (MonadPrettyReadable configName env m, PrettyReadableBy configName arg, PrettyReadableBy configName body) => [arg] -> body -> m (Doc ann) Source #

Lay out an iterated TyAbs via iterBinderPrettyM.

iterArrowPrettyM :: (MonadPrettyReadable configName env m, PrettyReadableBy configName a) => [a] -> a -> m (Doc ann) Source #

Lay out an iterated ->.

iterAppDocM :: MonadPrettyContext config env m => (AnyToDoc config ann -> AnyToDoc config ann -> NonEmpty (Doc ann)) -> m (Doc ann) Source #

Lay out an iteration application, providing to the caller a function to render the head of the application and a function to render each of the arguments.

iterInterAppPrettyM :: (MonadPrettyReadable configName env m, PrettyReadableBy configName fun, PrettyReadableBy configName ty, PrettyReadableBy configName term) => fun -> [Either ty term] -> m (Doc ann) Source #

Lay out interleaved function applications either as

foo {a} x {b} y z

or as

foo
  {a}
  x
  {b}
  y
  z

Lefts are laid out in braces, Rights are laid out without braces.

iterAppPrettyM :: (MonadPrettyContext config env m, PrettyBy config fun, PrettyBy config term) => fun -> [term] -> m (Doc ann) Source #

Lay out iterated function applications either as

foo x y z

or as

foo
  x
  y
  z

Utils

newtype ConstConfig Source #

The type of configs used for pretty-printing constants. Has a RenderContextOver inside, so that we don't add redundant parens to the output.

Constructors

ConstConfig 

Fields

Instances

Instances details
HasRenderContext ConstConfig Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

renderContext :: Lens' ConstConfig RenderContext

NonDefaultPrettyBy ConstConfig Text Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

NonDefaultPrettyBy ConstConfig Integer Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

NonDefaultPrettyBy ConstConfig () Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

NonDefaultPrettyBy ConstConfig Bool Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

PrettyBy ConstConfig ByteString Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

PrettyBy ConstConfig Element Source # 
Instance details

Defined in PlutusCore.Crypto.BLS12_381.G1

Methods

prettyBy :: ConstConfig -> Element -> Doc ann #

prettyListBy :: ConstConfig -> [Element] -> Doc ann #

PrettyBy ConstConfig Element Source # 
Instance details

Defined in PlutusCore.Crypto.BLS12_381.G2

Methods

prettyBy :: ConstConfig -> Element -> Doc ann #

prettyListBy :: ConstConfig -> [Element] -> Doc ann #

PrettyBy ConstConfig MlResult Source # 
Instance details

Defined in PlutusCore.Crypto.BLS12_381.Pairing

PrettyBy ConstConfig Data Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettyBy :: ConstConfig -> Data -> Doc ann #

prettyListBy :: ConstConfig -> [Data] -> Doc ann #

Show a => DefaultPrettyBy ConstConfig (PrettyAny a) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

DefaultPrettyBy ConstConfig (PrettyAny a) => NonDefaultPrettyBy ConstConfig (PrettyAny a) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

PrettyConst a => NonDefaultPrettyBy ConstConfig [a] Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

nonDefaultPrettyBy :: ConstConfig -> [a] -> Doc ann

nonDefaultPrettyListBy :: ConstConfig -> [[a]] -> Doc ann

DefaultPrettyBy ConstConfig (PrettyAny a) => PrettyBy ConstConfig (PrettyAny a) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettyBy :: ConstConfig -> PrettyAny a -> Doc ann #

prettyListBy :: ConstConfig -> [PrettyAny a] -> Doc ann #

(PrettyConst a, PrettyConst b) => NonDefaultPrettyBy ConstConfig (a, b) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

nonDefaultPrettyBy :: ConstConfig -> (a, b) -> Doc ann

nonDefaultPrettyListBy :: ConstConfig -> [(a, b)] -> Doc ann

(Closed uni, Everywhere uni PrettyConst) => PrettyBy ConstConfig (ValueOf uni a) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettyBy :: ConstConfig -> ValueOf uni a -> Doc ann #

prettyListBy :: ConstConfig -> [ValueOf uni a] -> Doc ann #

(Closed uni, Everywhere uni PrettyConst) => PrettyBy ConstConfig (Some (ValueOf uni)) Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

Methods

prettyBy :: ConstConfig -> Some (ValueOf uni) -> Doc ann #

prettyListBy :: ConstConfig -> [Some (ValueOf uni)] -> Doc ann #

type HasPrettyDefaults ConstConfig Source # 
Instance details

Defined in PlutusCore.Pretty.PrettyConst

type PrettyUni uni = (PrettyParens (SomeTypeIn uni), Closed uni, uni `Everywhere` PrettyConst) Source #

The set of constraints we need to be able to print built-in types and their values.

type ThrowableBuiltins uni fun = (PrettyUni uni, Pretty fun, Typeable uni, Typeable fun) Source #

The set of constraints we need to be able to throw exceptions with things with built-in types and functions in them.

prettyConst :: PrettyConst a => RenderContext -> a -> Doc ann Source #