#define :: list0_cons // writing [::] for list0_cons
Then later:
Note that the operator :: is already given the infix status.
Does that means “#define” preserve the fixity of “::” while “list0_cons”
did not had one? If yes, does that mean ATS source parsing is done before
macros substitutions?
Also, macdef/macrodef is modeled after the backquote-comma-notation in LISP.
Quite powerful but mostly undocumented.On Monday, February 2, 2015 at 4:09:12 PM UTC-5, gmhwxi wrote:
Yes.
Issues related to fixities (prefix, infix, postfix) are handled during
level-1 translation (pats_trans1), and macro expansion happens later.
On Monday, February 2, 2015 at 3:53:50 PM UTC-5, Yannick Duchêne wrote:
#define :: list0_cons // writing [::] for list0_cons
Then later:
Note that the operator :: is already given the infix status.
Does that means “#define” preserve the fixity of “::” while “list0_cons”
did not had one? If yes, does that mean ATS source parsing is done before
macros substitutions?
Issues related to fixities (prefix, infix, postfix) are handled during
level-1 translation (pats_trans1), and macro expansion happens later.On Monday, February 2, 2015 at 3:53:50 PM UTC-5, Yannick Duchêne wrote:
#define :: list0_cons // writing [::] for list0_cons
Then later:
Note that the operator :: is already given the infix status.
Does that means “#define” preserve the fixity of “::” while “list0_cons”
did not had one? If yes, does that mean ATS source parsing is done before
macros substitutions?