Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cardano.Api.Internal.Pretty
Synopsis
- type Ann = AnsiStyle
- data Doc ann
- class Pretty a where
- pretty :: a -> Doc ann
- prettyList :: [a] -> Doc ann
- newtype ShowOf a = ShowOf a
- docToLazyText :: Doc AnsiStyle -> Text
- docToText :: Doc AnsiStyle -> Text
- docToString :: Doc AnsiStyle -> String
- pshow :: Show a => a -> Doc ann
- prettyException :: Exception a => a -> Doc ann
- hsep :: [Doc ann] -> Doc ann
- vsep :: [Doc ann] -> Doc ann
- (<+>) :: Doc ann -> Doc ann -> Doc ann
- black :: Doc AnsiStyle -> Doc AnsiStyle
- red :: Doc AnsiStyle -> Doc AnsiStyle
- green :: Doc AnsiStyle -> Doc AnsiStyle
- yellow :: Doc AnsiStyle -> Doc AnsiStyle
- blue :: Doc AnsiStyle -> Doc AnsiStyle
- magenta :: Doc AnsiStyle -> Doc AnsiStyle
- cyan :: Doc AnsiStyle -> Doc AnsiStyle
- white :: Doc AnsiStyle -> Doc AnsiStyle
Documentation
Ann
is the prettyprinter annotation for cardano-api and cardano-cli to enable the printing
of colored output. This is a type alias for AnsiStyle.
Instances
Minimal complete definition
Instances
Pretty Void | |
Defined in Prettyprinter.Internal | |
Pretty Int16 | |
Defined in Prettyprinter.Internal | |
Pretty Int32 | |
Defined in Prettyprinter.Internal | |
Pretty Int64 | |
Defined in Prettyprinter.Internal | |
Pretty Int8 | |
Defined in Prettyprinter.Internal | |
Pretty Word16 | |
Defined in Prettyprinter.Internal | |
Pretty Word32 | |
Defined in Prettyprinter.Internal | |
Pretty Word64 | |
Defined in Prettyprinter.Internal | |
Pretty Word8 | |
Defined in Prettyprinter.Internal | |
Pretty AnyCardanoEra Source # | |
Defined in Cardano.Api.Internal.Eras.Core | |
Pretty TxOutInAnyEra Source # | |
Defined in Cardano.Api.Internal.Tx.Body | |
Pretty TxIn Source # | |
Defined in Cardano.Api.Internal.TxIn | |
Pretty Coin Source # | |
Defined in Cardano.Api.Internal.Orphans | |
Pretty Error Source # | |
Defined in Cardano.Api.Internal.Orphans | |
Pretty Ann | |
Defined in PlutusCore.Annotation | |
Pretty SrcSpan | |
Defined in PlutusCore.Annotation | |
Pretty SrcSpans | |
Defined in PlutusCore.Annotation | |
Pretty BuiltinError | |
Defined in PlutusCore.Builtin.Result | |
Pretty UnliftingError | |
Defined in PlutusCore.Builtin.Result | |
Pretty UnliftingEvaluationError | |
Defined in PlutusCore.Builtin.Result Methods pretty :: UnliftingEvaluationError -> Doc ann # prettyList :: [UnliftingEvaluationError] -> Doc ann # | |
Pretty Data | |
Defined in PlutusCore.Data | |
Pretty FreeVariableError | |
Defined in PlutusCore.DeBruijn.Internal | |
Pretty Index | |
Defined in PlutusCore.DeBruijn.Internal | |
Pretty DefaultFun | |
Defined in PlutusCore.Default.Builtins | |
Pretty ParserError | |
Defined in PlutusCore.Error | |
Pretty ParserErrorBundle | |
Defined in PlutusCore.Error | |
Pretty CkUserError | |
Defined in PlutusCore.Evaluation.Machine.Ck | |
Pretty CostModelApplyError | |
Pretty CostModelApplyWarn | |
Pretty ExBudget | |
Defined in PlutusCore.Evaluation.Machine.ExBudget | |
Pretty ExRestrictingBudget | |
Defined in PlutusCore.Evaluation.Machine.ExBudget | |
Pretty ExCPU | |
Defined in PlutusCore.Evaluation.Machine.ExMemory | |
Pretty ExMemory | |
Defined in PlutusCore.Evaluation.Machine.ExMemory | |
Pretty Unique | |
Defined in PlutusCore.Name.Unique | |
Pretty Version | |
Defined in PlutusCore.Version | |
Pretty CountingSt | |
Pretty RestrictingSt | |
Pretty CekUserError | |
Pretty DatatypeComponent | |
Defined in PlutusIR.Compiler.Provenance | |
Pretty GeneratedKind | |
Defined in PlutusIR.Compiler.Provenance | |
Pretty EvaluationError | |
Defined in PlutusLedgerApi.Common.Eval | |
Pretty MajorProtocolVersion | |
Defined in PlutusLedgerApi.Common.ProtocolVersions | |
Pretty ScriptDecodeError | |
Defined in PlutusLedgerApi.Common.SerialisedScript | |
Pretty PlutusLedgerLanguage | |
Defined in PlutusLedgerApi.Common.Versions | |
Pretty Address | |
Defined in PlutusLedgerApi.V1.Address | |
Pretty LedgerBytes | |
Defined in PlutusLedgerApi.V1.Bytes | |
Pretty ScriptContext | |
Defined in PlutusLedgerApi.V1.Contexts | |
Pretty ScriptPurpose | |
Defined in PlutusLedgerApi.V1.Contexts | |
Pretty TxInInfo | |
Defined in PlutusLedgerApi.V1.Contexts | |
Pretty TxInfo | |
Defined in PlutusLedgerApi.V1.Contexts | |
Pretty Credential | |
Defined in PlutusLedgerApi.V1.Credential | |
Pretty StakingCredential | |
Defined in PlutusLedgerApi.V1.Credential | |
Pretty PubKeyHash | using hex encoding |
Defined in PlutusLedgerApi.V1.Crypto | |
Pretty DCert | |
Defined in PlutusLedgerApi.V1.DCert | |
Pretty ScriptContext | |
Defined in PlutusLedgerApi.V1.Data.Contexts | |
Pretty ScriptPurpose | |
Defined in PlutusLedgerApi.V1.Data.Contexts | |
Pretty TxInInfo | |
Defined in PlutusLedgerApi.V1.Data.Contexts | |
Pretty TxInfo | |
Defined in PlutusLedgerApi.V1.Data.Contexts | |
Pretty TxId | using hex encoding |
Defined in PlutusLedgerApi.V1.Data.Tx | |
Pretty TxOut | |
Defined in PlutusLedgerApi.V1.Data.Tx | |
Pretty TxOutRef | |
Defined in PlutusLedgerApi.V1.Data.Tx | |
Pretty AssetClass | |
Defined in PlutusLedgerApi.V1.Data.Value | |
Pretty CurrencySymbol | using hex encoding |
Defined in PlutusLedgerApi.V1.Data.Value | |
Pretty Lovelace | |
Defined in PlutusLedgerApi.V1.Data.Value | |
Pretty TokenName | |
Defined in PlutusLedgerApi.V1.Data.Value | |
Pretty Value | |
Defined in PlutusLedgerApi.V1.Data.Value | |
Pretty Context | |
Defined in PlutusLedgerApi.V1.Scripts | |
Pretty Datum | |
Defined in PlutusLedgerApi.V1.Scripts | |
Pretty DatumHash | using hex encoding |
Defined in PlutusLedgerApi.V1.Scripts | |
Pretty Redeemer | |
Defined in PlutusLedgerApi.V1.Scripts | |
Pretty RedeemerHash | using hex encoding |
Defined in PlutusLedgerApi.V1.Scripts | |
Pretty ScriptHash | using hex encoding |
Defined in PlutusLedgerApi.V1.Scripts | |
Pretty POSIXTime | |
Defined in PlutusLedgerApi.V1.Time | |
Pretty TxId | using hex encoding |
Defined in PlutusLedgerApi.V1.Tx | |
Pretty TxOut | |
Defined in PlutusLedgerApi.V1.Tx | |
Pretty TxOutRef | |
Defined in PlutusLedgerApi.V1.Tx | |
Pretty AssetClass | |
Defined in PlutusLedgerApi.V1.Value | |
Pretty CurrencySymbol | using hex encoding |
Defined in PlutusLedgerApi.V1.Value | |
Pretty Lovelace | |
Defined in PlutusLedgerApi.V1.Value | |
Pretty TokenName | |
Defined in PlutusLedgerApi.V1.Value | |
Pretty Value | |
Defined in PlutusLedgerApi.V1.Value | |
Pretty ScriptContext | |
Defined in PlutusLedgerApi.V2.Contexts | |
Pretty TxInInfo | |
Defined in PlutusLedgerApi.V2.Contexts | |
Pretty TxInfo | |
Defined in PlutusLedgerApi.V2.Contexts | |
Pretty ScriptContext | |
Defined in PlutusLedgerApi.V2.Data.Contexts | |
Pretty TxInInfo | |
Defined in PlutusLedgerApi.V2.Data.Contexts | |
Pretty TxInfo | |
Defined in PlutusLedgerApi.V2.Data.Contexts | |
Pretty OutputDatum | |
Defined in PlutusLedgerApi.V2.Data.Tx | |
Pretty TxOut | |
Defined in PlutusLedgerApi.V2.Data.Tx | |
Pretty OutputDatum | |
Defined in PlutusLedgerApi.V2.Tx | |
Pretty TxOut | |
Defined in PlutusLedgerApi.V2.Tx | |
Pretty ChangedParameters | |
Defined in PlutusLedgerApi.V3.Contexts | |
Pretty ColdCommitteeCredential | |
Defined in PlutusLedgerApi.V3.Contexts Methods pretty :: ColdCommitteeCredential -> Doc ann # prettyList :: [ColdCommitteeCredential] -> Doc ann # | |
Pretty Committee | |
Defined in PlutusLedgerApi.V3.Contexts | |
Pretty Constitution | |
Defined in PlutusLedgerApi.V3.Contexts | |
Pretty DRep | |
Defined in PlutusLedgerApi.V3.Contexts | |
Pretty DRepCredential | |
Defined in PlutusLedgerApi.V3.Contexts | |
Pretty Delegatee | |
Defined in PlutusLedgerApi.V3.Contexts | |
Pretty GovernanceAction | |
Defined in PlutusLedgerApi.V3.Contexts | |
Pretty GovernanceActionId | |
Defined in PlutusLedgerApi.V3.Contexts | |
Pretty HotCommitteeCredential | |
Defined in PlutusLedgerApi.V3.Contexts Methods pretty :: HotCommitteeCredential -> Doc ann # prettyList :: [HotCommitteeCredential] -> Doc ann # | |
Pretty ProposalProcedure | |
Defined in PlutusLedgerApi.V3.Contexts | |
Pretty ProtocolVersion | |
Defined in PlutusLedgerApi.V3.Contexts | |
Pretty ScriptContext | |
Defined in PlutusLedgerApi.V3.Contexts | |
Pretty ScriptInfo | |
Defined in PlutusLedgerApi.V3.Contexts | |
Pretty ScriptPurpose | |
Defined in PlutusLedgerApi.V3.Contexts | |
Pretty TxCert | |
Defined in PlutusLedgerApi.V3.Contexts | |
Pretty TxInInfo | |
Defined in PlutusLedgerApi.V3.Contexts | |
Pretty TxInfo | |
Defined in PlutusLedgerApi.V3.Contexts | |
Pretty Vote | |
Defined in PlutusLedgerApi.V3.Contexts | |
Pretty Voter | |
Defined in PlutusLedgerApi.V3.Contexts | |
Pretty ChangedParameters | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty ColdCommitteeCredential | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods pretty :: ColdCommitteeCredential -> Doc ann # prettyList :: [ColdCommitteeCredential] -> Doc ann # | |
Pretty Committee | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty Constitution | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty DRep | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty DRepCredential | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty Delegatee | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty GovernanceAction | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty GovernanceActionId | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty HotCommitteeCredential | |
Defined in PlutusLedgerApi.V3.Data.Contexts Methods pretty :: HotCommitteeCredential -> Doc ann # prettyList :: [HotCommitteeCredential] -> Doc ann # | |
Pretty ProposalProcedure | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty ProtocolVersion | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty ScriptContext | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty ScriptInfo | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty ScriptPurpose | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty TxCert | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty TxInInfo | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty TxInfo | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty Vote | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty Voter | |
Defined in PlutusLedgerApi.V3.Data.Contexts | |
Pretty MintValue | |
Defined in PlutusLedgerApi.V3.MintValue | |
Pretty TxId | using hex encoding |
Defined in PlutusLedgerApi.V3.Tx | |
Pretty TxOutRef | |
Defined in PlutusLedgerApi.V3.Tx | |
Pretty ScriptEvaluationData | |
Defined in PlutusLedgerApi.Test.EvaluationEvent | |
Pretty ScriptEvaluationEvent | |
Defined in PlutusLedgerApi.Test.EvaluationEvent | |
Pretty ScriptEvaluationResult | |
Defined in PlutusLedgerApi.Test.EvaluationEvent | |
Pretty UnexpectedEvaluationResult | |
Defined in PlutusLedgerApi.Test.EvaluationEvent | |
Pretty BuiltinBLS12_381_G1_Element | |
Defined in PlutusTx.Builtins.Internal Methods pretty :: BuiltinBLS12_381_G1_Element -> Doc ann # prettyList :: [BuiltinBLS12_381_G1_Element] -> Doc ann # | |
Pretty BuiltinBLS12_381_G2_Element | |
Defined in PlutusTx.Builtins.Internal Methods pretty :: BuiltinBLS12_381_G2_Element -> Doc ann # prettyList :: [BuiltinBLS12_381_G2_Element] -> Doc ann # | |
Pretty BuiltinBLS12_381_MlResult | |
Defined in PlutusTx.Builtins.Internal Methods pretty :: BuiltinBLS12_381_MlResult -> Doc ann # prettyList :: [BuiltinBLS12_381_MlResult] -> Doc ann # | |
Pretty BuiltinByteString | |
Defined in PlutusTx.Builtins.Internal | |
Pretty BuiltinData | |
Defined in PlutusTx.Builtins.Internal | |
Pretty CovLoc | |
Defined in PlutusTx.Coverage | |
Pretty CoverageAnnotation | |
Defined in PlutusTx.Coverage | |
Pretty CoverageMetadata | |
Defined in PlutusTx.Coverage | |
Pretty CoverageReport | |
Defined in PlutusTx.Coverage | |
Pretty Metadata | |
Defined in PlutusTx.Coverage | |
Pretty Rational | |
Defined in PlutusTx.Ratio | |
Pretty Text | |
Defined in Prettyprinter.Internal | |
Pretty Text | |
Defined in Prettyprinter.Internal | |
Pretty Integer | |
Defined in Prettyprinter.Internal | |
Pretty Natural | |
Defined in Prettyprinter.Internal | |
Pretty () | |
Defined in Prettyprinter.Internal | |
Pretty Bool | |
Defined in Prettyprinter.Internal | |
Pretty Char | |
Defined in Prettyprinter.Internal | |
Pretty Double | |
Defined in Prettyprinter.Internal | |
Pretty Float | |
Defined in Prettyprinter.Internal | |
Pretty Int | |
Defined in Prettyprinter.Internal | |
Pretty Word | |
Defined in Prettyprinter.Internal | |
Pretty a => Pretty (Identity a) | |
Defined in Prettyprinter.Internal | |
Pretty a => Pretty (NonEmpty a) | |
Defined in Prettyprinter.Internal | |
Pretty (ShelleyBasedEra era) Source # | |
Defined in Cardano.Api.Internal.Eon.ShelleyBasedEra | |
Pretty (CardanoEra era) Source # | |
Defined in Cardano.Api.Internal.Eras.Core | |
Pretty (DeprecatedEra era) Source # | |
Defined in Cardano.Api.Internal.Experimental.Eras | |
Pretty (Era era) Source # | |
Defined in Cardano.Api.Internal.Experimental.Eras | |
Show a => Pretty (ShowOf a) Source # | |
Defined in Cardano.Api.Internal.Via.ShowOf | |
Pretty (PlutusScriptContext l) => Pretty (LegacyPlutusArgs l) | |
Defined in Cardano.Ledger.Plutus.Language | |
Pretty (PlutusArgs 'PlutusV1) | |
Defined in Cardano.Ledger.Plutus.Language | |
Pretty (PlutusArgs 'PlutusV2) | |
Defined in Cardano.Ledger.Plutus.Language | |
Pretty (PlutusArgs 'PlutusV3) | |
Defined in Cardano.Ledger.Plutus.Language | |
Pretty (BuiltinSemanticsVariant DefaultFun) | |
Defined in PlutusCore.Default.Builtins Methods pretty :: BuiltinSemanticsVariant DefaultFun -> Doc ann # prettyList :: [BuiltinSemanticsVariant DefaultFun] -> Doc ann # | |
Pretty a => Pretty (Normalized a) | |
Defined in PlutusCore.Core.Type | |
Pretty (DefaultUni a) | This always pretty-prints parens around type applications (e.g. |
Defined in PlutusCore.Default.Universe | |
Pretty ann => Pretty (UniqueError ann) | |
Defined in PlutusCore.Error | |
PrettyClassic a => Pretty (EvaluationResult a) | |
Defined in PlutusCore.Evaluation.Result | |
PrettyReadable a => Pretty (AsReadable a) | |
Defined in PlutusCore.Pretty.Readable | |
Pretty (SomeTypeIn DefaultUni) | |
Defined in PlutusCore.Default.Universe Methods pretty :: SomeTypeIn DefaultUni -> Doc ann # prettyList :: [SomeTypeIn DefaultUni] -> Doc ann # | |
(Show fun, Ord fun) => Pretty (CekExTally fun) | |
(Show fun, Ord fun) => Pretty (TallyingSt fun) | |
Show fun => Pretty (ExBudgetCategory fun) | |
Pretty a => Pretty (Provenance a) | |
Defined in PlutusIR.Compiler.Provenance | |
Pretty a => Pretty (Extended a) | |
Defined in PlutusLedgerApi.V1.Interval | |
Pretty a => Pretty (Interval a) | |
Defined in PlutusLedgerApi.V1.Interval | |
Pretty a => Pretty (LowerBound a) | |
Defined in PlutusLedgerApi.V1.Interval | |
Pretty a => Pretty (UpperBound a) | |
Defined in PlutusLedgerApi.V1.Interval | |
Show a => Pretty (PrettyShow a) | |
Defined in Prettyprinter.Extras | |
Pretty a => Pretty (Maybe a) | |
Defined in Prettyprinter.Internal | |
Pretty a => Pretty [a] | |
Defined in Prettyprinter.Internal | |
Pretty (Some Era) Source # | |
(Pretty structural, Pretty operational) => Pretty (EvaluationError structural operational) | |
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) | |
Defined in PlutusCore.Evaluation.ErrorWithCause Methods pretty :: ErrorWithCause err cause -> Doc ann # prettyList :: [ErrorWithCause err cause] -> Doc ann # | |
(Foldable f, Pretty a) => Pretty (PrettyFoldable f a) | |
Defined in Prettyprinter.Extras | |
(Pretty k, Pretty v) => Pretty (Map k v) | |
Defined in PlutusTx.AssocMap | |
DefaultPrettyBy config a => Pretty (AttachDefaultPrettyConfig config a) | |
Defined in Text.PrettyBy.Internal | |
PrettyBy config a => Pretty (AttachPrettyConfig config a) | |
Defined in Text.PrettyBy.Internal Methods pretty :: AttachPrettyConfig config a -> Doc ann # prettyList :: [AttachPrettyConfig config a] -> Doc ann # | |
(Pretty a1, Pretty a2) => Pretty (a1, a2) | |
Defined in Prettyprinter.Internal | |
Pretty a => Pretty (Const a b) | |
Defined in Prettyprinter.Internal | |
(PrettyUni uni, Pretty fun, Pretty ann) => Pretty (Error uni fun ann) | |
Defined in PlutusIR.Error | |
(Pretty a1, Pretty a2, Pretty a3) => Pretty (a1, a2, a3) | |
Defined in Prettyprinter.Internal |
Constructors
ShowOf a |
Instances
Show a => ToJSON (ShowOf a) Source # | |
Defined in Cardano.Api.Internal.Via.ShowOf Methods toEncoding :: ShowOf a -> Encoding toJSONList :: [ShowOf a] -> Value toEncodingList :: [ShowOf a] -> Encoding | |
Show a => ToJSONKey (ShowOf a) Source # | |
Defined in Cardano.Api.Internal.Via.ShowOf | |
Show a => Show (ShowOf a) Source # | |
Show a => Pretty (ShowOf a) Source # | |
Defined in Cardano.Api.Internal.Via.ShowOf |
docToLazyText :: Doc AnsiStyle -> Text Source #
docToString :: Doc AnsiStyle -> String Source #
prettyException :: Exception a => a -> Doc ann Source #
Short hand for pretty
. displayException