Fix @ and @@ to not capture lexicals; new @@ @@ form for R6RS libraries
authorMark H Weaver <mhw@netris.org>
Thu, 8 Mar 2012 06:24:25 +0000 (01:24 -0500)
committerAndy Wingo <wingo@pobox.com>
Fri, 6 Jul 2012 18:12:50 +0000 (20:12 +0200)
commit8210c8538a6efb48d8adaf402546f30a8b249bcb
tree7aa6541ef70354e02584ceab749b84a5f406a090
parent5f8d67ad09d21263d1ea2d537afcc5464d922dc5
Fix @ and @@ to not capture lexicals; new @@ @@ form for R6RS libraries

* module/ice-9/psyntax.scm (@): Return top-wrap instead of the wrap
  applied to the '@' form, so that the symbol will be interpreted as a
  top-level identifier and never refer to any lexical variable.

  (@@): Change the syntax used to support R6RS 'library' forms to:
  (@@ @@ (mod ...) body).  Change the behavior of the documented
  (@@ (mod ...) id) form to be the same as that of @, except for the use
  of 'private' instead of 'public' in the psyntax mod: use syntax->datum
  on the identifier, and return top-wrap instead of the wrap applied to
  the '@@' form.

  This fixes <http://bugs.gnu.org/10756> reported by Ludovic Courtès.

* module/ice-9/psyntax-pp.scm: Regenerate.

* module/ice-9/r6rs-libraries.scm (library): Use '@@ @@' syntax instead
  of the older '@@' syntax.

* test-suite/tests/syncase.test (changes to expansion environment): Use
  '@@ @@' syntax.

* module/Makefile.am: Add explicit dependencies for boot-9.go on the
  files that it includes: quasisyntax.scm and r6rs-libraries.scm.
module/Makefile.am
module/ice-9/psyntax-pp.scm
module/ice-9/psyntax.scm
module/ice-9/r6rs-libraries.scm
test-suite/tests/syncase.test