Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Doc ann
- class Pretty a where
- pretty :: a -> Doc ann
- prettyList :: [a] -> Doc ann
- class PrettyBy config a where
- prettyBy :: config -> a -> Doc ann
- prettyListBy :: config -> [a] -> Doc ann
- newtype IgnorePrettyConfig a = IgnorePrettyConfig {
- unIgnorePrettyConfig :: a
- data AttachPrettyConfig config a = AttachPrettyConfig !config !a
- class Render str where
- display :: forall str a. (Pretty a, Render str) => a -> str
- displayBy :: forall str a config. (PrettyBy config a, Render str) => config -> a -> str
- prettyPlcDef :: PrettyPlc a => a -> Doc ann
- displayPlcDef :: (PrettyPlc a, Render str) => a -> str
- prettyPlcDebug :: PrettyPlc a => a -> Doc ann
- displayPlcDebug :: (PrettyPlc a, Render str) => a -> str
- data CondensedErrors
- newtype PrettyConfigPlcOptions = PrettyConfigPlcOptions {}
- data PrettyConfigPlcStrategy
- data PrettyConfigPlc = PrettyConfigPlc {}
- type PrettyPlc = PrettyBy PrettyConfigPlc
- defPrettyConfigPlcOptions :: PrettyConfigPlcOptions
- defPrettyConfigPlcClassic :: PrettyConfigPlcOptions -> PrettyConfigPlc
- debugPrettyConfigPlcClassic :: PrettyConfigPlcOptions -> PrettyConfigPlc
- defPrettyConfigPlcReadable :: PrettyConfigPlcOptions -> PrettyConfigPlc
- debugPrettyConfigPlcReadable :: PrettyConfigPlcOptions -> PrettyConfigPlc
- prettyPlcClassicDef :: PrettyPlc a => a -> Doc ann
- prettyPlcClassicDebug :: PrettyPlc a => a -> Doc ann
- prettyPlcReadableDef :: PrettyPlc a => a -> Doc ann
- prettyPlcReadableDebug :: PrettyPlc a => a -> Doc ann
- prettyPlcCondensedErrorBy :: PrettyPlc a => (PrettyConfigPlcOptions -> PrettyConfigPlc) -> a -> Doc ann
- displayPlcCondensedErrorClassic :: (PrettyPlc a, Render str) => a -> str
- newtype PrettyConfigName = PrettyConfigName {}
- class HasPrettyConfigName config where
- toPrettyConfigName :: config -> PrettyConfigName
- defPrettyConfigName :: PrettyConfigName
- debugPrettyConfigName :: PrettyConfigName
- data PrettyConfigClassic configName = PrettyConfigClassic {
- _pccConfigName :: configName
- _pccDisplayAnn :: Bool
- type PrettyClassicBy configName = PrettyBy (PrettyConfigClassic configName)
- type PrettyClassic = PrettyClassicBy PrettyConfigName
- consAnnIf :: Pretty ann => PrettyConfigClassic configName -> ann -> [Doc dann] -> [Doc dann]
- prettyClassicDef :: PrettyClassic a => a -> Doc ann
- prettyClassicDebug :: PrettyClassic a => a -> Doc ann
- data ShowKinds
- data PrettyConfigReadable configName = PrettyConfigReadable {
- _pcrConfigName :: configName
- _pcrRenderContext :: RenderContext
- _pcrShowKinds :: ShowKinds
- type PrettyReadableBy configName = PrettyBy (PrettyConfigReadable configName)
- type PrettyReadable = PrettyReadableBy PrettyConfigName
- topPrettyConfigReadable :: configName -> ShowKinds -> PrettyConfigReadable configName
- botPrettyConfigReadable :: configName -> ShowKinds -> PrettyConfigReadable configName
- prettyBytes :: ByteString -> Doc ann
- data ConstConfig = ConstConfig
- type PrettyConst = PrettyBy ConstConfig
- prettyConst :: PrettyConst a => a -> Doc ann
Basic types and functions
Instances
Instances
class PrettyBy config a where #
Nothing
Instances
newtype IgnorePrettyConfig a #
Instances
Pretty a => PrettyBy config (IgnorePrettyConfig a) | |
Defined in Text.PrettyBy.Internal prettyBy :: config -> IgnorePrettyConfig a -> Doc ann # prettyListBy :: config -> [IgnorePrettyConfig a] -> Doc ann # |
data AttachPrettyConfig config a #
AttachPrettyConfig !config !a |
Instances
PrettyBy config a => Pretty (AttachPrettyConfig config a) | |
Defined in Text.PrettyBy.Internal pretty :: AttachPrettyConfig config a -> Doc ann # prettyList :: [AttachPrettyConfig config a] -> Doc ann # |
Defaults
prettyPlcDef :: PrettyPlc a => a -> Doc ann Source #
Pretty-print a value in the default mode using the classic view.
displayPlcDef :: (PrettyPlc a, Render str) => a -> str Source #
Render a value to String
in the default mode using the classic view.
prettyPlcDebug :: PrettyPlc a => a -> Doc ann Source #
Pretty-print a value in the debug mode using the classic view.
displayPlcDebug :: (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.
Instances
Eq CondensedErrors Source # | |
Defined in PlutusCore.Pretty.Plc (==) :: CondensedErrors -> CondensedErrors -> Bool Source # (/=) :: CondensedErrors -> CondensedErrors -> Bool Source # | |
Show CondensedErrors Source # | |
Defined in PlutusCore.Pretty.Plc |
newtype PrettyConfigPlcOptions Source #
Options for pretty-printing PLC entities.
data PrettyConfigPlcStrategy Source #
Strategy for pretty-printing PLC entities.
PrettyConfigPlcClassic (PrettyConfigClassic PrettyConfigName) | |
PrettyConfigPlcReadable (PrettyConfigReadable PrettyConfigName) |
Instances
HasPrettyConfigName PrettyConfigPlcStrategy Source # | |
Defined in PlutusCore.Pretty.Plc | |
DefaultPrettyPlcStrategy a => PrettyBy PrettyConfigPlcStrategy (PrettyAny a) Source # | |
Defined in PlutusCore.Pretty.Plc prettyBy :: PrettyConfigPlcStrategy -> PrettyAny a -> Doc ann # prettyListBy :: PrettyConfigPlcStrategy -> [PrettyAny a] -> Doc ann # |
data PrettyConfigPlc Source #
Global configuration used for pretty-printing PLC entities.
Instances
type PrettyPlc = PrettyBy PrettyConfigPlc Source #
The "pretty-printable PLC entity" constraint.
defPrettyConfigPlcOptions :: PrettyConfigPlcOptions Source #
The PrettyConfigPlcOptions
used by default:
print errors in full.
defPrettyConfigPlcClassic :: PrettyConfigPlcOptions -> PrettyConfigPlc Source #
The PrettyConfigPlc
used by default:
use the classic view and print neither Unique
s, nor name attachments.
debugPrettyConfigPlcClassic :: PrettyConfigPlcOptions -> PrettyConfigPlc Source #
The PrettyConfigPlc
used for debugging:
use the classic view and print Unique
s, but not name attachments.
defPrettyConfigPlcReadable :: PrettyConfigPlcOptions -> PrettyConfigPlc Source #
The PrettyConfigPlc
used by default and for readability:
use the refined view and print neither Unique
s, nor name attachments.
debugPrettyConfigPlcReadable :: PrettyConfigPlcOptions -> PrettyConfigPlc Source #
The PrettyConfigPlc
used for debugging and readability:
use the refined view and print Unique
s, but not name attachments.
Custom functions for PLC types.
prettyPlcClassicDef :: PrettyPlc a => a -> Doc ann Source #
Pretty-print a PLC value in the default mode using the classic view.
prettyPlcClassicDebug :: PrettyPlc a => a -> Doc ann Source #
Pretty-print a PLC value in the debug mode using the classic view.
prettyPlcReadableDef :: PrettyPlc a => a -> Doc ann Source #
Pretty-print a PLC value in the default mode using the readable view.
prettyPlcReadableDebug :: PrettyPlc a => a -> Doc ann Source #
Pretty-print a PLC value in the debug mode 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.
PrettyConfigName | |
|
class HasPrettyConfigName config where Source #
A class of configs from which a PrettyConfigName
can be extracted.
toPrettyConfigName :: config -> PrettyConfigName Source #
Instances
HasPrettyConfigName PrettyConfigPlc Source # | |
Defined in PlutusCore.Pretty.Plc | |
HasPrettyConfigName PrettyConfigPlcStrategy Source # | |
Defined in PlutusCore.Pretty.Plc | |
configName ~ PrettyConfigName => HasPrettyConfigName (PrettyConfigReadable configName) Source # | |
Defined in PlutusCore.Pretty.Readable toPrettyConfigName :: PrettyConfigReadable configName -> PrettyConfigName Source # | |
configName ~ PrettyConfigName => HasPrettyConfigName (PrettyConfigClassic configName) Source # | |
Defined in PlutusCore.Pretty.Classic toPrettyConfigName :: PrettyConfigClassic configName -> PrettyConfigName Source # |
defPrettyConfigName :: PrettyConfigName Source #
The PrettyConfigName
used by default: print neither Unique
s, nor name attachments.
debugPrettyConfigName :: PrettyConfigName Source #
The PrettyConfigName
used for debugging: print Unique
s, but not name attachments.
Classic view
data PrettyConfigClassic configName Source #
Configuration for the classic pretty-printing.
PrettyConfigClassic | |
|
Instances
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 Doc
s if the given config enables pretty-printing
of annotations.
prettyClassicDef :: PrettyClassic a => a -> Doc ann Source #
Pretty-print a value in the default mode using the classic view.
prettyClassicDebug :: PrettyClassic a => a -> Doc ann Source #
Pretty-print a value in the debug mode using the classic view.
Readable view
data PrettyConfigReadable configName Source #
Configuration for the readable pretty-printing.
PrettyConfigReadable | |
|
Instances
type PrettyReadableBy configName = PrettyBy (PrettyConfigReadable configName) Source #
The "readably pretty-printable" constraint.
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
.
Utils
prettyBytes :: ByteString -> Doc ann Source #
data ConstConfig Source #
Instances
type PrettyConst = PrettyBy ConstConfig Source #
prettyConst :: PrettyConst a => a -> Doc ann Source #