sc-expand in compile mode produces (ice-9 expand-support) structures
authorAndy Wingo <wingo@pobox.com>
Mon, 4 May 2009 09:57:36 +0000 (11:57 +0200)
committerAndy Wingo <wingo@pobox.com>
Mon, 4 May 2009 09:57:36 +0000 (11:57 +0200)
commit71f46dbd5ecf62809c2aa475b6f5742993ada0b9
treef9aa243a579c99525027c929525ec77aa8d00b84
parent123f8abb2da5ed7b2d8ccd67b3bd3532aa9d257e
sc-expand in compile mode produces (ice-9 expand-support) structures

* module/ice-9/psyntax.scm (*mode*): New moving part, a fluid.
  (sc-expand): Dynamically bind *mode* to the expansion mode.
  (build-global-reference): Change to be a procedure instead of local
  syntax. Import the logic about when to make a @ or @@ form to here,
  from boot-9.scm. If we are compiling, build output using (ice-9
  expand-support)'s make-module-ref, otherwise just making the familiar
  s-expressions. (This will allow us to correctly expand in modules in
  which @ or @@ are not bound, at least when we are compiling.)
  (build-global-assignment): Use the result of build-global-reference. A
  bit hacky, but hey.
  (top-level-eval-hook, local-eval-hook): Strip expansion structures
  before evalling.

* module/ice-9/boot-9.scm (make-module-ref): Remove, this logic is now
  back in psyntax.scm.

* module/ice-9/compile-psyntax.scm (source): Since we expand in compile
  mode, we need to strip expansion structures.

* module/ice-9/expand-support.scm (strip-expansion-structures): Remove
  the logic about whether and how to strip @/@@ from here, as it's part
  of psyntax now.

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

* module/language/scheme/compile-ghil.scm (compile-ghil): Strip expansion
  structures -- for now. In the future, we might translate directly from
  these structures into GHIL.
module/ice-9/boot-9.scm
module/ice-9/compile-psyntax.scm
module/ice-9/expand-support.scm
module/ice-9/psyntax-pp.scm
module/ice-9/psyntax.scm
module/language/scheme/compile-ghil.scm