Email list hosting service & mailing list manager

macroexpand SRFI? Lassi Kortela (03 Oct 2019 15:30 UTC)
Re: macroexpand SRFI? Marc Nieper-Wißkirchen (03 Oct 2019 15:40 UTC)
Re: macroexpand SRFI? Arthur A. Gleckler (03 Oct 2019 18:43 UTC)
Re: macroexpand SRFI? John Cowan (03 Oct 2019 20:20 UTC)
Re: macroexpand SRFI? Marc Nieper-Wißkirchen (03 Oct 2019 20:36 UTC)
Re: macroexpand SRFI? Lassi Kortela (04 Oct 2019 10:29 UTC)
Re: macroexpand SRFI? Vladimir Nikishkin (04 Oct 2019 07:45 UTC)
Re: macroexpand SRFI? Marc Nieper-Wißkirchen (04 Oct 2019 08:14 UTC)
Re: macroexpand SRFI? Shiro Kawai (04 Oct 2019 10:11 UTC)
Re: macroexpand SRFI? Shiro Kawai (04 Oct 2019 10:14 UTC)
Re: macroexpand SRFI? Lassi Kortela (04 Oct 2019 14:17 UTC)
Re: macroexpand SRFI? Amirouche Boubekki (04 Oct 2019 09:18 UTC)
Re: How hard is a portable macroexpand only for display purposes? Marc Nieper-Wißkirchen (04 Oct 2019 11:28 UTC)
Re: How hard is a portable macroexpand only for display purposes? Lassi Kortela (04 Oct 2019 14:13 UTC)
Re: How hard is a portable macroexpand only for display purposes? Marc Nieper-Wißkirchen (04 Oct 2019 15:01 UTC)

Re: How hard is a portable macroexpand only for display purposes? Lassi Kortela 04 Oct 2019 14:13 UTC

> Even if hygiene things and lexical scoping are neglected in the output, one
> cannot neglect them for the input of such a hypothetical "macroexpand" or
> "macroexpand-1". So either "macroexpand" has to be a special form (that is
> able to capture the lexical context, in which to do the expansion) or the
> argument to "macroexpand" already has to be a syntax object that is
> enriched with lexical information.
Can it cause unforeseen problems if macroexpand is a special form? I
can't think of any obvious problem with that, apart from the judgment
call that it's nice for everything to be a procedure whenever possible.

R7RS `eval` takes an environment-specifier argument. But is the lexical
environment in which procedures are evaluated different from the
syntactic environment in which macros are expanded?

What's the usual environment when expanding macros from the REPL -- is
it different somehow from (interaction-environment)?

Similar to `eval`, would a second argument defaulting to
(interaction-environment) work for macros or is it a lot more
complicated than that?