githwxi / ATS-Xanadu

Bootstrapping ATS3
GNU General Public License v3.0
196 stars 14 forks source link

Optional debug #24

Closed sparverius closed 4 years ago

sparverius commented 4 years ago

adding

For example in srcgen/xats/DATS/trans12_envmap.dats

#if(__XATS_DEBUG__)
val () =
println!
("the_dexpenv_add_cst: d2c = ", d2c)
val () =
println!
("the_dexpenv_add_cst: d2cs = ", d2cs)
#endif

Set __XATS_DEBUG__ to 0 to disable the compiler from dumping the debug info via:

#define __XATS_DEBUG__ 0
githwxi commented 4 years ago

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 XATSPRE: for the kind of stuff related to the prelude

XATSOPT: for the kind of stuff related to the compiler