-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional debug #24
Optional debug #24
Conversation
…ding through output tree (particularly when list is empty)
+ srcgen/xats/params.hats + contents => ``` #define __XATS_DEBUG__ 1``` + included in files where debug information is currently dumped For example in srcgen/xats/DATS/trans12_envmap.dats ```ats val () = println! ("the_dexpenv_add_cst: d2c = ", d2c) val () = println! ("the_dexpenv_add_cst: d2cs = ", d2cs) ``` Set `__XATS_DEBUG__` to 0 to disable the compiler from dumping the debug info via: ```ats ```
+ srcgen/xats/params.hats + contents => ``` #define __XATS_DEBUG__ 1``` + included in files where debug information is currently dumped For example in srcgen/xats/DATS/trans12_envmap.dats ```ats val () = println! ("the_dexpenv_add_cst: d2c = ", d2c) val () = println! ("the_dexpenv_add_cst: d2cs = ", d2cs) ``` Set `__XATS_DEBUG__` to 0 to disable the compiler from dumping the debug info via: ```ats ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I will create a file in xats/HATS for this purpose.
I tend to control the output of debugging information incrementally during
a debugging session. I like to gradually uncomment various print-statements
when debugging. When debugging is done, I re-comment these print-statements
out so that they can be used for the next debugging sessions.
It is difficult to rely on ifdef-guards for this style of debugging. However, with ifdef-guards,
it does seem to be easier to ship code. Let me add such guards from time to time.
Here is a little bit of naming convention I use: XATS: for general stuff related to ATS/Xanadu XATSLIB: for the kind of stuff related to the libraries XATSOPT: for the kind of stuff related to the compiler |
adding
#define __XATS_DEBUG__ 1
For example in srcgen/xats/DATS/trans12_envmap.dats
Set
__XATS_DEBUG__
to 0 to disable the compiler from dumping the debug info via: