tweag / cooked-validators

MIT License
39 stars 11 forks source link

Store richer info about datum in the mock chain state #262

Closed florentc closed 1 year ago

florentc commented 1 year ago

This fixes #235 by storing a Map DatumHash TxSkelOutDatum instead of a Map DatumHash (Datum, DocCooked) in the mock chain state MockChainSt. This means we keep some type information about the datum (constraints about the datum type used to construct TxSkelOutDatum values) that we used to lose. In particular, this makes it possible to, at last, entirely separate pretty-printing matter from the rest of Cooked. The PrettyCooked instance of TxSkelOutDatum has been moved to Cooked.Pretty and comments have been edited to account for the changes.