Re: [racket-users] Can a macro "return" a macro without expanding it?

2017-08-18 Thread Matthias Felleisen
> On Aug 18, 2017, at 6:41 PM, Matthew Butterick wrote: > > >> On Aug 18, 2017, at 2:28 AM, Sam Waxman > > wrote: >> >> If I have code like this, >> >> (define-syntax-rule (identity x) >> x) >> >> ((identity identity) 1)

Re: [racket-users] Can a macro "return" a macro without expanding it?

2017-08-18 Thread Matthew Butterick
> On Aug 18, 2017, at 2:28 AM, Sam Waxman wrote: > > If I have code like this, > > (define-syntax-rule (identity x) > x) > > ((identity identity) 1) > > Is there a simple way to change this so that ((identity identity) 1) actually > does expand into (identity 1) which

Re: [racket-users] Can a macro "return" a macro without expanding it?

2017-08-18 Thread Sam Waxman
On Friday, August 18, 2017 at 10:14:10 AM UTC-4, Matthias Felleisen wrote: > On Aug 18, 2017, at 9:44 AM, Sam Waxman wrote: > > On Friday, August 18, 2017 at 9:31:33 AM UTC-4, Matthias Felleisen wrote: > On Aug 18, 2017, at 5:28 AM, Sam Waxman wrote: > >

Re: [racket-users] Can a macro "return" a macro without expanding it?

2017-08-18 Thread Matthias Felleisen
> On Aug 18, 2017, at 9:44 AM, Sam Waxman wrote: > > On Friday, August 18, 2017 at 9:31:33 AM UTC-4, Matthias Felleisen wrote: >>> On Aug 18, 2017, at 5:28 AM, Sam Waxman wrote: >>> >>> If I have code like this, >>> >>> (define-syntax-rule (identity

Re: [racket-users] Can a macro "return" a macro without expanding it?

2017-08-18 Thread Sam Waxman
On Friday, August 18, 2017 at 9:31:33 AM UTC-4, Matthias Felleisen wrote: > > On Aug 18, 2017, at 5:28 AM, Sam Waxman wrote: > > > > If I have code like this, > > > > (define-syntax-rule (identity x) > > x) > > > > ((identity identity) 1) > > > > At phase 1, the

Re: [racket-users] Can a macro "return" a macro without expanding it?

2017-08-18 Thread Matthias Felleisen
> On Aug 18, 2017, at 5:28 AM, Sam Waxman wrote: > > If I have code like this, > > (define-syntax-rule (identity x) > x) > > ((identity identity) 1) > > At phase 1, the (identity identity) will get transformed into identity. As > macros expand outside in, however,

[racket-users] Can a macro "return" a macro without expanding it?

2017-08-18 Thread Sam Waxman
If I have code like this, (define-syntax-rule (identity x) x) ((identity identity) 1) At phase 1, the (identity identity) will get transformed into identity. As macros expand outside in, however, this won't turn into (identity 1) like a function would, it will try expanding the identity

[racket-users] Can a macro "return" a macro without expanding it?

2017-08-18 Thread Sam Waxman
If I have code like this, (define-syntax-rule (identity x) -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more