Add an option for a debug printer with types
AltGr opened this issue · comments
We have a printer with some debug options for our intermediate ASTs that is very precious for debugging.
Sometimes, in particular when debugging typing errors, it's useful to output all type annotations even if that's pretty verbose. We even have some crude code for this, but at the moment it requires manual uncommenting 😅 .
An easy improvement would be to clean up that small bit of code, ensure it formats properly, and add an option in compiler/catala_utils/cli.ml#globals
. That could be a new --debug-types
option, or better, the --debug
option could be changed to accept a list of debug flags, e.g. --debug=types
(this will require good understanding of the Cmdliner library).