Closed gabrielhdt closed 1 year ago
I agree this would be very convenient but if we define prettyCooked = pretty
by default then we lose the current also-convenient-default where prettyCooked = prettyCookedOpt def
.
As for instance Pretty a => PrettyCooked a where prettyCooked = pretty
, it leads to undecidable instances.
Usually, Plutus' Pretty instances are not that pretty (e.g. values, addresses). We should probably provide more instances in Cooked.Pretty
for common types we often have to display.
When definining
PrettyCooked
instances, calling recursivelyprettyCookedOpt
on substructures is, I believe, quite natural. Some structures havePretty
instances but noPrettyCooked
instances, hence we must callPrettyprinter.pretty
instead ofCooked.prettyCookedOpt
. If we don't, we getWould it be possible to have
Prettyprinter.pretty
as the default instance ofCooked.prettyCookedOpt
?