Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Cooked.Pretty.Options
Description
This module defines pretty-printing options for
prettyCookedOpt
and their default values.
Synopsis
- data PrettyCookedOpts = PrettyCookedOpts {}
- data PrettyCookedHashOpts = PrettyCookedHashOpts {}
- data PCOptTxOutRefs
- hashNamesFromList :: ToHash a => [(a, String)] -> Map BuiltinByteString String
- defaultHashNames :: Map BuiltinByteString String
- addHashNames :: Map BuiltinByteString String -> PrettyCookedOpts -> PrettyCookedOpts
Documentation
data PrettyCookedOpts Source #
A set of option to pilot pretty printing in cooked-validators
Constructors
PrettyCookedOpts | |
Fields
|
Instances
Show PrettyCookedOpts Source # | |
Defined in Cooked.Pretty.Options Methods showsPrec :: Int -> PrettyCookedOpts -> ShowS # show :: PrettyCookedOpts -> String # showList :: [PrettyCookedOpts] -> ShowS # | |
Default PrettyCookedOpts Source # | |
Defined in Cooked.Pretty.Options Methods def :: PrettyCookedOpts # | |
Eq PrettyCookedOpts Source # | |
Defined in Cooked.Pretty.Options Methods (==) :: PrettyCookedOpts -> PrettyCookedOpts -> Bool # (/=) :: PrettyCookedOpts -> PrettyCookedOpts -> Bool # |
data PrettyCookedHashOpts Source #
A set of options to pilot how hashes are pretty printed
Constructors
PrettyCookedHashOpts | |
Fields
|
Instances
Show PrettyCookedHashOpts Source # | |
Defined in Cooked.Pretty.Options Methods showsPrec :: Int -> PrettyCookedHashOpts -> ShowS # show :: PrettyCookedHashOpts -> String # showList :: [PrettyCookedHashOpts] -> ShowS # | |
Default PrettyCookedHashOpts Source # | |
Defined in Cooked.Pretty.Options Methods | |
Eq PrettyCookedHashOpts Source # | |
Defined in Cooked.Pretty.Options Methods (==) :: PrettyCookedHashOpts -> PrettyCookedHashOpts -> Bool # (/=) :: PrettyCookedHashOpts -> PrettyCookedHashOpts -> Bool # |
data PCOptTxOutRefs Source #
Whether to print transaction outputs references.
Constructors
PCOptTxOutRefsHidden | Hide them |
PCOptTxOutRefsFull | Always show them. Warning: this will disable printing similar UTxOs as a group (for
instance |
PCOptTxOutRefsPartial | Show them for UTxOs which are not grouped with similar others. This
avoids the downside of |
Instances
Show PCOptTxOutRefs Source # | |
Defined in Cooked.Pretty.Options Methods showsPrec :: Int -> PCOptTxOutRefs -> ShowS # show :: PCOptTxOutRefs -> String # showList :: [PCOptTxOutRefs] -> ShowS # | |
Eq PCOptTxOutRefs Source # | |
Defined in Cooked.Pretty.Options Methods (==) :: PCOptTxOutRefs -> PCOptTxOutRefs -> Bool # (/=) :: PCOptTxOutRefs -> PCOptTxOutRefs -> Bool # |
hashNamesFromList :: ToHash a => [(a, String)] -> Map BuiltinByteString String Source #
Smart constructor for maps to be used in the "pcOptHashNames" pretty-printing option.
defaultHashNames :: Map BuiltinByteString String Source #
Default hash to names map that assigns Lovelace, Quick, and Permanent to the associated currency symbols. This is used as the default for the pretty-printing option and is recommended to use as a basis to extend with custom names.
addHashNames :: Map BuiltinByteString String -> PrettyCookedOpts -> PrettyCookedOpts Source #
Adds some additional names to these pretty cooked options. This has two practical use cases:
- Users can use it in conjuction to
hashNamesFromList
without having to remember to manually invokedefaultHashNames
- We use it internally to account for names that have been registered during
mockchain runs, such as for names that depend on on-chain data, typically a
TxOutRef
.