Re: [racket-users] perplexed by macro-expansion behavior near #%module-begin

2020-01-13 Thread Michael MacLeod
I believe this due to an edge case of 'module': when there is only one form provided, it is partially expanded to determine if its expansion would lead to a #%plain-module-begin form. Otherwise (more than one form provided) they are wrapped in #%module-begin with no partial expansion occurring. >F

[racket-users] perplexed by macro-expansion behavior near #%module-begin

2020-01-13 Thread Matthew Butterick
Below, the two modules `test1` and `test2` use the same expander `exp` and otherwise differ only in the presence of the string "foo" as the second datum in `test2`. The syntax objects passed to #%module-begin are more different than that, however: the syntax passed to the first is #'(#%modul