tweag / cooked-validators

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overhaul pretty-printing in `Testing`

florentc opened this issue · comments

The Testing module invokes the revamped and parameterizable printers for skeletons, mockchain errors, and UTxO state (in the soon to be merged PR #228) but the highest level testing messages are still legacy basic string concatenation from Cooked V1.

It would be interesting to:

  • Write better printers that rely on Prettyprinter and PrettyCooked to replace legacy printing such as in testBinaryRelatedBy or testOneEquivClass and convert to string only at the very end using renderString from Cooked.Pretty
  • Move actual pretty printing to the Cooked.Pretty module or a Cooked.Pretty submodule
  • Investigate how to tweak Tasty's default output to include additional information (e.g. number of evaluated cooked traces when a test succeeds and nothing would be printed otherwise)
  • Investigate if it is possible to render pretty-printed Doc elements in Tasty instead of converting to String (which is now done with renderString) to benefit from a rendering that adapts to the terminal size in which the test suite is ran