| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Plutarch.Internal.Show
Synopsis
- class PShow (t :: S -> Type) where
- pshow :: forall (a :: S -> Type) (s :: S). PShow a => Term s a -> Term s PString
- pshowAndErr :: forall (s :: S) (a :: S -> Type) (b :: S -> Type). Term s a -> Term s b
- pshowList :: forall (list :: (S -> Type) -> S -> Type) (a :: S -> Type) (s :: S). (PShow a, PIsListLike list a) => Term s (list a :--> PString)
Documentation
class PShow (t :: S -> Type) where Source #
Allows a debugging representation of the datatype as a PString.
Important note
Use of PShow in production scripts is not a good idea, as it requires
considerable script budget, especially for larger or more complex values. In
general, this type class is provided to assist with testing or debugging: be
very careful when using it for anything else, lest it impact your
performance.
Writing manual instances of this type class is also discouraged, as it is not
intended to be a pretty printer. In most situations, the Generic-based
derivation of instances for this type class is what you want.
Minimal complete definition
Nothing
Methods
pshow' :: forall (s :: S). Bool -> Term s t -> Term s PString Source #
Return the PString representation of a Plutarch value.
If the argument is True, wrap the output in `(..)` if it represents multiple parameters.
Since: 1.13.0
Instances
pshow :: forall (a :: S -> Type) (s :: S). PShow a => Term s a -> Term s PString Source #
Return the string representation of a Plutarch value