ethereum / hevm

symbolic EVM evaluator
https://hevm.dev
GNU Affero General Public License v3.0
223 stars 45 forks source link

Move trace printing to prettyprinter #496

Open arcz opened 1 month ago

arcz commented 1 month ago

Currently the traces are printed with hardcoded escape codes which makes it hard to show in brick UI (example). We should update showTrace to return a Doc structure and use ANSI terminal renderer to restore the current behavior. This will also make formatting traces a lot more flexible so we don't have to rewrite showTrace for each use case.

There are many pretty printing libraries in Haskell, here is some rationale for using prettyprinter.