mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 09:10:22 +02:00
only bend hygiene in macro-introduced output, not for explicit @/@@
* module/ice-9/psyntax.scm * module/ice-9/psyntax-pp.scm * module/ice-9/boot-9.scm (make-module-ref): We were so almost there with what we had, sniff. The deal is that (begin (load "foo.scm") ((@@ (foo) bar))) would expand to (begin (load "foo.scm") (bar)) because bar was unbound at expansion time, and make-module-ref assumed it was like the else in a cond. But it shouldn't have, because we /explicitly/ asked for the @@ var -- so now if we see a @ or @@, we never drop it. @@ introduced by hygiene can be dropped if it doesn't reference a var, though. Practically speaking, this means tagging all modules in psyntax with their intent: public or private (corresponding to @ or @@), hygiene (introduced by a macro), or bare (when we don't have a module). I'm not sure when we'd see a bare. The implementation is complicated by the need to support the old format and the new format at the same time, so that psyntax-pp can be regenerated.
This commit is contained in:
parent
384e92b3ae
commit
a2716cbe1e
3 changed files with 50 additions and 49 deletions
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue