to_erl: formalize trace macros