guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. release_1-9-5-77-gb2b


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-5-77-gb2b554e
Date: Wed, 02 Dec 2009 23:17:53 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=b2b554efd3fee1bd110cb286a1b185042db0a27f

The branch, master has been updated
       via  b2b554efd3fee1bd110cb286a1b185042db0a27f (commit)
       via  5f1611640ad6a2e3af74f97c0bc4bed230130bb6 (commit)
       via  67e2d80a6a97b51aefea701cf10112102b09b392 (commit)
       via  cc8d1f5fcd97de920111d407d2c9e88d6aedbc6d (commit)
       via  23f276dea70668b7291589de1c7d7ea7ebd9026f (commit)
       via  5161a3c0d7ec59e32a637bd093644a1a5b7b8dcf (commit)
       via  3149a5b60de3dc55c7349aba5bfb3ff28c594aef (commit)
       via  c7a2a803bd0c3ca8860929d4700a46e104cf2643 (commit)
       via  1d30393fbfac4b80dc9f3a5c8289ba4b55b345bb (commit)
       via  156d6fa1b5f44d9af0c0e5f6ba9275f4b450c19e (commit)
       via  7b8938196584ac8dee38d26ee90e58772c14d752 (commit)
       via  b7742c6b7132544b9d6cd9cb32c09e2084ad9e52 (commit)
       via  83c76550024c4a96c06cb75d40ab0ba122a0a57c (commit)
       via  c58b8c5aed8884f044e7c3af116e649e7e855381 (commit)
       via  8397a3a69555c73d4e1df89ae96c561d2ea43188 (commit)
       via  ecdfc95d1c4cca8cb87412cd30a8fbb39afadd21 (commit)
       via  0f458a37259a53adc7b50b66a5944ecc3668ffda (commit)
       via  504864b79fcdaf1c24785327b84190a041c30c0c (commit)
       via  058234dd9c4d67240b9ca1c7f0ebfeed8037c2de (commit)
       via  9d019f9be0a1a7d3aaa507c9996cd5097da53875 (commit)
       via  c2c4e281988bf1c5261fde3a74566dc49d8eecf7 (commit)
       via  a3e923770ef0e491b58aaac94413cba893eebcfc (commit)
       via  6c9e8a53542019d1d207f25bfb18fbba9aabf59d (commit)
       via  b3f04491ee90015cd661b08dcb0b5ae731ee6022 (commit)
       via  f39fc3b38cbd7dda61def29bd8ef2d8f7ca27dd5 (commit)
       via  1963682290baa7d49f56a0e6aaf8a4880265f868 (commit)
       via  715603951e2b8b521f3cd866d1bccec52d595b60 (commit)
       via  44acb034222f51b10a0a445862601f1a60ed9b3b (commit)
       via  25e8a4721e20e116646a55313a3c8b92ccfa4e71 (commit)
       via  a4ac184963d503b9b9cd6a5ead7d8720ee4cad66 (commit)
       via  95e59982049ef822933445746a6b78de8f737cb4 (commit)
       via  81b30a35f706105767a0ac1391609147cb7c9383 (commit)
      from  8a30946f7fd717f3e8c52e99c8d24c4fb4e5f1af (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 .gitignore                               |    1 +
 Makefile.am                              |    2 +-
 configure.ac                             |    1 -
 lang/Makefile.am                         |   69 -
 lang/elisp/ChangeLog-2008                |  401 -
 lang/elisp/README                        |  303 -
 lang/elisp/STATUS                        |   35 -
 lang/elisp/base.scm                      |   48 -
 lang/elisp/example.el                    |   39 -
 lang/elisp/expand.scm                    |    4 -
 lang/elisp/interface.scm                 |  140 -
 lang/elisp/internals/evaluation.scm      |   13 -
 lang/elisp/internals/format.scm          |   62 -
 lang/elisp/internals/fset.scm            |  113 -
 lang/elisp/internals/lambda.scm          |  109 -
 lang/elisp/internals/load.scm            |   44 -
 lang/elisp/internals/null.scm            |   13 -
 lang/elisp/internals/set.scm             |   20 -
 lang/elisp/internals/signal.scm          |   18 -
 lang/elisp/internals/time.scm            |   14 -
 lang/elisp/internals/trace.scm           |   28 -
 lang/elisp/primitives/buffers.scm        |   16 -
 lang/elisp/primitives/char-table.scm     |   24 -
 lang/elisp/primitives/features.scm       |   26 -
 lang/elisp/primitives/fns.scm            |   46 -
 lang/elisp/primitives/format.scm         |    6 -
 lang/elisp/primitives/guile.scm          |   20 -
 lang/elisp/primitives/keymaps.scm        |   26 -
 lang/elisp/primitives/lists.scm          |  103 -
 lang/elisp/primitives/load.scm           |   17 -
 lang/elisp/primitives/match.scm          |   68 -
 lang/elisp/primitives/numbers.scm        |   43 -
 lang/elisp/primitives/pure.scm           |    8 -
 lang/elisp/primitives/read.scm           |   10 -
 lang/elisp/primitives/signal.scm         |    6 -
 lang/elisp/primitives/strings.scm        |   40 -
 lang/elisp/primitives/symprop.scm        |   40 -
 lang/elisp/primitives/syntax.scm         |  267 -
 lang/elisp/primitives/system.scm         |   14 -
 lang/elisp/primitives/time.scm           |   17 -
 lang/elisp/transform.scm                 |  116 -
 lang/elisp/variables.scm                 |   42 -
 libguile.h                               |    2 +
 libguile/Makefile.am                     |   17 +-
 libguile/backtrace.c                     |   76 +-
 libguile/debug.c                         |  310 +-
 libguile/debug.h                         |   41 +-
 libguile/deprecated.c                    |   61 +-
 libguile/deprecated.h                    |   42 +-
 libguile/eval.c                          | 3827 +-------
 libguile/eval.h                          |   85 +-
 libguile/eval.i.c                        | 1752 ----
 libguile/gdbint.c                        |    5 +-
 libguile/goops.c                         |   60 +-
 libguile/goops.h                         |    8 +-
 libguile/gsubr.c                         |   39 +
 libguile/gsubr.h                         |    2 +
 libguile/hashtab.c                       |    5 +-
 libguile/init.c                          |   14 +-
 libguile/list.c                          |   12 +-
 libguile/list.h                          |    3 +-
 libguile/load.c                          |   16 +
 libguile/load.h                          |    1 +
 libguile/macros.c                        |   10 -
 libguile/memoize.c                       | 1261 +++
 libguile/memoize.h                       |  110 +
 libguile/modules.c                       |   79 +-
 libguile/modules.h                       |    6 +-
 libguile/print.c                         |   24 +-
 libguile/private-options.h               |    4 +-
 libguile/procprop.c                      |   12 +-
 libguile/procs.c                         |    2 +-
 libguile/procs.h                         |    5 +-
 libguile/promises.c                      |  150 +
 libguile/{lang.h => promises.h}          |   33 +-
 libguile/quicksort.i.c                   |   16 +-
 libguile/sort.c                          |   66 +-
 libguile/srcprop.c                       |   99 +-
 libguile/srcprop.h                       |    1 +
 libguile/srfi-13.c                       |  105 +-
 libguile/stacks.c                        |   40 +-
 libguile/tags.h                          |   44 +-
 libguile/trees.c                         |  211 +
 libguile/{gdbint.h => trees.h}           |   17 +-
 libguile/validate.h                      |    2 +-
 libguile/vm-engine.c                     |    4 +-
 libguile/vm-i-system.c                   |  106 +-
 libguile/vm.c                            |  130 +-
 module/Makefile.am                       |   74 +-
 module/ice-9/boot-9.scm                  |    3 +-
 module/ice-9/debugger/commands.scm       |    3 +-
 module/ice-9/debugging/traps.scm         |    3 +-
 module/ice-9/deprecated.scm              |    5 +
 module/ice-9/emacs.scm                   |    3 +-
 module/ice-9/eval.scm                    |  226 +
 module/ice-9/gds-client.scm              |    2 +
 module/ice-9/psyntax-pp.scm              |16625 +++++++++++++++---------------
 module/ice-9/psyntax.scm                 |   47 +-
 module/language/tree-il/compile-glil.scm |    3 +
 module/language/tree-il/primitives.scm   |    9 +-
 module/oop/goops.scm                     |   89 +-
 srfi/srfi-1.c                            |  201 +-
 test-suite/tests/chars.test              |    2 +-
 test-suite/tests/elisp.test              |    7 +-
 test-suite/tests/eval.test               |   11 +-
 test-suite/tests/gc.test                 |   22 +-
 test-suite/tests/goops.test              |   21 +-
 test-suite/tests/hooks.test              |    7 +-
 test-suite/tests/sort.test               |    6 +-
 test-suite/tests/srcprop.test            |    4 +-
 test-suite/tests/srfi-1.test             |   28 +-
 test-suite/tests/syntax.test             |  171 +-
 112 files changed, 11549 insertions(+), 17370 deletions(-)
 delete mode 100644 lang/Makefile.am
 delete mode 100644 lang/elisp/ChangeLog-2008
 delete mode 100644 lang/elisp/README
 delete mode 100644 lang/elisp/STATUS
 delete mode 100644 lang/elisp/base.scm
 delete mode 100644 lang/elisp/example.el
 delete mode 100644 lang/elisp/expand.scm
 delete mode 100644 lang/elisp/interface.scm
 delete mode 100644 lang/elisp/internals/evaluation.scm
 delete mode 100644 lang/elisp/internals/format.scm
 delete mode 100644 lang/elisp/internals/fset.scm
 delete mode 100644 lang/elisp/internals/lambda.scm
 delete mode 100644 lang/elisp/internals/load.scm
 delete mode 100644 lang/elisp/internals/null.scm
 delete mode 100644 lang/elisp/internals/set.scm
 delete mode 100644 lang/elisp/internals/signal.scm
 delete mode 100644 lang/elisp/internals/time.scm
 delete mode 100644 lang/elisp/internals/trace.scm
 delete mode 100644 lang/elisp/primitives/buffers.scm
 delete mode 100644 lang/elisp/primitives/char-table.scm
 delete mode 100644 lang/elisp/primitives/features.scm
 delete mode 100644 lang/elisp/primitives/fns.scm
 delete mode 100644 lang/elisp/primitives/format.scm
 delete mode 100644 lang/elisp/primitives/guile.scm
 delete mode 100644 lang/elisp/primitives/keymaps.scm
 delete mode 100644 lang/elisp/primitives/lists.scm
 delete mode 100644 lang/elisp/primitives/load.scm
 delete mode 100644 lang/elisp/primitives/match.scm
 delete mode 100644 lang/elisp/primitives/numbers.scm
 delete mode 100644 lang/elisp/primitives/pure.scm
 delete mode 100644 lang/elisp/primitives/read.scm
 delete mode 100644 lang/elisp/primitives/signal.scm
 delete mode 100644 lang/elisp/primitives/strings.scm
 delete mode 100644 lang/elisp/primitives/symprop.scm
 delete mode 100644 lang/elisp/primitives/syntax.scm
 delete mode 100644 lang/elisp/primitives/system.scm
 delete mode 100644 lang/elisp/primitives/time.scm
 delete mode 100644 lang/elisp/transform.scm
 delete mode 100644 lang/elisp/variables.scm
 delete mode 100644 libguile/eval.i.c
 create mode 100644 libguile/memoize.c
 create mode 100644 libguile/memoize.h
 create mode 100644 libguile/promises.c
 copy libguile/{lang.h => promises.h} (52%)
 create mode 100644 libguile/trees.c
 copy libguile/{gdbint.h => trees.h} (78%)
 create mode 100644 module/ice-9/eval.scm

diff --git a/.gitignore b/.gitignore
index 42a200e..3db7382 100644
--- a/.gitignore
+++ b/.gitignore
@@ -118,3 +118,4 @@ INSTALL
 /meta/guile-tools
 /meta/guile-config
 /lib/locale.h
+/module/ice-9/eval.go.stamp
diff --git a/Makefile.am b/Makefile.am
index 06c5b38..c51a61b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,7 +25,7 @@
 AUTOMAKE_OPTIONS = 1.10
 
 SUBDIRS = lib meta libguile guile-readline emacs \
-         srfi doc examples test-suite benchmark-suite lang am \
+         srfi doc examples test-suite benchmark-suite am \
          module testsuite
 
 include_HEADERS = libguile.h
diff --git a/configure.ac b/configure.ac
index 5ed153d..1393d87 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1614,7 +1614,6 @@ AC_CONFIG_FILES([
   doc/tutorial/Makefile
   emacs/Makefile
   examples/Makefile
-  lang/Makefile
   libguile/Makefile
   srfi/Makefile
   guile-readline/Makefile
diff --git a/lang/Makefile.am b/lang/Makefile.am
deleted file mode 100644
index adbe4d4..0000000
--- a/lang/Makefile.am
+++ /dev/null
@@ -1,69 +0,0 @@
-## Process this file with automake to produce Makefile.in.
-##
-##     Copyright (C) 2000, 2006, 2009 Free Software Foundation, Inc.
-##
-##   This file is part of GUILE.
-##   
-##   GUILE is free software; you can redistribute it and/or modify it
-##   under the terms of the GNU Lesser General Public License as
-##   published by the Free Software Foundation; either version 3, or
-##   (at your option) any later version.
-##
-##   GUILE is distributed in the hope that it will be useful, but
-##   WITHOUT ANY WARRANTY; without even the implied warranty of
-##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-##   GNU Lesser General Public License for more details.
-##
-##   You should have received a copy of the GNU Lesser General Public
-##   License along with GUILE; see the file COPYING.LESSER.  If not,
-##   write to the Free Software Foundation, Inc., 51 Franklin Street,
-##   Fifth Floor, Boston, MA 02110-1301 USA
-
-AUTOMAKE_OPTIONS = gnu
-
-# These should be installed and distributed.
-
-elisp_sources =                                        \
-       elisp/base.scm                          \
-       elisp/example.el                        \
-       elisp/interface.scm                     \
-       elisp/transform.scm                     \
-       elisp/expand.scm                        \
-       elisp/variables.scm                     \
-                                               \
-       elisp/primitives/buffers.scm            \
-       elisp/primitives/char-table.scm         \
-       elisp/primitives/features.scm           \
-       elisp/primitives/fns.scm                \
-       elisp/primitives/format.scm             \
-       elisp/primitives/guile.scm              \
-       elisp/primitives/keymaps.scm            \
-       elisp/primitives/lists.scm              \
-       elisp/primitives/load.scm               \
-       elisp/primitives/match.scm              \
-       elisp/primitives/numbers.scm            \
-       elisp/primitives/pure.scm               \
-       elisp/primitives/read.scm               \
-       elisp/primitives/signal.scm             \
-       elisp/primitives/strings.scm            \
-       elisp/primitives/symprop.scm            \
-       elisp/primitives/syntax.scm             \
-       elisp/primitives/system.scm             \
-       elisp/primitives/time.scm               \
-                                               \
-       elisp/internals/evaluation.scm          \
-       elisp/internals/format.scm              \
-       elisp/internals/fset.scm                \
-       elisp/internals/lambda.scm              \
-       elisp/internals/load.scm                \
-       elisp/internals/null.scm                \
-       elisp/internals/set.scm                 \
-       elisp/internals/signal.scm              \
-       elisp/internals/time.scm                \
-       elisp/internals/trace.scm
-
-subpkgdatadir = $(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)/lang
-nobase_subpkgdata_DATA = $(elisp_sources)
-TAGS_FILES = $(nobase_subpkgdata_DATA)
-
-EXTRA_DIST = $(elisp_sources) elisp/ChangeLog-2008
diff --git a/lang/elisp/ChangeLog-2008 b/lang/elisp/ChangeLog-2008
deleted file mode 100644
index a2c3bc8..0000000
--- a/lang/elisp/ChangeLog-2008
+++ /dev/null
@@ -1,401 +0,0 @@
-2008-04-14  Neil Jerram  <address@hidden>
-
-       * primitives/symprop.scm (get): Use lambda->nil.
-
-       * primitives/strings.scm (aset): New primitive.
-
-       * internals/load.scm (load): Use in-vicinity (instead of
-       string-append) to add a slash if needed.
-
-2004-02-08  Mikael Djurfeldt  <address@hidden>
-
-       * primitives/Makefile.am (TAGS_FILES), internals/Makefile.am
-       (TAGS_FILES), Makefile.am (TAGS_FILES): Use this variable instead
-       of ETAGS_ARGS so that TAGS can be built using separate build
-       directory.
-
-2003-11-01  Neil Jerram  <address@hidden>
-
-       * internals/format.scm (format), internals/signal.scm (error),
-       internals/load.scm (load): Export using #:replace to avoid
-       duplicate binding warnings.
-
-2003-01-05  Marius Vollmer  <address@hidden>
-
-       * primitives/Makefile.am (elisp_sources): Added char-table.scm.
-
-2002-12-28  Neil Jerram  <address@hidden>
-
-       * base.scm (lang): Use char-table module.
-
-       * primitives/char-table.scm (lang): New (stub definitions).
-
-2002-12-08  Rob Browning  <address@hidden>
-
-       * Makefile.am (subpkgdatadir): VERSION -> GUILE_EFFECTIVE_VERSION.
-
-       * primitives/Makefile.am (subpkgdatadir): VERSION ->
-       GUILE_EFFECTIVE_VERSION.
-
-       * internals/Makefile.am (subpkgdatadir): VERSION ->
-       GUILE_EFFECTIVE_VERSION.
-
-2002-02-13  Neil Jerram  <address@hidden>
-
-       * base.scm (load-emacs): Add optional parameters for specifying an
-       alternative load path, and for debugging this.  (Thanks to
-       Thien-Thi Nguyen!)
-
-       * primitives/syntax.scm (setq): Use `set'.
-
-       * internals/set.scm (set): Fixed to support variables that are
-       imported from other modules.
-
-2002-02-12  Neil Jerram  <address@hidden>
-
-       * transform.scm (scheme): Use set-current-module to ensure
-       expected behaviour of resolve-module.
-
-2002-02-08  Neil Jerram  <address@hidden>
-
-       * STATUS: New file.
-
-       * README: Updated.
-
-       * interface.scm (translate-elisp): New exported procedure.
-       (elisp-function): Symbol var is `obj', not `symbol'.
-       
-       * internals/lambda.scm, primitives/fns.scm: Fix confusion between
-       interactive-spec and interactive-specification.
-       
-       * internals/lambda.scm (transform-lambda), primitives/syntax.scm
-       (defmacro): Bind unspecified optional and rest arguments to #nil,
-       not #f.
-
-       * internals/null.scm (->nil, lambda->nil): New, exported.
-       (null): Use ->nil.
-
-       * primitives/features.scm (featurep), primitives/fns.scm
-       (fboundp, subrp): Use ->nil.
-
-       * internals/lists.scm (cons, setcdr, memq, member, assq, assoc):
-       Simplified.
-       (car, cdr): Return #nil rather than #f.
-
-       * primitives/load.scm (current-load-list), primitives/pure.scm
-       (purify-flag): Set to #nil, not #f.
-
-       * primitives/match.scm (string-match): Return #nil rather than #f.
-
-       * primitives/numbers.scm (integerp, numberp),
-       primitives/strings.scm (string-lessp, stringp): Use lambda->nil.
-
-       * primitives/symprop.scm (boundp): Use ->nil.
-       (symbolp, local-variable-if-set-p): Return #nil rather than #f.
-
-       * primitives/syntax.scm (prog1, prog2): Mangle variable names
-       further to lessen possibility of conflicts.
-       (if, and, or, cond): Return #nil rather than #f.
-       (cond): Return #t rather than t (which is undefined).
-       (let, let*): Bind uninitialized variables to #nil, not #f.
-       
-       * transform.scm: Resolve inconsistency in usage of `map', and add
-       an explanatory note.  Also cleaned up use of subsidiary
-       transformation functions.  Also use cons-source wherever possible.
-       (transform-datum, transform-quote): New.
-       (transform-quasiquote): Renamed from `transform-inside-qq'.
-       (transform-application): Apply `transform-quote' to application
-       args.
-       (cars->nil): Removed.
-       
-       * internals/null.scm (null), primitives/lists.scm (cons, car, cdr,
-       setcdr, memq, member, assq, assoc, nth): Update to take into
-       account new libguile support for Elisp nil value.
-
-2002-02-06  Neil Jerram  <address@hidden>
-
-       * example.el (time): New macro, for performance measurement.
-       Accompanying comment compares results for Guile and Emacs.
-       
-       * transform.scm (scheme): New macro.
-       (transformer): New implementation of `scheme' escape that doesn't
-       rely on (lang elisp base) importing Guile bindings.
-
-       * base.scm: No longer import anything from (guile).
-       (load-emacs): Add scheme form to ensure that keywords
-       read option is set correctly.
-
-       * primitives/syntax.scm (defmacro, let, let*): Unquote uses of
-       address@hidden' in transformed code.
-       (if): Unquote uses of `nil-cond' in transformed code.
-
-       * internals/lambda.scm (transform-lambda): Unquote use of 
address@hidden'
-       in transformed code.
-
-       * transform.scm (transformer-macro): Don't quote `list' in
-       transformed code.
-       (transform-application): Don't quote address@hidden' in transformed 
code.
-       (transformer): No need to treat address@hidden' and address@hidden' as 
special
-       cases in input to the transformer.
-
-2002-02-04  Neil Jerram  <address@hidden>
-
-       * primitives/syntax.scm (parse-formals, transform-lambda,
-       interactive-spec, set-not-subr!, transform-lambda/interactive):
-       Move into internals/lambda.scm so that these can also be used
-       by...
-       
-       * internals/fset.scm (elisp-apply): Use `eval' and 
-       `transform-lambda/interactive' to turn a quoted lambda expression
-       into a Scheme procedure.
-
-       * transform.scm (m-quasiquote): Don't quote `quasiquote' in
-       transformed code.
-       (transformer): Transform '() to #nil.
-
-2002-02-03  Neil Jerram  <address@hidden>
-
-       * internals/Makefile.am (elisp_sources): Add lambda.scm.
-
-       * internals/lambda.scm (lang): New file.
-
-2002-02-01  Neil Jerram  <address@hidden>
-
-       * transform.scm (transformer), primitives/syntax.scm (let*):
-       Unquote uses of `begin' in transformed code.
-
-2002-01-29  Neil Jerram  <address@hidden>
-
-       * transform.scm (transform-1, transform-2, transform-3,
-       transform-list): Removed (unused).
-       
-       * transform.scm, primitives/syntax.scm: Add commas everywhere
-       before use of (guile) primitives in generated code, so that (lang
-       elisp base) doesn't have to import bindings from (guile).
-       
-       * base.scm: Move use-modules expressions inside the define-module,
-       and add #:pure so that we don't import bindings from (guile).
-
-2002-01-25  Neil Jerram  <address@hidden>
-
-       * transform.scm (transform-application): Preserve source
-       properties of original elisp expression by using cons-source.
-
-       * transform.scm: Don't handle special forms specially in the
-       translator.  Instead, define them as macros in ...
-       
-       * primitives/syntax.scm: New file; special form definitions.
-
-       * primitives/fns.scm (run-hooks): Rewritten correctly.
-
-       * primitives/symprop.scm (symbol-value): Use `value'.
-
-       * internals/set.scm (value): New function.
-
-       * primitives/fns.scm: Use (lang elisp internals null), as null is
-       no longer a primitive.  Change generated #f values to %nil.
-
-       * internals/null.scm (null): Handle nil symbol.
-
-       * primitives/lists.scm (memq, member, assq, assoc): Handle all
-       possible nil values.
-
-       * transform.scm (transformer): Translate `nil' and `t' to #nil and
-       #t.
-
-       * base.scm: Remove setting of 'language read-option.
-
-2001-11-03  Neil Jerram  <address@hidden>
-
-       * README (Resources): Fill in missing URLs.
-
-2001-11-02  Neil Jerram  <address@hidden>
-
-       * Makefile.am (elisp_sources): Added base.scm, example.el,
-       interface.scm; removed emacs.scm.
-
-       * README: Updated accordingly.
-
-       * internals/load.scm (load): Avoid using `load-path' if the
-       supplied file name begins with a slash.
-       
-       * internals/fset.scm: Support export of defuns, defmacros and
-       defvars to a module specified by the fluid `elisp-export-module'.
-       This allows us to automate the importing of Elisp definitions into
-       Scheme.
-       
-       * example.el: New file: example code for `load-elisp-file'.
-
-       * interface.scm: New file - mechanisms to exchange definitions
-       between Scheme and Elisp.
-
-       Following changes try to make the Elisp evaluation module less
-       Emacs-dependent; in other words, so that it isn't necessary to try
-       to load the whole Emacs environment before evaluating basic
-       non-Emacs-specific Elisp code.
-       
-       * variables.scm, internals/evaluation.scm: Changed (lang elisp
-       emacs) to (lang elisp base).
-       
-       * emacs.scm (lang): Removed.
-
-       * base.scm (lang): New file (non-emacs-specific replacement for
-       emacs.scm).
-
-2001-10-28  Neil Jerram  <address@hidden>
-
-       * primitives/symprop.scm (symbol-name): New primitive.
-
-       * primitives/strings.scm (stringp): New primitive.
-
-       * primitives/pure.scm (purify-flag): New variable.
-
-       * primitives/numbers.scm (numberp): New primitive.
-
-       * internals/fset.scm (fset): Set procedure and macro name
-       properties usefully to match Elisp symbol names.  Also bind Elisp
-       function definition variables to similarly named symbols in the
-       (lang elisp variables) module.
-
-       * transform.scm (transformer, m-unwind-protect): Added support for
-       `unwind-protect'.
-       (m-quasiquote): Use 'quasiquote rather than 'quote.
-       (transform-lambda, m-defmacro): When no rest arguments, set the
-       rest parameter to '() rather than #f.  It shouldn't make any
-       difference, but it feels more right.
-
-       * README: Enlarged description of current status.
-
-       * Makefile.am (elisp_sources): Added variables.scm.
-
-       * variables.scm: New file.
-
-2001-10-26  Neil Jerram  <address@hidden>
-
-       * buffers.scm, calling.scm: Removed.  These should have
-       disappeared during the reorganization described below, but I
-       missed them by mistake.
-       
-       * primitives/symprop.scm (set, boundp, symbol-value): Changed to
-       use (module-xx the-elisp-module ...) rather than (local-xx ...).
-       (symbolp): Accept either symbols or keywords.
-       (set-default, default-boundp, default-value,
-       local-variable-if-set-p): New.
-
-       * primitives/match.scm (string-match, match-data): Store last
-       match data in Emacs rather than Guile form, to simplify
-       implementation of ...
-       (set-match-data, store-match-data): New.
-
-       * primitives/load.scm (autoload, current-load-list): New.  (But
-       autoload is just stubbed, not properly implemented.)
-
-       * primitives/lists.scm (nth, listp, consp, nconc): New.
-
-       * primitives/fns.scm (byte-code-function-p, run-hooks): New.
-
-       * transform.scm (transform-application, transformer-macro): New
-       scheme for transforming procedure arguments while leaving macro
-       args untransformed.  (See also associated change in libguile.)
-       (m-defconst): Simplified, now uses m-setq.
-
-       * Makefile.am: Changed so that it only deals with files directly
-       in this directory; otherwise files don't install cleanly.
-
-       * internals/Makefile.am, primitives/Makefile.am,
-       internals/.cvsignore, primitives/.cvsignore: New files.
-
-2001-10-26  Neil Jerram  <address@hidden>
-
-       * transform.scm (transformer): New handling for (1) quasiquoting
-       syntax like "(` ...)" as well as the more normal "` ..."; (2)
-       `function'; (3) interactive specification in lambda body.
-       Simplied handling for `setq'.
-       (transform-inside-qq): Fixed to handle improper as well as proper
-       lists.
-       (transform-lambda/interactive): New; wraps transform-lambda to
-       handle setting of various procedure properties.
-       (transform-lambda, m-defmacro): Changed `args' and `num-args' to
-       `%--args' and `%--num-args' in the hope of avoiding lexical
-       vs. dynamic name clashes.
-       (m-and): Use #f instead of '() where a condition fails.
-
-       Plus big hierarchy reorganization, in which most of the previous
-       occupants of lang/elisp moved to lang/elisp/primitives, with some
-       internal processing being split out into lang/elisp/internals.
-       The upshot looks like this:
-
-       * internals/trace.scm, internals/set.scm, internals/load.scm,
-       internals/fset.scm, internals/signal.scm, internals/time.scm,
-       internals/format.scm, internals/null.scm,
-       internals/evaluation.scm, primitives/buffers.scm,
-       primitives/features.scm, primitives/format.scm,
-       primitives/time.scm, primitives/guile.scm, primitives/keymaps.scm,
-       primitives/lists.scm, primitives/load.scm, primitives/match.scm,
-       primitives/numbers.scm, primitives/pure.scm, primitives/read.scm,
-       primitives/signal.scm, primitives/strings.scm,
-       primitives/symprop.scm, primitives/system.scm, primitives/fns.scm:
-       New files.
-
-       * features.scm, format.scm, fset.scm, guile.scm, keymaps.scm,
-       lists.scm, load.scm, match.scm, numbers.scm, pure.scm, read.scm,
-       signal.scm, strings.scm, symprop.scm, system.scm, time.scm,
-       trace.scm: Removed files.
-       
-2001-10-23  Neil Jerram  <address@hidden>
-
-       * match.scm (string-match): New implementation using new
-       `make-emacs-regexp' primitive; old workaround implementation
-       renamed to `string-match-workaround'.
-
-2001-10-21  Neil Jerram  <address@hidden>
-
-       * transform.scm (m-defun, m-defmacro, m-let, m-defvar,
-       m-defconst): Use more selective tracing mechanism (provided by new
-       file trace.scm).
-       
-       * symprop.scm (get, boundp), transform.scm (transform-lambda,
-       m-defmacro): Remove unnecessary uses of nil-ify and t-ify.
-       
-       * match.scm (string-match): Workaround Guile/libc regex
-       parenthesis bug.
-
-       * emacs.scm: Move elisp primitive definitions into more specific
-       files, so that emacs.scm contains only overall code.
-
-       * Makefile.am: Added new files.
-       
-       * numbers.scm, trace.scm, time.scm, pure.scm, system.scm,
-       read.scm, calling.scm, guile.scm: New files.
-
-2001-10-20  Neil Jerram  <address@hidden>
-
-       * Makefile.am (elisp_sources): Added match.scm and strings.scm.
-
-       * match.scm, strings.scm: New files.
-
-2001-10-19  Neil Jerram  <address@hidden>
-
-       * transform.scm: Replace uses of `nil' by `#f' or `'()'.
-
-       * Makefile.am (elisp_sources): Added lists.scm.
-
-       * load.scm (the-elisp-module): Corrected (lang elisp emacs) module
-       name.
-
-       * lists.scm (lang): New file containing list-related primitives.
-
-       * emacs.scm: Corrected module name.
-
-2001-10-19  Neil Jerram  <address@hidden>
-
-       Initial implementation of an Emacs Lisp translator, based on
-       transformer code originally written by Mikael Djurfeldt.
-       
-       * Makefile.am, .cvsignore: New.
-
-       * ChangeLog, README, buffers.scm, emacs.scm, features.scm,
-       format.scm, fset.scm, keymaps.scm, load.scm, signal.scm,
-       symprop.scm, transform.scm: New files.
-       
-
diff --git a/lang/elisp/README b/lang/elisp/README
deleted file mode 100644
index 1cecb38..0000000
--- a/lang/elisp/README
+++ /dev/null
@@ -1,303 +0,0 @@
-                                                    -*- outline -*-
-
-This directory holds the Scheme side of a translator for Emacs Lisp.
-
-* Usage
-
-To load up the base Elisp environment:
-
-    (use-modules (lang elisp base))
-
-Then you can switch into this module
-
-    (define-module (lang elisp base))
-
-and start typing away in Elisp, or evaluate an individual Elisp
-expression from Scheme:
-
-    (eval EXP (resolve-module '(lang elisp base)))
-
-A more convenient, higher-level interface is provided by (lang elisp
-interface):
-
-    (use-modules (lang elisp interface))
-
-With this interface, you can evaluate an Elisp expression
-
-    (eval-elisp EXP)
-
-load an Elisp file with no effect on the Scheme world
-
-    (load-elisp-file "/home/neil/Guile/cvs/guile-core/lang/elisp/example.el")
-
-load an Elisp file, automatically importing top level definitions into
-Scheme
-
-    (use-elisp-file "/home/neil/Guile/cvs/guile-core/lang/elisp/example.el")
-
-export Scheme objects to Elisp
-
-    (export-to-elisp + - * my-func 'my-var)
-
-and try to bootstrap a complete Emacs environment:
-
-    (load-emacs)
-
-* Status
-
-Please see the STATUS file for the full position.
-
-** Trying to load a complete Emacs environment.
-
-To try this, type `(use-modules (lang elisp interface))' and then
-`(load-emacs)'.  The following output shows how far I get when I try
-this.
-
-guile> (use-modules (lang elisp interface))
-guile> (load-emacs)
-Calling loadup.el to clothe the bare Emacs...
-Loading /usr/share/emacs/20.7/lisp/loadup.el...
-Using load-path ("/usr/share/emacs/20.7/lisp/" 
"/usr/share/emacs/20.7/lisp/emacs-lisp/")
-Loading /usr/share/emacs/20.7/lisp/byte-run.el...
-Loading /usr/share/emacs/20.7/lisp/byte-run.el...done
-Loading /usr/share/emacs/20.7/lisp/subr.el...
-Loading /usr/share/emacs/20.7/lisp/subr.el...done
-Loading /usr/share/emacs/20.7/lisp/version.el...
-Loading /usr/share/emacs/20.7/lisp/version.el...done
-Loading /usr/share/emacs/20.7/lisp/map-ynp.el...
-Loading /usr/share/emacs/20.7/lisp/map-ynp.el...done
-Loading /usr/share/emacs/20.7/lisp/widget.el...
-Loading /usr/share/emacs/20.7/lisp/emacs-lisp/cl.el...
-Loading /usr/share/emacs/20.7/lisp/emacs-lisp/cl.el...done
-Loading /usr/share/emacs/20.7/lisp/widget.el...done
-Loading /usr/share/emacs/20.7/lisp/custom.el...
-Loading /usr/share/emacs/20.7/lisp/custom.el...done
-Loading /usr/share/emacs/20.7/lisp/cus-start.el...
-Note, built-in variable `abbrev-all-caps' not bound
-  ... [many other variable not bound messages] ...
-Loading /usr/share/emacs/20.7/lisp/cus-start.el...done
-Loading /usr/share/emacs/20.7/lisp/international/mule.el...
-<unnamed port>: In procedure make-char-table in expression (@fop 
make-char-table (# #)):
-<unnamed port>: Symbol's function definition is void
-ABORT: (misc-error)
-
-Type "(backtrace)" to get more information or "(debug)" to enter the debugger.
-guile> 
-
-That's 3279 lines ("wc -l") of Elisp code already, which isn't bad!
-
-I think that progress beyond this point basically means implementing
-multilingual and multibyte strings properly for Guile.  Which is a
-_lot_ of work and requires IMO a very clear plan for Guile's role with
-respect to Emacs.
-
-* Design
-
-When thinking about how to implement an Elisp translator for Guile, it
-is important to realize that the great power of Emacs does not arise
-from Elisp (seen as a language in syntactic terms) alone, but from the
-combination of this language with the collection of primitives
-provided by the Emacs C source code.  Therefore, to be of practical
-use, an Elisp translator needs to be more than just a transformer that
-translates sexps to Scheme expressions.
-
-The finished translator should consist of several parts...
-
-** Syntax transformation
-
-Although syntax transformation isn't all we need, we do still need it!
-
-This part is implemented by the (lang elisp transform) module; it is
-close to complete and seems to work pretty reliably.
-
-Note that transformed expressions use the address@hidden' and address@hidden' 
macros
-provided by...
-
-** C support for transformed expressions
-
-For performance and historical reasons (and perhaps necessity - I
-haven't thought about it enough yet), some of the transformation
-support is written in C.
-
-*** @fop
-
-The address@hidden' macro is used to dispatch Elisp applications.  Its first
-argument is a symbol, and this symbol's function slot is examined to
-find a procedure or macro to apply to the remaining arguments.  address@hidden'
-also handles aliasing (`defalias'): in this case the function slot
-contains another symbol.
-
-Once address@hidden' has found the appropriate procedure or macro to apply, it
-returns an application expression in which that procedure or macro
-replaces the address@hidden' and the original symbol.  Hence no Elisp-specific
-evaluator support is required to perform the application.
-
-*** @bind
-
-Currently, Elisp variables are the same as Scheme variables, so
-variable references are effectively untransformed.
-
-The address@hidden' macro does Elisp-style dynamic variable binding.
-Basically, it locates the named top level variables, `set!'s them to
-new values, evaluates its body, and then uses `set!' again to restore
-the original values.
-
-Because of the body evaluation, address@hidden' requires evaluator support.
-In fact, the address@hidden' macro code does little more than replace itself
-with the memoized SCM_IM_BIND.  Most of the work is done by the
-evaluator when it hits SCM_IM_BIND.
-
-One theoretical problem with address@hidden' is that any local Scheme variable
-in the same scope and with the same name as an Elisp variable will
-shadow the Elisp variable.  But in practice it's difficult to set up
-such a situation; an exception is the translator code itself, so there
-we mangle the relevant Scheme variable names a bit to avoid the
-problem.
-
-Other possible problems with this approach are that it might not be
-possible to implement buffer local variables properly, and that
address@hidden' might become too inefficient when we implement full support
-for undefining Scheme variables.  So we might in future have to
-transform Elisp variable references after all.
-
-*** Truth value stuff
-
-Following extensive discussions on the Guile mailing list between
-September 2001 and January 2002, we decided to go with Jim Blandy's
-proposal.  See devel/translation/lisp-and-scheme.text for details.
-
-- The Elisp nil value is a new immediate SCM_MAKIFLAG, eq?-distinct
-from both #f and '() (and of course any other Scheme value).  It can
-be accessed via the (guile) binding `%nil', and prints as `#nil'.
-
-- All Elisp primitives treat #nil, #f and '() as identical.
-
-- Scheme truth-testing primitives have been modified so that they
-treat #nil the same as #f.
-
-- Scheme list-manipulating primitives have been modified so that they
-treat #nil the same as '().
-
-- The Elisp t value is the same as #t.
-
-** Emacs editing primitives
-
-Buffers, keymaps, text properties, windows, frames etc. etc.
-
-Basically, everything that is implemented as a primitive in the Emacs
-C code needs to be implemented either in Scheme or in C for Guile.
-
-The Scheme files in the primitives subdirectory implement some of
-these primitives in Scheme.  Not because that is the right decision,
-but because this is a proof of concept and it's quicker to write badly
-performing code in Scheme.
-
-Ultimately, most of these primitive definitions should really come
-from the Emacs C code itself, translated or preprocessed in a way that
-makes it compile with Guile.  I think this is pretty close to the work
-that Ken Raeburn has been doing on the Emacs codebase.
-
-** Reading and printing support
-
-Elisp is close enough to Scheme that it's convenient to coopt the
-existing Guile reader rather than to write a new one from scratch, but
-there are a few syntactic differences that will require changes in
-reading and printing.  None of the following changes has yet been
-implemented.
-
-- Character syntax is `?a' rather than `#\a'.  (Not done.  More
-  precisely, `?a' in Elisp isn't character syntax but an alternative
-  integer syntax.  Note that we could support most of the `?a' syntax
-  simply by doing 
-
-      (define ?a (char->integer #\a)
-      (define ?b (char->integer #\b)
-
-  and so on.)
-
-- Vector syntax is `[1 2 3]' rather than `#(1 2 3)'.
-
-- When in an Elisp environment, #nil and #t should print as `nil' and
-  `t'.
-
-** The Elisp evaluation module (lang elisp base)
-
-Fundamentally, Guile's module system can't be used to package Elisp
-code in the same way it is used for Scheme code, because Elisp
-function definitions are stored as symbol properties (in the symbol's
-"function slot") and so are global.  On the other hand, it is useful
-(necessary?) to associate some particular module with Elisp evaluation
-because
-
-- Elisp variables are currently implemented as Scheme variables and so
-  need to live in some module
-
-- a syntax transformer is a property of a module.
-
-Therefore we have the (lang elisp base) module, which acts as the
-repository for all Elisp variables and the site of all Elisp
-evaluation.
-
-The initial environment provided by this module is intended to be a
-non-Emacs-dependent subset of Elisp.  To get the idea, imagine someone
-who wants to write an extension function for, say Gnucash, and simply
-prefers to write in Elisp rather than in Scheme.  He/she therefore
-doesn't buffers, keymaps and so on, just the basic language syntax and
-core data functions like +, *, concat, length etc., plus specific
-functions made available by Gnucash.
-
-(lang elisp base) achieves this by
-
-- importing Scheme definitions for some Emacs primitives from the
-  files in the primitives subdirectory
-
-- then switching into Elisp syntax.
-
-After this point, `(eval XXX (resolve-module '(lang elisp base)))'
-will evaluate XXX as an Elisp expression in the (lang elisp base)
-module.  (`eval-elisp' in (lang elisp interface) is a more convenient
-wrapper for this.)
-
-** Full Emacs environment
-
-The difference between the initial (lang elisp base) environment and a
-fully loaded Emacs equivalent is
-
-- more primitives: buffers, char-tables and many others
-
-- the bootstrap Elisp code that an undumped Emacs loads during
-  installation by calling `(load "loadup.el")'.
-
-We don't have all the missing primitives, but we can already get
-through some of loadup.el.  The Elisp function `load-emacs' (defined
-in (lang elisp base) initiates the loading of loadup.el; (lang elisp
-interface) exports `load-emacs' to Scheme.
-
-`load-emacs' loads so much Elisp code that it's an excellent way to
-test the translator.  In current practice, it runs for a while and
-then fails when it gets to an undefined primitive or a bug in the
-translator.  Eventually, it should go all the way.  (And then we can
-worry about adding unexec support to Guile!)  For the output that
-currently results from calling `(load-emacs)', see above in the Status
-section.
-
-* Resources
-
-** Ken Raeburn's Guile Emacs page
-
-http://www.mit.edu/~raeburn/guilemacs/
-
-** Keisuke Nishida's Gemacs project
-
-http://gemacs.sourceforge.net
-
-** Jim Blandy's nil/#f/() notes
-
-http://sanpietro.red-bean.com/guile/guile/old/3114.html
-
-Also now stored as guile-core/devel/translation/lisp-and-scheme.text
-in Guile CVS.
-
-** Mikael Djurfeldt's notes on translation
-
-See file guile-core/devel/translation/langtools.text in Guile CVS.
diff --git a/lang/elisp/STATUS b/lang/elisp/STATUS
deleted file mode 100644
index 066e86f..0000000
--- a/lang/elisp/STATUS
+++ /dev/null
@@ -1,35 +0,0 @@
-                                                        -*-text-*-
-
-I've now finished my currently planned work on the Emacs Lisp
-translator in guile-core CVS.
-
-It works well enough for experimentation and playing around with --
-see the README file for details of what it _can_ do -- but has two
-serious restrictions:
-
-- Most Emacs Lisp primitives are not yet implemented.  In particular,
-  there are no buffer-related primitives.
-
-- Performance compares badly with Emacs.  Using a handful of
-  completely unscientific tests, I found that Guile was between 2 and
-  20 times slower than Emacs.  (See the comment in
-  lang/elisp/example.el for details of tests and results.)
-
-Interestingly, both these restrictions point in the same direction:
-the way forward is to define the primitives by compiling a
-preprocessed version of the Emacs source code, not by trying to
-implement them in Scheme.  (Which, of course, is what Ken Raeburn's
-project is already trying to do.)
-
-Given this conclusion, I expect that most of the translator's Scheme
-code will eventually become obsolete, replaced by bits of Emacs C
-code.  Until then, though, it should have a role:
-
-- as a guide to the Guile Emacs project on how to interface to the
-  Elisp support in libguile (notably, usage of address@hidden' and 
address@hidden')
-
-- as a proof of concept and fun thing to experiment with
-
-- as a working translator that could help us develop our picture of
-  how we want to integrate translator usage in general with the rest
-  of Guile.
diff --git a/lang/elisp/base.scm b/lang/elisp/base.scm
deleted file mode 100644
index 6c785cb..0000000
--- a/lang/elisp/base.scm
+++ /dev/null
@@ -1,48 +0,0 @@
-(define-module (lang elisp base)
-
-  ;; Be pure.  Nothing in this module requires symbols that map to the
-  ;; standard Guile builtins, and it creates a problem if this module
-  ;; has access to them, as @bind can dynamically change their values.
-  ;; Transformer output always uses the values of builtin procedures
-  ;; and macros directly.
-  #:pure
-
-  ;; {Elisp Primitives}
-  ;;
-  ;; In other words, Scheme definitions of elisp primitives.  This
-  ;; should (ultimately) include everything that Emacs defines in C.
-  #:use-module (lang elisp primitives buffers)
-  #:use-module (lang elisp primitives char-table)
-  #:use-module (lang elisp primitives features)
-  #:use-module (lang elisp primitives format)
-  #:use-module (lang elisp primitives fns)
-  #:use-module (lang elisp primitives guile)
-  #:use-module (lang elisp primitives keymaps)
-  #:use-module (lang elisp primitives lists)
-  #:use-module (lang elisp primitives load)
-  #:use-module (lang elisp primitives match)
-  #:use-module (lang elisp primitives numbers)
-  #:use-module (lang elisp primitives pure)
-  #:use-module (lang elisp primitives read)
-  #:use-module (lang elisp primitives signal)
-  #:use-module (lang elisp primitives strings)
-  #:use-module (lang elisp primitives symprop)
-  #:use-module (lang elisp primitives syntax)
-  #:use-module (lang elisp primitives system)
-  #:use-module (lang elisp primitives time)
-
-  ;; Now switch into Emacs Lisp syntax.
-  #:use-syntax (lang elisp transform))
-
-;;; Everything below here is written in Elisp.
-
-(defun load-emacs (&optional new-load-path debug)
-  (if debug (message "load-path: %s" load-path))
-  (cond (new-load-path
-         (message "Setting load-path to: %s" new-load-path)
-         (setq load-path new-load-path)))
-  (if debug (message "load-path: %s" load-path))
-  (scheme (read-set! keywords 'prefix))
-  (message "Calling loadup.el to clothe the bare Emacs...")
-  (load "loadup.el")
-  (message "Guile Emacs now fully clothed"))
diff --git a/lang/elisp/example.el b/lang/elisp/example.el
deleted file mode 100644
index eebd2f8..0000000
--- a/lang/elisp/example.el
+++ /dev/null
@@ -1,39 +0,0 @@
-
-(defun html-page (title &rest contents)
-  (concat "<HTML>\n"
-         "<HEAD>\n"
-         "<TITLE>" title "</TITLE>\n"
-         "</HEAD>\n"
-         "<BODY>\n"
-         (apply 'concat contents)
-         "</BODY>\n"
-         "</HTML>\n"))
-
-(defmacro time (repeat-count &rest body)
-  `(let ((count ,repeat-count)
-        (beg (current-time))
-        end)
-     (while (> count 0)
-       (setq count (- count 1))
-       ,@body)
-     (setq end (current-time))
-     (+ (* 1000000.0 (+ (* 65536.0 (- (car end) (car beg)))
-                       (- (cadr end) (cadr beg))))
-       (* 1.0 (- (caddr end) (caddr beg))))))
-
-;Non-scientific performance measurements (Guile measurements are with
-;`guile -q --no-debug'):
-;
-;(time 100000 (+ 3 4))
-; => 225,071 (Emacs) 4,000,000 (Guile)
-;(time 100000 (lambda () 1))
-; => 2,410,456 (Emacs) 4,000,000 (Guile)
-;(time 100000 (apply 'concat (mapcar (lambda (s) (concat s "." s)) '("a" "b" 
"c" "d"))))
-; => 10,185,792 (Emacs) 136,000,000 (Guile)
-;(defun sc (s) (concat s "." s))
-;(time 100000 (apply 'concat (mapcar 'sc  '("a" "b" "c" "d"))))
-; => 7,870,055 (Emacs) 26,700,000 (Guile)
-;
-;Sadly, it looks like the translator's performance sucks quite badly
-;when compared with Emacs.  But the translator is still very new, so
-;there's probably plenty of room of improvement.
diff --git a/lang/elisp/expand.scm b/lang/elisp/expand.scm
deleted file mode 100644
index 0599d59..0000000
--- a/lang/elisp/expand.scm
+++ /dev/null
@@ -1,4 +0,0 @@
-(define-module (lang elisp expand)
-  #:export (expand))
-
-(define (expand x) x)
diff --git a/lang/elisp/interface.scm b/lang/elisp/interface.scm
deleted file mode 100644
index 31864cc..0000000
--- a/lang/elisp/interface.scm
+++ /dev/null
@@ -1,140 +0,0 @@
-(define-module (lang elisp interface)
-  #:use-syntax (lang elisp expand)
-  #:use-module (lang elisp internals evaluation)
-  #:use-module (lang elisp internals fset)
-  #:use-module ((lang elisp internals load) #:select ((load . elisp:load)))
-  #:use-module ((lang elisp transform) #:select (transformer))
-  #:export (eval-elisp
-           translate-elisp
-           elisp-function
-           elisp-variable
-           load-elisp-file
-           load-elisp-library
-           use-elisp-file
-           use-elisp-library
-           export-to-elisp
-           load-emacs))
-
-;;; This file holds my ideas for the mechanisms that would be useful
-;;; to exchange definitions between Scheme and Elisp.
-
-(define (eval-elisp x)
-  "Evaluate the Elisp expression @var{x}."
-  (save-module-excursion 
-   (lambda ()
-     (set-current-module the-elisp-module)
-     (primitive-eval x))))
-
-(define (translate-elisp x)
-  "Translate the Elisp expression @var{x} to equivalent Scheme code."
-  (transformer x))
-
-(define (elisp-function sym)
-  "Return the procedure or macro that implements @var{sym} in Elisp.
-If @var{sym} has no Elisp function definition, return @code{#f}."
-  (fref sym))
-
-(define (elisp-variable sym)
-  "Return the variable that implements @var{sym} in Elisp.
-If @var{sym} has no Elisp variable definition, return @code{#f}."
-  (module-variable the-elisp-module sym))
-
-(define (load-elisp-file file-name)
-  "Load @var{file-name} into the Elisp environment.
address@hidden is assumed to name a file containing Elisp code."
-  ;; This is the same as Elisp's `load-file', so use that if it is
-  ;; available, otherwise duplicate the definition of `load-file' from
-  ;; files.el.
-  (let ((load-file (elisp-function 'load-file)))
-    (if load-file
-       (load-file file-name)
-       (elisp:load file-name #f #f #t))))
-
-(define (load-elisp-library library)
-  "Load library @var{library} into the Elisp environment.
address@hidden should name an Elisp code library that can be found in
-one of the directories of @code{load-path}."
-  ;; This is the same as Elisp's `load-file', so use that if it is
-  ;; available, otherwise duplicate the definition of `load-file' from
-  ;; files.el.
-  (let ((load-library (elisp-function 'load-library)))
-    (if load-library
-       (load-library library)
-       (elisp:load library))))
-
-(define export-module-name
-  (let ((counter 0))
-    (lambda ()
-      (set! counter (+ counter 1))
-      (list 'lang 'elisp
-           (string->symbol (string-append "imports:"
-                                          (number->string counter)))))))
-
-(define use-elisp-file
-  (procedure->memoizing-macro
-   (lambda (exp env)
-     "Load Elisp code file @var{file-name} and import its definitions
-into the current Scheme module.  If any @var{imports} are specified,
-they are interpreted as selection and renaming specifiers as per
address@hidden"
-     (let ((file-name (cadr exp))
-           (env (cddr exp)))
-       (let ((export-module-name (export-module-name)))
-         `(begin
-            (fluid-set! ,elisp-export-module (resolve-module 
',export-module-name))
-            (beautify-user-module! (resolve-module ',export-module-name))
-            (load-elisp-file ,file-name)
-            (use-modules (,export-module-name ,@imports))
-            (fluid-set! ,elisp-export-module #f)))))))
-
-(define use-elisp-library
-  (procedure->memoizing-macro
-   (lambda (exp env)
-     "Load Elisp library @var{library} and import its definitions into
-the current Scheme module.  If any @var{imports} are specified, they
-are interpreted as selection and renaming specifiers as per
address@hidden"
-     (let ((library (cadr exp))
-           (env (cddr exp)))
-       (let ((export-module-name (export-module-name)))
-         `(begin
-            (fluid-set! ,elisp-export-module (resolve-module 
',export-module-name))
-            (beautify-user-module! (resolve-module ',export-module-name))
-            (load-elisp-library ,library)
-            (use-modules (,export-module-name ,@imports))
-            (fluid-set! ,elisp-export-module #f)))))))
-
-(define (export-to-elisp . defs)
-  "Export procedures and variables specified by @var{defs} to Elisp.
-Each @var{def} is either an object, in which case that object must be
-a named procedure or macro and is exported to Elisp under its Scheme
-name; or a symbol, in which case the variable named by that symbol is
-exported under its Scheme name; or a pair @var{(obj . name)}, in which
-case @var{obj} must be a procedure, macro or symbol as already
-described and @var{name} specifies the name under which that object is
-exported to Elisp."
-  (for-each (lambda (def)
-             (let ((obj (if (pair? def) (car def) def))
-                   (name (if (pair? def) (cdr def) #f)))
-               (cond ((procedure? obj)
-                      (or name
-                          (set! name (procedure-name obj)))
-                      (if name
-                          (fset name obj)
-                          (error "No procedure name specified or deducible:" 
obj)))
-                     ((macro? obj)
-                      (or name
-                          (set! name (macro-name obj)))
-                      (if name
-                          (fset name obj)
-                          (error "No macro name specified or deducible:" obj)))
-                     ((symbol? obj)
-                      (or name
-                          (set! name obj))
-                      (module-add! the-elisp-module name
-                                   (module-ref (current-module) obj)))
-                     (else
-                      (error "Can't export this kind of object to Elisp:" 
obj)))))
-           defs))
-
-(define load-emacs (elisp-function 'load-emacs))
diff --git a/lang/elisp/internals/evaluation.scm 
b/lang/elisp/internals/evaluation.scm
deleted file mode 100644
index 8cbb194..0000000
--- a/lang/elisp/internals/evaluation.scm
+++ /dev/null
@@ -1,13 +0,0 @@
-(define-module (lang elisp internals evaluation)
-  #:export (the-elisp-module))
-
-;;;; {Elisp Evaluation}
-
-;;;; All elisp evaluation happens within the same module - namely
-;;;; (lang elisp base).  This is necessary both because elisp itself
-;;;; has no concept of different modules - reflected for example in
-;;;; its single argument `eval' function - and because Guile's current
-;;;; implementation of elisp stores elisp function definitions in
-;;;; slots in global symbol objects.
-
-(define the-elisp-module (resolve-module '(lang elisp base)))
diff --git a/lang/elisp/internals/format.scm b/lang/elisp/internals/format.scm
deleted file mode 100644
index 7ea562a..0000000
--- a/lang/elisp/internals/format.scm
+++ /dev/null
@@ -1,62 +0,0 @@
-(define-module (lang elisp internals format)
-  #:pure
-  #:use-module (ice-9 r5rs)
-  #:use-module ((ice-9 format) #:select ((format . scheme:format)))
-  #:use-module (lang elisp internals fset)
-  #:use-module (lang elisp internals signal)
-  #:replace (format)
-  #:export (message))
-
-(define (format control-string . args)
-
-  (define (cons-string str ls)
-    (let loop ((sl (string->list str))
-              (ls ls))
-      (if (null? sl)
-         ls
-         (loop (cdr sl) (cons (car sl) ls)))))
-
-  (let loop ((input (string->list control-string))
-            (args args)
-            (output '())
-            (mid-control #f))
-    (if (null? input)
-       (if mid-control
-           (error "Format string ends in middle of format specifier")
-           (list->string (reverse output)))
-       (if mid-control
-           (case (car input)
-             ((#\%)
-              (loop (cdr input)
-                    args
-                    (cons #\% output)
-                    #f))
-             (else
-              (loop (cdr input)
-                    (cdr args)
-                    (cons-string (case (car input)
-                                   ((#\s) (scheme:format #f "~A" (car args)))
-                                   ((#\d) (number->string (car args)))
-                                   ((#\o) (number->string (car args) 8))
-                                   ((#\x) (number->string (car args) 16))
-                                   ((#\e) (number->string (car args))) ;FIXME
-                                   ((#\f) (number->string (car args))) ;FIXME
-                                   ((#\g) (number->string (car args))) ;FIXME
-                                   ((#\c) (let ((a (car args)))
-                                            (if (char? a)
-                                                (string a)
-                                                (string (integer->char a)))))
-                                   ((#\S) (scheme:format #f "~S" (car args)))
-                                   (else
-                                    (error "Invalid format operation %%%c" 
(car input))))
-                                 output)
-                    #f)))
-           (case (car input)
-             ((#\%)
-              (loop (cdr input) args output #t))
-             (else
-              (loop (cdr input) args (cons (car input) output) #f)))))))
-
-(define (message control-string . args)
-  (display (apply format control-string args))
-  (newline))
diff --git a/lang/elisp/internals/fset.scm b/lang/elisp/internals/fset.scm
deleted file mode 100644
index 249db7c..0000000
--- a/lang/elisp/internals/fset.scm
+++ /dev/null
@@ -1,113 +0,0 @@
-(define-module (lang elisp internals fset)
-  #:use-module (lang elisp internals evaluation)
-  #:use-module (lang elisp internals lambda)
-  #:use-module (lang elisp internals signal)
-  #:export (fset
-           fref
-           fref/error-if-void
-           elisp-apply
-           interactive-specification
-           not-subr?
-           elisp-export-module))
-
-(define the-variables-module (resolve-module '(lang elisp variables)))
-
-;; By default, Guile GC's unreachable symbols.  So we need to make
-;; sure they stay reachable!
-(define syms '())
-
-;; elisp-export-module, if non-#f, holds a module to which definitions
-;; should be exported under their normal symbol names.  This is used
-;; when importing Elisp definitions into Scheme.
-(define elisp-export-module (make-fluid))
-
-;; Store the procedure, macro or alias symbol PROC in SYM's function
-;; slot.
-(define (fset sym proc)
-  (or (memq sym syms)
-      (set! syms (cons sym syms)))
-  (let ((vcell (symbol-fref sym))
-       (vsym #f)
-       (export-module (fluid-ref elisp-export-module)))
-    ;; Playing around with variables and name properties...  For the
-    ;; reasoning behind this, see the commentary in (lang elisp
-    ;; variables).
-    (cond ((procedure? proc)
-          ;; A procedure created from Elisp will already have a name
-          ;; property attached, with value of the form
-          ;; <elisp-defun:NAME> or <elisp-lambda>.  Any other
-          ;; procedure coming through here must be an Elisp primitive
-          ;; definition, so we give it a name of the form
-          ;; <elisp-subr:NAME>.
-          (or (procedure-name proc)
-              (set-procedure-property! proc
-                                       'name
-                                       (symbol-append '<elisp-subr: sym '>)))
-          (set! vsym (procedure-name proc)))
-         ((macro? proc)
-          ;; Macros coming through here must be defmacros, as all
-          ;; primitive special forms are handled directly by the
-          ;; transformer.
-          (set-procedure-property! (macro-transformer proc)
-                                   'name
-                                   (symbol-append '<elisp-defmacro: sym '>))
-          (set! vsym (procedure-name (macro-transformer proc))))
-         (else
-          ;; An alias symbol.
-          (set! vsym (symbol-append '<elisp-defalias: sym '>))))
-    ;; This is the important bit!
-    (if (variable? vcell)
-       (variable-set! vcell proc)
-       (begin
-         (set! vcell (make-variable proc))
-         (symbol-fset! sym vcell)
-         ;; Playing with names and variables again - see above.
-         (module-add! the-variables-module vsym vcell)
-         (module-export! the-variables-module (list vsym))))
-    ;; Export variable to the export module, if non-#f.
-    (if (and export-module
-            (or (procedure? proc)
-                (macro? proc)))
-       (begin
-         (module-add! export-module sym vcell)
-         (module-export! export-module (list sym))))))
-
-;; Retrieve the procedure or macro stored in SYM's function slot.
-;; Note the asymmetry w.r.t. fset: if fref finds an alias symbol, it
-;; recursively calls fref on that symbol.  Returns #f if SYM's
-;; function slot doesn't contain a valid definition.
-(define (fref sym)
-  (let ((var (symbol-fref sym)))
-    (if (and var (variable? var))
-       (let ((proc (variable-ref var)))
-         (cond ((symbol? proc)
-                (fref proc))
-               (else
-                proc)))
-       #f)))
-
-;; Same as fref, but signals an Elisp error if SYM's function
-;; definition is void.
-(define (fref/error-if-void sym)
-  (or (fref sym)
-      (signal 'void-function (list sym))))
-
-;; Maps a procedure to its (interactive ...) spec.
-(define interactive-specification (make-object-property))
-
-;; Maps a procedure to #t if it is NOT a built-in.
-(define not-subr? (make-object-property))
-
-(define (elisp-apply function . args)
-  (apply apply
-        (cond ((symbol? function)
-               (fref/error-if-void function))
-              ((procedure? function)
-               function)
-              ((and (pair? function)
-                    (eq? (car function) 'lambda))
-               (eval (transform-lambda/interactive function '<elisp-lambda>)
-                     the-root-module))
-              (else
-               (signal 'invalid-function (list function))))
-        args))
diff --git a/lang/elisp/internals/lambda.scm b/lang/elisp/internals/lambda.scm
deleted file mode 100644
index f7c7a4d..0000000
--- a/lang/elisp/internals/lambda.scm
+++ /dev/null
@@ -1,109 +0,0 @@
-(define-module (lang elisp internals lambda)
-  #:use-syntax (lang elisp expand)
-  #:use-module (lang elisp internals fset)
-  #:use-module (lang elisp transform)
-  #:export (parse-formals
-           transform-lambda/interactive
-           interactive-spec))
-
-;;; Parses a list of elisp formals, e.g. (x y &optional b &rest r) and
-;;; returns three values: (i) list of symbols for required arguments,
-;;; (ii) list of symbols for optional arguments, (iii) rest symbol, or
-;;; #f if there is no rest argument.
-(define (parse-formals formals)
-  (letrec ((do-required
-           (lambda (required formals)
-             (if (null? formals)
-                 (values (reverse required) '() #f)
-                 (let ((next-sym (car formals)))
-                   (cond ((not (symbol? next-sym))
-                          (error "Bad formals (non-symbol in required list)"))
-                         ((eq? next-sym '&optional)
-                          (do-optional required '() (cdr formals)))
-                         ((eq? next-sym '&rest)
-                          (do-rest required '() (cdr formals)))
-                         (else
-                          (do-required (cons next-sym required)
-                                       (cdr formals))))))))
-          (do-optional
-           (lambda (required optional formals)
-             (if (null? formals)
-                 (values (reverse required) (reverse optional) #f)
-                 (let ((next-sym (car formals)))
-                   (cond ((not (symbol? next-sym))
-                          (error "Bad formals (non-symbol in optional list)"))
-                         ((eq? next-sym '&rest)
-                          (do-rest required optional (cdr formals)))
-                         (else
-                          (do-optional required
-                                       (cons next-sym optional)
-                                       (cdr formals))))))))
-          (do-rest
-           (lambda (required optional formals)
-             (if (= (length formals) 1)
-                 (let ((next-sym (car formals)))
-                   (if (symbol? next-sym)
-                       (values (reverse required) (reverse optional) next-sym)
-                       (error "Bad formals (non-symbol rest formal)")))
-                 (error "Bad formals (more than one rest formal)")))))
-
-    (do-required '() (cond ((list? formals)
-                           formals)
-                          ((symbol? formals)
-                           (list '&rest formals))
-                          (else
-                           (error "Bad formals (not a list or a single 
symbol)"))))))
-
-(define (transform-lambda exp)
-  (call-with-values (lambda () (parse-formals (cadr exp)))
-    (lambda (required optional rest)
-      (let ((num-required (length required))
-           (num-optional (length optional)))
-       `(,lambda %--args
-          (,let ((%--num-args (,length %--args)))
-            (,cond ((,< %--num-args ,num-required)
-                    (,error "Wrong number of args (not enough required args)"))
-                   ,@(if rest
-                         '()
-                         `(((,> %--num-args ,(+ num-required num-optional))
-                            (,error "Wrong number of args (too many args)"))))
-                   (else
-                    (, @bind ,(append (map (lambda (i)
-                                             (list (list-ref required i)
-                                                   `(,list-ref %--args ,i)))
-                                           (iota num-required))
-                                      (map (lambda (i)
-                                             (let ((i+nr (+ i num-required)))
-                                               (list (list-ref optional i)
-                                                     `(,if (,> %--num-args 
,i+nr)
-                                                           (,list-ref %--args 
,i+nr)
-                                                           ,%nil))))
-                                           (iota num-optional))
-                                      (if rest
-                                          (list (list rest
-                                                      `(,if (,> %--num-args
-                                                                ,(+ 
num-required
-                                                                    
num-optional))
-                                                            (,list-tail %--args
-                                                                        ,(+ 
num-required
-                                                                            
num-optional))
-                                                            ,%nil)))
-                                          '()))
-                             ,@(map transformer (cddr exp)))))))))))
-
-(define (set-not-subr! proc boolean)
-  (set! (not-subr? proc) boolean))
-
-(define (transform-lambda/interactive exp name)
-  (fluid-set! interactive-spec #f)
-  (let* ((x (transform-lambda exp))
-        (is (fluid-ref interactive-spec)))
-    `(,let ((%--lambda ,x))
-       (,set-procedure-property! %--lambda (,quote name) (,quote ,name))
-       (,set-not-subr! %--lambda #t)
-       ,@(if is
-            `((,set! (,interactive-specification %--lambda) (,quote ,is)))
-            '())
-       %--lambda)))
-
-(define interactive-spec (make-fluid))
diff --git a/lang/elisp/internals/load.scm b/lang/elisp/internals/load.scm
deleted file mode 100644
index 2b6cac3..0000000
--- a/lang/elisp/internals/load.scm
+++ /dev/null
@@ -1,44 +0,0 @@
-(define-module (lang elisp internals load)
-  #:use-module (ice-9 optargs)
-  #:use-module (lang elisp internals signal)
-  #:use-module (lang elisp internals format)
-  #:use-module (lang elisp internals evaluation)
-  #:replace (load)
-  #:export (load-path))
-
-(define load-path '("/usr/share/emacs/20.7/lisp/"
-                   "/usr/share/emacs/20.7/lisp/emacs-lisp/"))
-
-(define* (load file #:optional noerror nomessage nosuffix must-suffix)
-  (define (load1 filename)
-    (let ((pathname (let loop ((dirs (if (char=? (string-ref filename 0) #\/)
-                                        '("")
-                                        load-path)))
-                     (cond ((null? dirs) #f)
-                           ((file-exists? (in-vicinity (car dirs) filename))
-                            (in-vicinity (car dirs) filename))
-                           (else (loop (cdr dirs)))))))
-      (if pathname
-         (begin
-           (or nomessage
-               (message "Loading %s..." pathname))
-           (with-input-from-file pathname
-             (lambda ()
-               (let loop ((form (read)))
-                 (or (eof-object? form)
-                     (begin
-                       ;; Note that `eval' already incorporates use
-                       ;; of the specified module's transformer.
-                       (eval form the-elisp-module)
-                       (loop (read)))))))
-           (or nomessage
-               (message "Loading %s...done" pathname))
-           #t)
-         #f)))
-  (or (and (not nosuffix)
-          (load1 (string-append file ".el")))
-      (and (not must-suffix)
-          (load1 file))
-      noerror
-      (signal 'file-error
-             (list "Cannot open load file" file))))
diff --git a/lang/elisp/internals/null.scm b/lang/elisp/internals/null.scm
deleted file mode 100644
index 94e2b28..0000000
--- a/lang/elisp/internals/null.scm
+++ /dev/null
@@ -1,13 +0,0 @@
-(define-module (lang elisp internals null)
-  #:export (->nil lambda->nil null))
-
-(define (->nil x)
-  (or x %nil))
-
-(define (lambda->nil proc)
-  (lambda args
-    (->nil (apply proc args))))
-
-(define (null obj)
-  (->nil (or (not obj)
-            (null? obj))))
diff --git a/lang/elisp/internals/set.scm b/lang/elisp/internals/set.scm
deleted file mode 100644
index 5e5b004..0000000
--- a/lang/elisp/internals/set.scm
+++ /dev/null
@@ -1,20 +0,0 @@
-(define-module (lang elisp internals set)
-  #:use-module (lang elisp internals evaluation)
-  #:use-module (lang elisp internals signal)
-  #:export (set value))
-
-;; Set SYM's variable value to VAL, and return VAL.
-(define (set sym val)
-  (if (module-defined? the-elisp-module sym)
-      (module-set! the-elisp-module sym val)
-      (module-define! the-elisp-module sym val))
-  val)
-
-;; Return SYM's variable value.  If it has none, signal an error if
-;; MUST-EXIST is true, just return #nil otherwise.
-(define (value sym must-exist)
-  (if (module-defined? the-elisp-module sym)
-      (module-ref the-elisp-module sym)
-      (if must-exist
-         (error "Symbol's value as variable is void:" sym)
-         %nil)))
diff --git a/lang/elisp/internals/signal.scm b/lang/elisp/internals/signal.scm
deleted file mode 100644
index 7055a9b..0000000
--- a/lang/elisp/internals/signal.scm
+++ /dev/null
@@ -1,18 +0,0 @@
-(define-module (lang elisp internals signal)
-  #:use-module (lang elisp internals format)
-  #:replace (error)
-  #:export (signal
-           wta))
-
-(define (signal error-symbol data)
-  (scm-error 'elisp-signal
-            #f
-            "Signalling ~A with data ~S"
-            (list error-symbol data)
-            #f))
-
-(define (error . args)
-  (signal 'error (list (apply format args))))
-
-(define (wta expected actual pos)
-  (signal 'wrong-type-argument (list expected actual)))
diff --git a/lang/elisp/internals/time.scm b/lang/elisp/internals/time.scm
deleted file mode 100644
index 10ac02d..0000000
--- a/lang/elisp/internals/time.scm
+++ /dev/null
@@ -1,14 +0,0 @@
-(define-module (lang elisp internals time)
-  #:use-module (ice-9 optargs)
-  #:export (format-time-string))
-
-(define* (format-time-string format-string #:optional time universal)
-  (strftime format-string
-           ((if universal gmtime localtime)
-            (if time
-                (+ (ash (car time) 16)
-                   (let ((time-cdr (cdr time)))
-                     (if (pair? time-cdr)
-                         (car time-cdr)
-                         time-cdr)))
-                (current-time)))))
diff --git a/lang/elisp/internals/trace.scm b/lang/elisp/internals/trace.scm
deleted file mode 100644
index 0dd92ec..0000000
--- a/lang/elisp/internals/trace.scm
+++ /dev/null
@@ -1,28 +0,0 @@
-(define-module (lang elisp internals trace)
-  #:export (trc trc-syms trc-all trc-none))
-
-(define *syms* #f)
-
-(define (trc-syms . syms)
-  (set! *syms* syms))
-
-(define (trc-all)
-  (set! *syms* #f))
-
-(define (trc-none)
-  (set! *syms* '()))
-
-(define (trc . args)
-  (let ((sym (car args))
-       (args (cdr args)))
-    (if (or (and *syms*
-                (memq sym *syms*))
-           (not *syms*))
-       (begin
-         (write sym)
-         (display ": ")
-         (write args)
-         (newline)))))
-
-;; Default to no tracing.
-(trc-none)
diff --git a/lang/elisp/primitives/buffers.scm 
b/lang/elisp/primitives/buffers.scm
deleted file mode 100644
index 756d4be..0000000
--- a/lang/elisp/primitives/buffers.scm
+++ /dev/null
@@ -1,16 +0,0 @@
-(define-module (lang elisp primitives buffers)
-  #:use-module (ice-9 optargs)
-  #:use-module (lang elisp internals fset))
-
-(fset 'buffer-disable-undo
-      (lambda* (#:optional buffer)
-       'unimplemented))
-
-(fset 're-search-forward
-      (lambda* (regexp #:optional bound noerror count)
-       'unimplemented))
-
-(fset 're-search-backward
-      (lambda* (regexp #:optional bound noerror count)
-       'unimplemented))
-
diff --git a/lang/elisp/primitives/char-table.scm 
b/lang/elisp/primitives/char-table.scm
deleted file mode 100644
index 3812e44..0000000
--- a/lang/elisp/primitives/char-table.scm
+++ /dev/null
@@ -1,24 +0,0 @@
-(define-module (lang elisp primitives char-table)
-  #:use-module (lang elisp internals fset)
-  #:use-module (lang elisp internals null)
-  #:use-module (ice-9 optargs))
-
-(fset 'make-char-table
-      (lambda* (purpose #:optional init)
-       "Return a newly created char-table, with purpose PURPOSE.
-Each element is initialized to INIT, which defaults to nil.
-PURPOSE should be a symbol which has a `char-table-extra-slots' property.
-The property's value should be an integer between 0 and 10."
-       (list purpose (vector init))))
-
-(fset 'define-charset
-      (lambda (charset-id charset-symbol info-vector)
-       (list 'charset charset-id charset-symbol info-vector)))
-
-(fset 'setup-special-charsets
-      (lambda ()
-       'unimplemented))
-
-(fset 'make-char-internal
-      (lambda ()
-       'unimplemented))
diff --git a/lang/elisp/primitives/features.scm 
b/lang/elisp/primitives/features.scm
deleted file mode 100644
index 8cd1a99..0000000
--- a/lang/elisp/primitives/features.scm
+++ /dev/null
@@ -1,26 +0,0 @@
-(define-module (lang elisp primitives features)
-  #:use-module (lang elisp internals fset)
-  #:use-module (lang elisp internals load)
-  #:use-module (lang elisp internals null)
-  #:use-module (ice-9 optargs))
-
-(define-public features '())
-
-(fset 'provide
-      (lambda (feature)
-       (or (memq feature features)
-           (set! features (cons feature features)))))
-
-(fset 'featurep
-      (lambda (feature)
-       (->nil (memq feature features))))
-
-(fset 'require
-      (lambda* (feature #:optional file-name noerror)
-       (or (memq feature features)
-           (load (or file-name
-                     (symbol->string feature))
-                 noerror
-                 #f
-                 #f
-                 #t))))
diff --git a/lang/elisp/primitives/fns.scm b/lang/elisp/primitives/fns.scm
deleted file mode 100644
index 7beb8a5..0000000
--- a/lang/elisp/primitives/fns.scm
+++ /dev/null
@@ -1,46 +0,0 @@
-(define-module (lang elisp primitives fns)
-  #:use-module (lang elisp internals set)
-  #:use-module (lang elisp internals fset)
-  #:use-module (lang elisp internals null))
-
-(fset 'fset fset)
-(fset 'defalias fset)
-
-(fset 'apply elisp-apply)
-
-(fset 'funcall
-      (lambda (function . args)
-       (elisp-apply function args)))
-
-(fset 'interactive-p
-      (lambda ()
-       %nil))
-
-(fset 'commandp
-      (lambda (sym)
-       (if (interactive-specification (fref sym)) #t %nil)))
-
-(fset 'fboundp
-      (lambda (sym)
-       (->nil (variable? (symbol-fref sym)))))
-
-(fset 'symbol-function fref/error-if-void)
-
-;; FIXME -- lost in the syncase conversion
-;; (fset 'macroexpand macroexpand)
-
-(fset 'subrp
-      (lambda (obj)
-       (->nil (not (not-subr? obj)))))
-
-(fset 'byte-code-function-p
-      (lambda (object)
-       %nil))
-
-(fset 'run-hooks
-      (lambda hooks
-       (for-each (lambda (hooksym)
-                   (for-each (lambda (fn)
-                               (elisp-apply fn '()))
-                             (value hooksym #f)))
-                 hooks)))
diff --git a/lang/elisp/primitives/format.scm b/lang/elisp/primitives/format.scm
deleted file mode 100644
index a7c6378..0000000
--- a/lang/elisp/primitives/format.scm
+++ /dev/null
@@ -1,6 +0,0 @@
-(define-module (lang elisp primitives format)
-  #:use-module (lang elisp internals format)
-  #:use-module (lang elisp internals fset))
-
-(fset 'format format)
-(fset 'message message)
diff --git a/lang/elisp/primitives/guile.scm b/lang/elisp/primitives/guile.scm
deleted file mode 100644
index 059f2bb..0000000
--- a/lang/elisp/primitives/guile.scm
+++ /dev/null
@@ -1,20 +0,0 @@
-(define-module (lang elisp primitives guile)
-  #:use-module (lang elisp internals fset))
-
-;;; {Importing Guile procedures into Elisp}
-
-;; It may be worthwhile to import some Guile procedures into the Elisp
-;; environment.  For now, though, we don't do this.
-
-(if #f
-    (let ((accessible-procedures
-          (apropos-fold (lambda (module name var data)
-                          (cons (cons name var) data))
-                        '()
-                        ""
-                        (apropos-fold-accessible (current-module)))))
-      (for-each (lambda (name var)
-                 (if (procedure? var)
-                     (fset name var)))
-               (map car accessible-procedures)
-               (map cdr accessible-procedures))))
diff --git a/lang/elisp/primitives/keymaps.scm 
b/lang/elisp/primitives/keymaps.scm
deleted file mode 100644
index 730d89f..0000000
--- a/lang/elisp/primitives/keymaps.scm
+++ /dev/null
@@ -1,26 +0,0 @@
-(define-module (lang elisp primitives keymaps)
-  #:use-module (lang elisp internals fset))
-
-(define (make-sparse-keymap)
-  (list 'keymap))
-
-(define (define-key keymap key def)
-  (set-cdr! keymap
-           (cons (cons key def) (cdr keymap))))
-  
-(define global-map (make-sparse-keymap))
-(define esc-map (make-sparse-keymap))
-(define ctl-x-map (make-sparse-keymap))
-(define ctl-x-4-map (make-sparse-keymap))
-(define ctl-x-5-map (make-sparse-keymap))
-
-;;; {Elisp Exports}
-
-(fset 'make-sparse-keymap make-sparse-keymap)
-(fset 'define-key define-key)
-
-(export global-map
-       esc-map
-       ctl-x-map
-       ctl-x-4-map
-       ctl-x-5-map)
diff --git a/lang/elisp/primitives/lists.scm b/lang/elisp/primitives/lists.scm
deleted file mode 100644
index 4907ed5..0000000
--- a/lang/elisp/primitives/lists.scm
+++ /dev/null
@@ -1,103 +0,0 @@
-(define-module (lang elisp primitives lists)
-  #:use-module (lang elisp internals fset)
-  #:use-module (lang elisp internals null)
-  #:use-module (lang elisp internals signal))
-
-(fset 'cons cons)
-
-(fset 'null null)
-
-(fset 'not null)
-
-(fset 'car
-      (lambda (l)
-       (if (null l)
-           %nil
-           (car l))))
-
-(fset 'cdr
-      (lambda (l)
-       (if (null l)
-           %nil
-           (cdr l))))
-
-(fset 'eq
-      (lambda (x y)
-       (or (eq? x y)
-           (and (null x) (null y)))))
-
-(fset 'equal
-      (lambda (x y)
-       (or (equal? x y)
-           (and (null x) (null y)))))
-
-(fset 'setcar set-car!)
-
-(fset 'setcdr set-cdr!)
-
-(for-each (lambda (sym proc)
-           (fset sym
-                 (lambda (elt list)
-                   (if (null list)
-                       %nil
-                       (if (null elt)
-                           (let loop ((l list))
-                             (cond ((null l) %nil)
-                                   ((null (car l)) l)
-                                   (else (loop (cdr l)))))
-                           (proc elt list))))))
-         '( memq  member  assq  assoc)
-         `(,memq ,member ,assq ,assoc))
-
-(fset 'length
-      (lambda (x)
-       (cond ((null x) 0)
-             ((pair? x) (length x))
-             ((vector? x) (vector-length x))
-             ((string? x) (string-length x))
-             (else (wta 'sequencep x 1)))))
-
-(fset 'copy-sequence
-      (lambda (x)
-       (cond ((list? x) (list-copy x))
-             ((vector? x) (error "Vector copy not yet implemented"))
-             ((string? x) (string-copy x))
-             (else (wta 'sequencep x 1)))))
-
-(fset 'elt
-      (lambda (obj i)
-       (cond ((pair? obj) (list-ref obj i))
-             ((vector? obj) (vector-ref obj i))
-             ((string? obj) (char->integer (string-ref obj i))))))
-
-(fset 'list list)
-
-(fset 'mapcar
-      (lambda (function sequence)
-       (map (lambda (elt)
-              (elisp-apply function (list elt)))
-            (cond ((null sequence) '())
-                  ((list? sequence) sequence)
-                  ((vector? sequence) (vector->list sequence))
-                  ((string? sequence) (map char->integer (string->list 
sequence)))
-                  (else (wta 'sequencep sequence 2))))))
-
-(fset 'nth
-      (lambda (n list)
-       (if (or (null list)
-               (>= n (length list)))
-           %nil
-           (list-ref list n))))
-
-(fset 'listp
-      (lambda (object)
-       (or (null object)
-           (list? object))))
-
-(fset 'consp pair?)
-
-(fset 'nconc
-      (lambda args
-       (apply append! (map (lambda (arg)
-                             (if arg arg '()))
-                           args))))
diff --git a/lang/elisp/primitives/load.scm b/lang/elisp/primitives/load.scm
deleted file mode 100644
index a627b5d..0000000
--- a/lang/elisp/primitives/load.scm
+++ /dev/null
@@ -1,17 +0,0 @@
-(define-module (lang elisp primitives load)
-  #:use-module (lang elisp internals load)
-  #:use-module (lang elisp internals evaluation)
-  #:use-module (lang elisp internals fset))
-
-(fset 'load load)
-(re-export load-path)
-
-(fset 'eval
-      (lambda (form)
-       (eval form the-elisp-module)))
-
-(fset 'autoload
-      (lambda args
-       #t))
-
-(define-public current-load-list %nil)
diff --git a/lang/elisp/primitives/match.scm b/lang/elisp/primitives/match.scm
deleted file mode 100644
index 0a04ef5..0000000
--- a/lang/elisp/primitives/match.scm
+++ /dev/null
@@ -1,68 +0,0 @@
-(define-module (lang elisp primitives match)
-  #:use-module (lang elisp internals fset)
-  #:use-module (ice-9 regex)
-  #:use-module (ice-9 optargs))
-
-(define last-match #f)
-
-(fset 'string-match
-      (lambda (regexp string . start)
-
-       (define emacs-string-match
-
-         (if (defined? 'make-emacs-regexp)
-
-             ;; This is what we would do if we had an
-             ;; Emacs-compatible regexp primitive, here called
-             ;; `make-emacs-regexp'.
-             (lambda (pattern str . args)
-               (let ((rx (make-emacs-regexp pattern))
-                     (start (if (pair? args) (car args) 0)))
-                 (regexp-exec rx str start)))
-
-             ;; But we don't have Emacs-compatible regexps, and I
-             ;; don't think it's worthwhile at this stage to write
-             ;; generic regexp conversion code.  So work around the
-             ;; discrepancies between Guile/libc and Emacs regexps by
-             ;; substituting the regexps that actually occur in the
-             ;; elisp code that we want to read.
-             (lambda (pattern str . args)
-               (let loop ((discrepancies '(("^[0-9]+\\.\\([0-9]+\\)" .
-                                            "^[0-9]+\\.([0-9]+)"))))
-                 (or (null? discrepancies)
-                     (if (string=? pattern (caar discrepancies))
-                         (set! pattern (cdar discrepancies))
-                         (loop (cdr discrepancies)))))
-               (apply string-match pattern str args))))
-
-       (let ((match (apply emacs-string-match regexp string start)))
-         (set! last-match
-               (if match
-                   (apply append!
-                          (map (lambda (n)
-                                 (list (match:start match n)
-                                       (match:end match n)))
-                               (iota (match:count match))))
-                   #f)))
-
-       (if last-match (car last-match) %nil)))
-
-(fset 'match-beginning
-      (lambda (subexp)
-       (list-ref last-match (* 2 subexp))))
-
-(fset 'match-end
-      (lambda (subexp)
-       (list-ref last-match (+ (* 2 subexp) 1))))
-
-(fset 'substring substring)
-
-(fset 'match-data
-      (lambda* (#:optional integers reuse)
-       last-match))
-
-(fset 'set-match-data
-      (lambda (list)
-       (set! last-match list)))
-
-(fset 'store-match-data 'set-match-data)
diff --git a/lang/elisp/primitives/numbers.scm 
b/lang/elisp/primitives/numbers.scm
deleted file mode 100644
index 43246d3..0000000
--- a/lang/elisp/primitives/numbers.scm
+++ /dev/null
@@ -1,43 +0,0 @@
-(define-module (lang elisp primitives numbers)
-  #:use-module (lang elisp internals fset)
-  #:use-module (lang elisp internals null))
-
-(fset 'logior logior)
-(fset 'logand logand)
-(fset 'integerp (lambda->nil integer?))
-(fset '= =)
-(fset '< <)
-(fset '> >)
-(fset '<= <=)
-(fset '>= >=)
-(fset '* *)
-(fset '+ +)
-(fset '- -)
-(fset '1- 1-)
-(fset 'ash ash)
-
-(fset 'lsh
-      (let ()
-       (define (lsh num shift)
-         (cond ((= shift 0)
-                num)
-               ((< shift 0)
-                ;; Logical shift to the right.  Do an arithmetic
-                ;; shift and then mask out the sign bit.
-                (lsh (logand (ash num -1) most-positive-fixnum)
-                     (+ shift 1)))
-               (else
-                ;; Logical shift to the left.  Guile's ash will
-                ;; always preserve the sign of the result, which is
-                ;; not what we want for lsh, so we need to work
-                ;; around this.
-                (let ((new-sign-bit (ash (logand num
-                                                 (logxor most-positive-fixnum
-                                                         (ash 
most-positive-fixnum -1)))
-                                         1)))
-                  (lsh (logxor new-sign-bit
-                               (ash (logand num most-positive-fixnum) 1))
-                       (- shift 1))))))
-       lsh))
-
-(fset 'numberp (lambda->nil number?))
diff --git a/lang/elisp/primitives/pure.scm b/lang/elisp/primitives/pure.scm
deleted file mode 100644
index 7cb6b53..0000000
--- a/lang/elisp/primitives/pure.scm
+++ /dev/null
@@ -1,8 +0,0 @@
-(define-module (lang elisp primitives pure)
-  #:use-module (lang elisp internals fset))
-
-;; Purification, unexec etc. are not yet implemented...
-
-(fset 'purecopy identity)
-
-(define-public purify-flag %nil)
diff --git a/lang/elisp/primitives/read.scm b/lang/elisp/primitives/read.scm
deleted file mode 100644
index aeacd2c..0000000
--- a/lang/elisp/primitives/read.scm
+++ /dev/null
@@ -1,10 +0,0 @@
-(define-module (lang elisp primitives read)
-  #:use-module (lang elisp internals fset))
-
-;;; MEGA HACK!!!!
-
-(fset 'read (lambda (str)
-             (cond ((string=? str "?\\M-\\^@")
-                    -134217728)
-                   (else
-                    (with-input-from-string str read)))))
diff --git a/lang/elisp/primitives/signal.scm b/lang/elisp/primitives/signal.scm
deleted file mode 100644
index 33168c3..0000000
--- a/lang/elisp/primitives/signal.scm
+++ /dev/null
@@ -1,6 +0,0 @@
-(define-module (lang elisp primitives signal)
-  #:use-module (lang elisp internals signal)
-  #:use-module (lang elisp internals fset))
-
-(fset 'signal signal)
-(fset 'error error)
diff --git a/lang/elisp/primitives/strings.scm 
b/lang/elisp/primitives/strings.scm
deleted file mode 100644
index 85e462f..0000000
--- a/lang/elisp/primitives/strings.scm
+++ /dev/null
@@ -1,40 +0,0 @@
-(define-module (lang elisp primitives strings)
-  #:use-module (lang elisp internals fset)
-  #:use-module (lang elisp internals null)
-  #:use-module (lang elisp internals signal))
-
-(fset 'substring substring)
-
-(fset 'concat
-      (lambda args
-       (apply string-append
-              (map (lambda (arg)
-                     (cond
-                      ((string? arg) arg)
-                      ((list? arg) (list->string arg))
-                      ((vector? arg) (list->string (vector->list arg)))
-                      (else (error "Wrong type argument for concat"))))
-                   args))))
-
-(fset 'string-to-number string->number)
-
-(fset 'number-to-string number->string)
-
-(fset 'string-lessp (lambda->nil string<?))
-(fset 'string< 'string-lessp)
-
-(fset 'aref
-      (lambda (array idx)
-       (cond ((vector? array) (vector-ref array idx))
-             ((string? array) (char->integer (string-ref array idx)))
-             (else (wta 'arrayp array 1)))))
-
-(fset 'aset
-      (lambda (array idx newelt)
-       (cond ((vector? array) (vector-set! array idx newelt))
-             ((string? array) (string-set! array idx (integer->char newelt)))
-             (else (wta 'arrayp array 1)))))
-
-(fset 'stringp (lambda->nil string?))
-
-(fset 'vector vector)
diff --git a/lang/elisp/primitives/symprop.scm 
b/lang/elisp/primitives/symprop.scm
deleted file mode 100644
index 8f10fd8..0000000
--- a/lang/elisp/primitives/symprop.scm
+++ /dev/null
@@ -1,40 +0,0 @@
-(define-module (lang elisp primitives symprop)
-  #:use-module (lang elisp internals evaluation)
-  #:use-module (lang elisp internals fset)
-  #:use-module (lang elisp internals null)
-  #:use-module (lang elisp internals set)
-  #:use-module (ice-9 optargs))
-
-;;; {Elisp Exports}
-
-(fset 'put set-symbol-property!)
-
-(fset 'get (lambda->nil symbol-property))
-
-(fset 'set set)
-
-(fset 'set-default 'set)
-
-(fset 'boundp
-      (lambda (sym)
-       (->nil (module-defined? the-elisp-module sym))))
-
-(fset 'default-boundp 'boundp)
-
-(fset 'symbol-value
-      (lambda (sym)
-       (value sym #t)))
-
-(fset 'default-value 'symbol-value)
-
-(fset 'symbolp
-      (lambda (object)
-       (or (symbol? object)
-           (keyword? object)
-           %nil)))
-
-(fset 'local-variable-if-set-p
-      (lambda* (variable #:optional buffer)
-       %nil))
-
-(fset 'symbol-name symbol->string)
diff --git a/lang/elisp/primitives/syntax.scm b/lang/elisp/primitives/syntax.scm
deleted file mode 100644
index 118b3bc..0000000
--- a/lang/elisp/primitives/syntax.scm
+++ /dev/null
@@ -1,267 +0,0 @@
-(define-module (lang elisp primitives syntax)
-  #:use-syntax (lang elisp expand)
-  #:use-module (lang elisp internals evaluation)
-  #:use-module (lang elisp internals fset)
-  #:use-module (lang elisp internals lambda)
-  #:use-module (lang elisp internals set)
-  #:use-module (lang elisp internals trace)
-  #:use-module (lang elisp transform))
-
-;;; Define Emacs Lisp special forms as macros.  This is more flexible
-;;; than handling them specially in the translator: allows them to be
-;;; redefined, and hopefully allows better source location tracking.
-
-;;; {Variables}
-
-(define (setq exp env)
-  (cons begin
-       (let loop ((sets (cdr exp)))
-         (if (null? sets)
-             '()
-             (cons `(,set (,quote ,(car sets)) ,(transformer (cadr sets)))
-                   (loop (cddr sets)))))))
-
-(fset 'setq
-      (procedure->memoizing-macro setq))
-
-(fset 'defvar
-      (procedure->memoizing-macro
-        (lambda (exp env)
-         (trc 'defvar (cadr exp))
-         (if (null? (cddr exp))
-             `(,quote ,(cadr exp))
-             `(,begin (,if (,not (,defined? (,quote ,(cadr exp))))
-                           ,(setq (list (car exp) (cadr exp) (caddr exp)) env))
-                      (,quote ,(cadr exp)))))))
-
-(fset 'defconst
-      (procedure->memoizing-macro
-        (lambda (exp env)
-         (trc 'defconst (cadr exp))
-         `(,begin ,(setq (list (car exp) (cadr exp) (caddr exp)) env)
-                  (,quote ,(cadr exp))))))
-
-;;; {lambda, function and macro definitions}
-
-(fset 'lambda
-      (procedure->memoizing-macro
-       (lambda (exp env)
-        (transform-lambda/interactive exp '<elisp-lambda>))))
-
-(fset 'defun
-      (procedure->memoizing-macro
-       (lambda (exp env)
-        (trc 'defun (cadr exp))
-        `(,begin (,fset (,quote ,(cadr exp))
-                        ,(transform-lambda/interactive (cdr exp)
-                                                       (symbol-append 
'<elisp-defun:
-                                                                      (cadr 
exp)
-                                                                      '>)))
-                 (,quote ,(cadr exp))))))
-
-(fset 'interactive
-      (procedure->memoizing-macro
-        (lambda (exp env)
-         (fluid-set! interactive-spec exp)
-         #f)))
-
-(fset 'defmacro
-      (procedure->memoizing-macro
-       (lambda (exp env)
-        (trc 'defmacro (cadr exp))
-        (call-with-values (lambda () (parse-formals (caddr exp)))
-          (lambda (required optional rest)
-            (let ((num-required (length required))
-                  (num-optional (length optional)))
-              `(,begin (,fset (,quote ,(cadr exp))
-                              (,procedure->memoizing-macro
-                               (,lambda (exp1 env1)
-                                 (,trc (,quote using) (,quote ,(cadr exp)))
-                                 (,let* ((%--args (,cdr exp1))
-                                         (%--num-args (,length %--args)))
-                                   (,cond ((,< %--num-args ,num-required)
-                                           (,error "Wrong number of args (not 
enough required args)"))
-                                          ,@(if rest
-                                                '()
-                                                `(((,> %--num-args ,(+ 
num-required num-optional))
-                                                   (,error "Wrong number of 
args (too many args)"))))
-                                          (else (,transformer
-                                                 (, @bind ,(append (map 
(lambda (i)
-                                                                          
(list (list-ref required i)
-                                                                               
 `(,list-ref %--args ,i)))
-                                                                        (iota 
num-required))
-                                                                   (map 
(lambda (i)
-                                                                          (let 
((i+nr (+ i num-required)))
-                                                                            
(list (list-ref optional i)
-                                                                               
   `(,if (,> %--num-args ,i+nr)
-                                                                               
         (,list-ref %--args ,i+nr)
-                                                                               
         ,%nil))))
-                                                                        (iota 
num-optional))
-                                                                   (if rest
-                                                                       (list 
(list rest
-                                                                               
    `(,if (,> %--num-args
-                                                                               
              ,(+ num-required
-                                                                               
                  num-optional))
-                                                                               
          (,list-tail %--args
-                                                                               
                      ,(+ num-required
-                                                                               
                          num-optional))
-                                                                               
          ,%nil)))
-                                                                       '()))
-                                                          ,@(map transformer 
(cdddr exp)))))))))))))))))
-
-;;; {Sequencing}
-
-(fset 'progn
-      (procedure->memoizing-macro
-        (lambda (exp env)
-         `(,begin ,@(map transformer (cdr exp))))))
-
-(fset 'prog1
-      (procedure->memoizing-macro
-        (lambda (exp env)
-         `(,let ((%--res1 ,(transformer (cadr exp))))
-            ,@(map transformer (cddr exp))
-            %--res1))))
-
-(fset 'prog2
-      (procedure->memoizing-macro
-        (lambda (exp env)
-         `(,begin ,(transformer (cadr exp))
-                  (,let ((%--res2 ,(transformer (caddr exp))))
-                    ,@(map transformer (cdddr exp))
-                    %--res2)))))
-
-;;; {Conditionals}
-
-(fset 'if
-      (procedure->memoizing-macro
-        (lambda (exp env)
-         (let ((else-case (cdddr exp)))
-           (cond ((null? else-case)
-                  `(,nil-cond ,(transformer (cadr exp)) ,(transformer (caddr 
exp)) ,%nil))
-                 ((null? (cdr else-case))
-                  `(,nil-cond ,(transformer (cadr exp))
-                              ,(transformer (caddr exp))
-                              ,(transformer (car else-case))))
-                 (else
-                  `(,nil-cond ,(transformer (cadr exp))
-                              ,(transformer (caddr exp))
-                              (,begin ,@(map transformer else-case)))))))))
-
-(fset 'and
-      (procedure->memoizing-macro
-        (lambda (exp env)
-         (cond ((null? (cdr exp)) #t)
-               ((null? (cddr exp)) (transformer (cadr exp)))
-               (else
-                (cons nil-cond
-                      (let loop ((args (cdr exp)))
-                        (if (null? (cdr args))
-                            (list (transformer (car args)))
-                            (cons (list not (transformer (car args)))
-                                  (cons %nil
-                                        (loop (cdr args))))))))))))
-
-;;; NIL-COND expressions have the form:
-;;;
-;;; (nil-cond COND VAL COND VAL ... ELSEVAL)
-;;;
-;;; The CONDs are evaluated in order until one of them returns true
-;;; (in the Elisp sense, so not including empty lists).  If a COND
-;;; returns true, its corresponding VAL is evaluated and returned,
-;;; except if that VAL is the unspecified value, in which case the
-;;; result of evaluating the COND is returned.  If none of the COND's
-;;; returns true, ELSEVAL is evaluated and its value returned.
-
-(define <-- *unspecified*)
-
-(fset 'or
-      (procedure->memoizing-macro
-        (lambda (exp env)
-         (cond ((null? (cdr exp)) %nil)
-               ((null? (cddr exp)) (transformer (cadr exp)))
-               (else
-                (cons nil-cond
-                      (let loop ((args (cdr exp)))
-                        (if (null? (cdr args))
-                            (list (transformer (car args)))
-                            (cons (transformer (car args))
-                                  (cons <--
-                                        (loop (cdr args))))))))))))
-
-(fset 'cond
-      (procedure->memoizing-macro
-       (lambda (exp env)
-        (if (null? (cdr exp))
-            %nil
-            (cons
-             nil-cond
-             (let loop ((clauses (cdr exp)))
-               (if (null? clauses)
-                   (list %nil)
-                   (let ((clause (car clauses)))
-                     (if (eq? (car clause) #t)
-                         (cond ((null? (cdr clause)) (list #t))
-                               ((null? (cddr clause))
-                                (list (transformer (cadr clause))))
-                               (else `((,begin ,@(map transformer (cdr 
clause))))))
-                         (cons (transformer (car clause))
-                               (cons (cond ((null? (cdr clause)) <--)
-                                           ((null? (cddr clause))
-                                            (transformer (cadr clause)))
-                                           (else
-                                            `(,begin ,@(map transformer (cdr 
clause)))))
-                                     (loop (cdr clauses)))))))))))))
-
-(fset 'while
-      (procedure->memoizing-macro
-        (lambda (exp env)
-         `((,letrec ((%--while (,lambda ()
-                                 (,nil-cond ,(transformer (cadr exp))
-                                            (,begin ,@(map transformer (cddr 
exp))
-                                                    (%--while))
-                                            ,%nil))))
-             %--while)))))
-
-;;; {Local binding}
-
-(fset 'let
-      (procedure->memoizing-macro
-        (lambda (exp env)
-         `(, @bind ,(map (lambda (binding)
-                           (trc 'let binding)
-                           (if (pair? binding)
-                               `(,(car binding) ,(transformer (cadr binding)))
-                               `(,binding ,%nil)))
-                         (cadr exp))
-                   ,@(map transformer (cddr exp))))))
-
-(fset 'let*
-      (procedure->memoizing-macro
-        (lambda (exp env)
-         (if (null? (cadr exp))
-             `(,begin ,@(map transformer (cddr exp)))
-             (car (let loop ((bindings (cadr exp)))
-                    (if (null? bindings)
-                        (map transformer (cddr exp))
-                        `((, @bind (,(let ((binding (car bindings)))
-                                       (if (pair? binding)
-                                           `(,(car binding) ,(transformer 
(cadr binding)))
-                                           `(,binding ,%nil))))
-                                   ,@(loop (cdr bindings)))))))))))
-
-;;; {Exception handling}
-
-(fset 'unwind-protect
-      (procedure->memoizing-macro
-        (lambda (exp env)
-         (trc 'unwind-protect (cadr exp))
-         `(,let ((%--throw-args #f))
-            (,catch #t
-              (,lambda ()
-                ,(transformer (cadr exp)))
-              (,lambda args
-                (,set! %--throw-args args)))
-            ,@(map transformer (cddr exp))
-            (,if %--throw-args
-                 (,apply ,throw %--throw-args))))))
diff --git a/lang/elisp/primitives/system.scm b/lang/elisp/primitives/system.scm
deleted file mode 100644
index 6c659cc..0000000
--- a/lang/elisp/primitives/system.scm
+++ /dev/null
@@ -1,14 +0,0 @@
-(define-module (lang elisp primitives system)
-  #:use-module (lang elisp internals fset))
-
-(fset 'system-name
-      (lambda ()
-       (vector-ref (uname) 1)))
-
-(define-public system-type
-  (let ((uname (vector-ref (uname) 0)))
-    (if (string=? uname "Linux")
-       "gnu/linux"
-       uname)))
-
-(define-public system-configuration "i386-suse-linux") ;FIXME
diff --git a/lang/elisp/primitives/time.scm b/lang/elisp/primitives/time.scm
deleted file mode 100644
index 4b2c70c..0000000
--- a/lang/elisp/primitives/time.scm
+++ /dev/null
@@ -1,17 +0,0 @@
-(define-module (lang elisp primitives time)
-  #:use-module (lang elisp internals time)
-  #:use-module (lang elisp internals fset)
-  #:use-module (ice-9 optargs))
-
-(fset 'current-time
-      (lambda ()
-       (let ((now (current-time)))
-         (list (ash now -16)
-               (logand now (- (ash 1 16) 1))
-               0))))
-
-(fset 'format-time-string format-time-string)
-
-(fset 'current-time-string
-      (lambda* (#:optional specified-time)
-       (format-time-string "%a %b %e %T %Y" specified-time)))
diff --git a/lang/elisp/transform.scm b/lang/elisp/transform.scm
deleted file mode 100644
index 09159c0..0000000
--- a/lang/elisp/transform.scm
+++ /dev/null
@@ -1,116 +0,0 @@
-(define-module (lang elisp transform)
-  #:use-syntax (lang elisp expand)
-  #:use-module (lang elisp internals trace)
-  #:use-module (lang elisp internals fset)
-  #:use-module (lang elisp internals evaluation)
-  #:use-module (ice-9 session)
-  #:export (transformer transform))
-
-;;; A note on the difference between `(transform-* (cdr x))' and `(map
-;;; transform-* (cdr x))'.
-;;;
-;;; In most cases, none, as most of the transform-* functions are
-;;; recursive.
-;;;
-;;; However, if (cdr x) is not a proper list, the `map' version will
-;;; signal an error immediately, whereas the non-`map' version will
-;;; produce a similarly improper list as its transformed output.  In
-;;; some cases, improper lists are allowed, so at least these cases
-;;; require non-`map'.
-;;;
-;;; Therefore we use the non-`map' approach in most cases below, but
-;;; `map' in transform-application, since in the application case we
-;;; know that `(func arg . args)' is an error.  It would probably be
-;;; better for the transform-application case to check for an improper
-;;; list explicitly and signal a more explicit error.
-
-(define (syntax-error x)
-  (error "Syntax error in expression" x))
-
-(define scheme
-  (procedure->memoizing-macro
-   (lambda (exp env)
-     (let ((exp (cadr exp))
-           (module (cddr exp)))
-       (let ((m (if (null? module)
-                    the-root-module
-                    (save-module-excursion
-                     (lambda ()
-                       ;; In order for `resolve-module' to work as
-                       ;; expected, the current module must contain the
-                       ;; `app' variable.  This is not true for #:pure
-                       ;; modules, specifically (lang elisp base).  So,
-                       ;; switch to the root module (guile) before calling
-                       ;; resolve-module.
-                       (set-current-module the-root-module)
-                       (resolve-module (car module)))))))
-         (let ((x `(,eval (,quote ,exp) ,m)))
-           ;;(write x)
-           ;;(newline)
-           x))))))
-
-(define (transformer x)
-  (cond ((pair? x)
-        (cond ((symbol? (car x))
-               (case (car x)
-                 ;; Allow module-related forms through intact.
-                 ((define-module use-modules use-syntax)
-                  x)
-                 ;; Escape to Scheme.
-                 ((scheme)
-                  (cons-source x scheme (cdr x)))
-                 ;; Quoting.
-                 ((quote function)
-                  (cons-source x quote (transform-quote (cdr x))))
-                 ((quasiquote)
-                  (cons-source x quasiquote (transform-quasiquote (cdr x))))
-                 ;; Anything else is a function or macro application.
-                 (else (transform-application x))))
-              ((and (pair? (car x))
-                    (eq? (caar x) 'quasiquote))
-               (transformer (car x)))
-              (else (syntax-error x))))
-       (else
-        (transform-datum x))))
-
-(define (transform-datum x)
-  (cond ((eq? x 'nil) %nil)
-       ((eq? x 't) #t)
-       ;; Could add other translations here, notably `?A' -> 65 etc.
-       (else x)))
-
-(define (transform-quote x)
-  (trc 'transform-quote x)
-  (cond ((not (pair? x))
-        (transform-datum x))
-       (else
-        (cons-source x
-                     (transform-quote (car x))
-                     (transform-quote (cdr x))))))
-
-(define (transform-quasiquote x)
-  (trc 'transform-quasiquote x)
-  (cond ((not (pair? x))
-        (transform-datum x))
-       ((symbol? (car x))
-        (case (car x)
-          ((unquote) (list 'unquote (transformer (cadr x))))
-          ((unquote-splicing) (list 'unquote-splicing (transformer (cadr x))))
-          (else (cons-source x
-                             (transform-datum (car x))
-                             (transform-quasiquote (cdr x))))))
-       (else
-        (cons-source x
-                     (transform-quasiquote (car x))
-                     (transform-quasiquote (cdr x))))))
-
-(define (transform-application x)
-  (cons-source x @fop `(,(car x) (,transformer-macro ,@(map transform-quote 
(cdr x))))))
-
-(define transformer-macro
-  (procedure->memoizing-macro
-   (let ((cdr cdr))
-     (lambda (exp env)
-       (cons-source exp list (map transformer (cdr exp)))))))
-
-(define transform transformer)
diff --git a/lang/elisp/variables.scm b/lang/elisp/variables.scm
deleted file mode 100644
index 3624373..0000000
--- a/lang/elisp/variables.scm
+++ /dev/null
@@ -1,42 +0,0 @@
-(define-module (lang elisp variables))
-
-;;; The only purpose of this module is to provide a place where the
-;;; variables holding Elisp function definitions can be bound to
-;;; symbols.
-;;;
-;;; This can be useful when looking at unmemoized procedure source
-;;; code for Elisp functions and macros.  Elisp function and macro
-;;; symbols get memoized into variables.  When the unmemoizer tries to
-;;; unmemoize a variables, it does so by looking for a symbol that is
-;;; bound to that variable, starting from the module in which the
-;;; function or macro was defined and then trying the interfaces on
-;;; that module's uses list.  If it can't find any such symbol, it
-;;; returns the symbol '???.
-;;;
-;;; Normally we don't want to bind Elisp function definition variables
-;;; to symbols that are visible from the Elisp evaluation module (lang
-;;; elisp base), because they would pollute the namespace available
-;;; to Elisp variables.  On the other hand, if we are trying to debug
-;;; something, and looking at unmemoized source code, it's far more
-;;; informative if that code has symbols that indicate the Elisp
-;;; function being called than if it just says ??? everywhere.
-;;;
-;;; So we have a compromise, which achieves a reasonable balance of
-;;; correctness (for general operation) and convenience (for
-;;; debugging).
-;;;
-;;; 1. We bind Elisp function definition variables to symbols in this
-;;; module (lang elisp variables).
-;;;
-;;; 2. By default, the Elisp evaluation module (lang elisp base) does
-;;; not use (lang elisp variables), so the Elisp variable namespace
-;;; stays clean.
-;;;
-;;; 3. When debugging, a simple (named-module-use! '(lang elisp base)
-;;; '(lang elisp variables)) makes the function definition symbols
-;;; visible in (lang elisp base) so that the unmemoizer can find
-;;; them, which makes the unmemoized source code much easier to read.
-;;;
-;;; 4. To reduce the effects of namespace pollution even after step 3,
-;;; the symbols that we bind are all prefixed with `<elisp' and
-;;; suffixed with `>'.
diff --git a/libguile.h b/libguile.h
index 3b2f695..7a8b633 100644
--- a/libguile.h
+++ b/libguile.h
@@ -80,6 +80,7 @@ extern "C" {
 #include "libguile/posix.h"
 #include "libguile/print.h"
 #include "libguile/procprop.h"
+#include "libguile/promises.h"
 #include "libguile/properties.h"
 #include "libguile/procs.h"
 #include "libguile/r6rs-ports.h"
@@ -105,6 +106,7 @@ extern "C" {
 #include "libguile/symbols.h"
 #include "libguile/tags.h"
 #include "libguile/throw.h"
+#include "libguile/trees.h"
 #include "libguile/uniform.h"
 #include "libguile/validate.h"
 #include "libguile/values.h"
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index cab55da..c453c84 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -154,6 +154,7 @@ libguile_la_SOURCES =                               \
        load.c                                  \
        macros.c                                \
        mallocs.c                               \
+       memoize.c                               \
        modules.c                               \
        null-threads.c                          \
        numbers.c                               \
@@ -166,6 +167,7 @@ libguile_la_SOURCES =                               \
        procprop.c                              \
        procs.c                                 \
        programs.c                              \
+       promises.c                              \
        properties.c                            \
        r6rs-ports.c                            \
        random.c                                \
@@ -192,6 +194,7 @@ libguile_la_SOURCES =                               \
        symbols.c                               \
        threads.c                               \
        throw.c                                 \
+       trees.c                                 \
        uniform.c                               \
        values.c                                \
        variable.c                              \
@@ -248,6 +251,7 @@ DOT_X_FILES =                                       \
        load.x                                  \
        macros.x                                \
        mallocs.x                               \
+       memoize.x                               \
        modules.x                               \
        numbers.x                               \
        objprop.x                               \
@@ -257,6 +261,7 @@ DOT_X_FILES =                                       \
        print.x                                 \
        procprop.x                              \
        procs.x                                 \
+       promises.x                              \
        properties.x                            \
        r6rs-ports.x                            \
        random.x                                \
@@ -283,6 +288,7 @@ DOT_X_FILES =                                       \
        symbols.x                               \
        threads.x                               \
        throw.x                                 \
+       trees.x                                 \
        uniform.x                               \
        values.x                                \
        variable.x                              \
@@ -343,6 +349,7 @@ DOT_DOC_FILES =                             \
        load.doc                                \
        macros.doc                              \
        mallocs.doc                             \
+       memoize.doc                             \
        modules.doc                             \
        numbers.doc                             \
        objprop.doc                             \
@@ -352,6 +359,7 @@ DOT_DOC_FILES =                             \
        print.doc                               \
        procprop.doc                            \
        procs.doc                               \
+       promises.doc                            \
        properties.doc                          \
        r6rs-ports.doc                          \
        random.doc                              \
@@ -378,6 +386,7 @@ DOT_DOC_FILES =                             \
        symbols.doc                             \
        threads.doc                             \
        throw.doc                               \
+       trees.doc                               \
        uniform.doc                             \
        values.doc                              \
        variable.doc                            \
@@ -416,8 +425,9 @@ install-exec-hook:
 ## Perhaps we can deal with them normally once the merge seems to be
 ## working.
 noinst_HEADERS = conv-integer.i.c conv-uinteger.i.c            \
-                 eval.i.c ieee-754.h                           \
-                 srfi-4.i.c srfi-14.i.c                                \
+                 ieee-754.h                                    \
+                 srfi-4.i.c                                    \
+                 srfi-14.i.c                                   \
                  quicksort.i.c                                  \
                  win32-uname.h win32-dirent.h win32-socket.h   \
                 private-gc.h private-options.h
@@ -503,6 +513,7 @@ modinclude_HEADERS =                                \
        load.h                                  \
        macros.h                                \
        mallocs.h                               \
+       memoize.h                               \
        modules.h                               \
        net_db.h                                \
        null-threads.h                          \
@@ -517,6 +528,7 @@ modinclude_HEADERS =                                \
        procprop.h                              \
        procs.h                                 \
        programs.h                              \
+       promises.h                              \
        properties.h                            \
        pthread-threads.h                       \
        r6rs-ports.h                            \
@@ -548,6 +560,7 @@ modinclude_HEADERS =                                \
        tags.h                                  \
        threads.h                               \
        throw.h                                 \
+       trees.h                                 \
        validate.h                              \
        uniform.h                               \
        values.h                                \
diff --git a/libguile/backtrace.c b/libguile/backtrace.c
index 8357905..58fe0cf 100644
--- a/libguile/backtrace.c
+++ b/libguile/backtrace.c
@@ -1,5 +1,5 @@
 /* Printing of backtraces and error messages
- * Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006 Free Software 
Foundation
+ * Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2009 Free 
Software Foundation
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -77,31 +77,7 @@ SCM scm_the_last_stack_fluid_var;
 static void
 display_header (SCM source, SCM port)
 {
-  if (SCM_MEMOIZEDP (source))
-    {
-      SCM fname = scm_source_property (source, scm_sym_filename);
-      SCM line = scm_source_property (source, scm_sym_line);
-      SCM col = scm_source_property (source, scm_sym_column);
-
-      /* Dirk:FIXME:: Maybe we should store the _port_ rather than the
-       * filename with the source properties?  Then we could in case of
-       * non-file ports give at least some more details than just
-       * "<unnamed port>". */
-      if (scm_is_true (fname))
-       scm_prin1 (fname, port, 0);
-      else
-       scm_puts ("<unnamed port>", port);
-
-      if (scm_is_true (line) && scm_is_true (col))
-       {
-         scm_putc (':', port);
-         scm_intprint (scm_to_long (line) + 1, 10, port);
-         scm_putc (':', port);
-         scm_intprint (scm_to_long (col) + 1, 10, port);
-       }
-    }
-  else
-    scm_puts ("ERROR", port);
+  scm_puts ("ERROR", port);
   scm_puts (": ", port);
 }
 
@@ -187,18 +163,6 @@ display_expression (SCM frame, SCM pname, SCM source, SCM 
port)
       else
        scm_puts ("In procedure ", port);
       scm_iprin1 (pname, port, pstate);
-      if (SCM_MEMOIZEDP (source))
-       {
-         scm_puts (" in expression ", port);
-         pstate->writingp = 1;
-         scm_iprin1 (scm_i_unmemoize_expr (source), port, pstate);
-       }
-    }
-  else if (SCM_MEMOIZEDP (source))
-    {
-      scm_puts ("In expression ", port);
-      pstate->writingp = 1;
-      scm_iprin1 (scm_i_unmemoize_expr (source), port, pstate);
     }
   scm_puts (":\n", port);
   scm_free_print_state (print_state);
@@ -218,25 +182,9 @@ display_error_body (struct display_error_args *a)
 {
   SCM current_frame = SCM_BOOL_F;
   SCM source = SCM_BOOL_F;
-  SCM prev_frame = SCM_BOOL_F;
   SCM pname = a->subr;
 
-  if (scm_debug_mode_p
-      && SCM_STACKP (a->stack)
-      && SCM_STACK_LENGTH (a->stack) > 0)
-    {
-      current_frame = scm_stack_ref (a->stack, SCM_INUM0);
-      source = SCM_FRAME_SOURCE (current_frame);
-      prev_frame = SCM_FRAME_PREV (current_frame);
-      if (!SCM_MEMOIZEDP (source) && scm_is_true (prev_frame))
-       source = SCM_FRAME_SOURCE (prev_frame);
-      if (!scm_is_symbol (pname)
-         && !scm_is_string (pname)
-         && SCM_FRAME_PROC_P (current_frame)
-         && scm_is_true (scm_procedure_p (SCM_FRAME_PROC (current_frame))))
-       pname = scm_procedure_name (SCM_FRAME_PROC (current_frame));
-    }
-  if (scm_is_symbol (pname) || scm_is_string (pname) || SCM_MEMOIZEDP (source))
+  if (scm_is_symbol (pname) || scm_is_string (pname))
     {
       display_header (source, a->port);
       display_expression (current_frame, pname, source, a->port);
@@ -469,15 +417,10 @@ display_backtrace_get_file_line (SCM frame, SCM *file, 
SCM *line)
 {
   SCM source = SCM_FRAME_SOURCE (frame);
   *file = *line = SCM_BOOL_F;
-  if (SCM_MEMOIZEDP (source))
-    {
-      *file = scm_source_property (source, scm_sym_filename);
-      *line = scm_source_property (source, scm_sym_line);
-    }
-  else if (scm_is_pair (source)
-           && scm_is_pair (scm_cdr (source))
-           && scm_is_pair (scm_cddr (source))
-           && !scm_is_pair (scm_cdddr (source)))
+  if (scm_is_pair (source)
+      && scm_is_pair (scm_cdr (source))
+      && scm_is_pair (scm_cddr (source))
+      && !scm_is_pair (scm_cdddr (source)))
     {
       /* (addr . (filename . (line . column))), from vm compilation */
       *file = scm_cadr (source);
@@ -604,11 +547,8 @@ display_frame (SCM frame, int nfield, int indentation, SCM 
sport, SCM port, scm_
       SCM copy = (scm_is_pair (source) 
                  ? scm_source_property (source, scm_sym_copy)
                  : SCM_BOOL_F);
-      SCM umcopy = (SCM_MEMOIZEDP (source)
-                   ? scm_i_unmemoize_expr (source)
-                   : SCM_BOOL_F);
       display_frame_expr ("(",
-                         scm_is_pair (copy) ? copy : umcopy,
+                         copy,
                          ")",
                          nfield + 1 + indentation,
                          sport,
diff --git a/libguile/debug.c b/libguile/debug.c
index 53eb16b..f0dd29a 100644
--- a/libguile/debug.c
+++ b/libguile/debug.c
@@ -48,6 +48,7 @@
 #include "libguile/root.h"
 #include "libguile/fluids.h"
 #include "libguile/programs.h"
+#include "libguile/memoize.h"
 
 #include "libguile/validate.h"
 #include "libguile/debug.h"
@@ -77,11 +78,9 @@ SCM_DEFINE (scm_debug_options, "debug-options-interface", 0, 
1, 0,
       scm_options (ans, scm_debug_opts, FUNC_NAME);
       SCM_OUT_OF_RANGE (1, setting);
     }
-  SCM_RESET_DEBUG_MODE;
 #ifdef STACK_CHECKING
   scm_stack_checking_enabled_p = SCM_STACK_CHECKING_P;
 #endif
-  scm_debug_eframe_size = 2 * SCM_N_FRAMES;
 
   scm_dynwind_end ();
   return ans;
@@ -131,175 +130,6 @@ SCM_SYMBOL (scm_sym_procname, "procname");
 SCM_SYMBOL (scm_sym_dots, "...");
 SCM_SYMBOL (scm_sym_source, "source");
 
-/* {Memoized Source}
- */
-
-scm_t_bits scm_tc16_memoized;
-
-static int
-memoized_print (SCM obj, SCM port, scm_print_state *pstate)
-{
-  int writingp = SCM_WRITINGP (pstate);
-  scm_puts ("#<memoized ", port);
-  SCM_SET_WRITINGP (pstate, 1);
-  scm_iprin1 (SCM_MEMOIZED_EXP (obj), port, pstate);
-  SCM_SET_WRITINGP (pstate, writingp);
-  scm_putc ('>', port);
-  return 1;
-}
-
-SCM_DEFINE (scm_memoized_p, "memoized?", 1, 0, 0, 
-            (SCM obj),
-           "Return @code{#t} if @var{obj} is memoized.")
-#define FUNC_NAME s_scm_memoized_p
-{
-  return scm_from_bool(SCM_MEMOIZEDP (obj));
-}
-#undef FUNC_NAME
-
-SCM
-scm_make_memoized (SCM exp, SCM env)
-{
-  /* *fixme* Check that env is a valid environment. */
-  SCM_RETURN_NEWSMOB (scm_tc16_memoized, SCM_UNPACK (scm_cons (exp, env)));
-}
-
-#ifdef GUILE_DEBUG
-/*
- * Some primitives for construction of memoized code
- *
- * - procedure: memcons CAR CDR [ENV]
- *
- *     Construct a pair, encapsulated in a memoized object.
- *
- *     The CAR and CDR can be either normal or memoized.  If ENV isn't
- *     specified, the top-level environment of the current module will
- *     be assumed.  All environments must match.
- *
- * - procedure: make-iloc FRAME BINDING CDRP
- *
- *     Return an iloc referring to frame no. FRAME, binding
- *     no. BINDING.  If CDRP is non-#f, the iloc is referring to a
- *     frame consisting of a single pair, with the value stored in the
- *     CDR.
- *
- * - procedure: iloc? OBJECT
- *
- *     Return #t if OBJECT is an iloc.
- *
- * - procedure: mem->proc MEMOIZED
- *
- *     Construct a closure from the memoized lambda expression MEMOIZED
- *
- *     WARNING! The code is not copied!
- *
- * - procedure: proc->mem CLOSURE
- *
- *     Turn the closure CLOSURE into a memoized object.
- *
- *     WARNING! The code is not copied!
- *
- * - constant: SCM_IM_AND
- * - constant: SCM_IM_BEGIN
- * - constant: SCM_IM_CASE
- * - constant: SCM_IM_COND
- * - constant: SCM_IM_DO
- * - constant: SCM_IM_IF
- * - constant: SCM_IM_LAMBDA
- * - constant: SCM_IM_LET
- * - constant: SCM_IM_LETSTAR
- * - constant: SCM_IM_LETREC
- * - constant: SCM_IM_OR
- * - constant: SCM_IM_QUOTE
- * - constant: SCM_IM_SET
- * - constant: SCM_IM_DEFINE
- * - constant: SCM_IM_APPLY
- * - constant: SCM_IM_CONT
- * - constant: SCM_IM_DISPATCH
- */
-
-#include "libguile/variable.h"
-#include "libguile/procs.h"
-
-SCM_DEFINE (scm_memcons, "memcons", 2, 1, 0,
-            (SCM car, SCM cdr, SCM env),
-           "Return a new memoized cons cell with @var{car} and @var{cdr}\n"
-           "as members and @var{env} as the environment.")
-#define FUNC_NAME s_scm_memcons
-{
-  if (SCM_MEMOIZEDP (car))
-    {
-      /*fixme* environments may be two different but equal top-level envs */
-      if (!SCM_UNBNDP (env) && SCM_MEMOIZED_ENV (car) != env)
-       SCM_MISC_ERROR ("environment mismatch arg1 <-> arg3",
-                       scm_list_2 (car, env));
-      else
-       env = SCM_MEMOIZED_ENV (car);
-      car = SCM_MEMOIZED_EXP (car);
-    }
-  if (SCM_MEMOIZEDP (cdr))
-    {
-      if (!SCM_UNBNDP (env) && SCM_MEMOIZED_ENV (cdr) != env)
-       SCM_MISC_ERROR ("environment mismatch arg2 <-> arg3",
-                       scm_list_2 (cdr, env));
-      else
-       env = SCM_MEMOIZED_ENV (cdr);
-      cdr = SCM_MEMOIZED_EXP (cdr);
-    }
-  if (SCM_UNBNDP (env))
-    env = scm_top_level_env (SCM_TOP_LEVEL_LOOKUP_CLOSURE);
-  else
-    SCM_VALIDATE_NULLORCONS (3, env);
-  return scm_make_memoized (scm_cons (car, cdr), env);
-}
-#undef FUNC_NAME
-
-SCM_DEFINE (scm_mem_to_proc, "mem->proc", 1, 0, 0, 
-            (SCM obj),
-           "Convert a memoized object (which must represent a body)\n"
-           "to a procedure.")
-#define FUNC_NAME s_scm_mem_to_proc
-{
-  SCM env;
-  SCM_VALIDATE_MEMOIZED (1, obj);
-  env = SCM_MEMOIZED_ENV (obj);
-  obj = SCM_MEMOIZED_EXP (obj);
-  return scm_closure (obj, env);
-}
-#undef FUNC_NAME
-
-SCM_DEFINE (scm_proc_to_mem, "proc->mem", 1, 0, 0, 
-            (SCM obj),
-           "Convert a procedure to a memoized object.")
-#define FUNC_NAME s_scm_proc_to_mem
-{
-  SCM_VALIDATE_CLOSURE (1, obj);
-  return scm_make_memoized (SCM_CODE (obj), SCM_ENV (obj));
-}
-#undef FUNC_NAME
-
-#endif /* GUILE_DEBUG */
-
-SCM_DEFINE (scm_i_unmemoize_expr, "unmemoize-expr", 1, 0, 0, 
-            (SCM m),
-           "Unmemoize the memoized expression @var{m},")
-#define FUNC_NAME s_scm_i_unmemoize_expr
-{
-  SCM_VALIDATE_MEMOIZED (1, m);
-  return scm_i_unmemocopy_expr (SCM_MEMOIZED_EXP (m), SCM_MEMOIZED_ENV (m));
-}
-#undef FUNC_NAME
-
-SCM_DEFINE (scm_memoized_environment, "memoized-environment", 1, 0, 0, 
-            (SCM m),
-           "Return the environment of the memoized expression @var{m}.")
-#define FUNC_NAME s_scm_memoized_environment
-{
-  SCM_VALIDATE_MEMOIZED (1, m);
-  return SCM_MEMOIZED_ENV (m);
-}
-#undef FUNC_NAME
-
 SCM_DEFINE (scm_procedure_name, "procedure-name", 1, 0, 0, 
             (SCM proc),
            "Return the name of the procedure @var{proc}")
@@ -333,74 +163,32 @@ SCM_DEFINE (scm_procedure_source, "procedure-source", 1, 
0, 0,
            "Return the source of the procedure @var{proc}.")
 #define FUNC_NAME s_scm_procedure_source
 {
-  SCM_VALIDATE_NIM (1, proc);
- again:
-  switch (SCM_TYP7 (proc)) {
-  case scm_tcs_closures:
-    {
-      const SCM formals = SCM_CLOSURE_FORMALS (proc);
-      const SCM body = SCM_CLOSURE_BODY (proc);
-      const SCM src = scm_source_property (body, scm_sym_copy);
+  SCM src;
+  SCM_VALIDATE_PROC (1, proc);
 
-      if (scm_is_true (src))
-        {
-          return scm_cons2 (scm_sym_lambda, formals, src);
-        }
-      else
-        {
-          const SCM env = SCM_EXTEND_ENV (formals, SCM_EOL, SCM_ENV (proc));
-          return scm_cons2 (scm_sym_lambda,
-                            scm_i_finite_list_copy (formals),
-                            scm_i_unmemocopy_body (body, env));
-        }
-    }
-  case scm_tcs_struct:
-    if (!SCM_STRUCT_APPLICABLE_P (proc))
-      break;
-    proc = SCM_STRUCT_PROCEDURE (proc);
-    if (SCM_IMP (proc))
-      break;
-    goto procprop;
-  case scm_tc7_smob:
-    if (!SCM_SMOB_DESCRIPTOR (proc).apply)
-      break;
-  case scm_tcs_subrs:
-  case scm_tc7_program:
-  procprop:
-    /* It would indeed be a nice thing if we supplied source even for
-       built in procedures! */
-    return scm_procedure_property (proc, scm_sym_source);
-  case scm_tc7_pws:
+  do 
     {
-      SCM src = scm_procedure_property (proc, scm_sym_source);
+      src = scm_procedure_property (proc, scm_sym_source);
       if (scm_is_true (src))
-       return src;
-      proc = SCM_PROCEDURE (proc);
-      goto again;
+        return src;
+
+      switch (SCM_TYP7 (proc)) {
+      case scm_tcs_struct:
+        if (!SCM_STRUCT_APPLICABLE_P (proc)
+            || SCM_IMP (SCM_STRUCT_PROCEDURE (proc)))
+          break;
+        proc = SCM_STRUCT_PROCEDURE (proc);
+        continue;
+      case scm_tc7_pws:
+        proc = SCM_PROCEDURE (proc);
+        continue;
+      default:
+        break;
+      }
     }
-  default:
-    ;
-  }
-  SCM_WRONG_TYPE_ARG (1, proc);
-  return SCM_BOOL_F; /* not reached */
-}
-#undef FUNC_NAME
+  while (0);
 
-SCM_DEFINE (scm_procedure_environment, "procedure-environment", 1, 0, 0, 
-            (SCM proc),
-           "Return the environment of the procedure @var{proc}.")
-#define FUNC_NAME s_scm_procedure_environment
-{
-  SCM_VALIDATE_NIM (1, proc);
-  switch (SCM_TYP7 (proc)) {
-  case scm_tcs_closures:
-    return SCM_ENV (proc);
-  case scm_tcs_subrs:
-    return SCM_EOL;
-  default:
-    SCM_WRONG_TYPE_ARG (1, proc);
-    /* not reached */
-  }
+  return SCM_BOOL_F;
 }
 #undef FUNC_NAME
 
@@ -413,37 +201,21 @@ SCM_DEFINE (scm_procedure_module, "procedure-module", 1, 
0, 0,
 
   if (scm_is_true (scm_program_p (proc)))
     return scm_program_module (proc);
+  else if (SCM_CLOSUREP (proc))
+    {
+      SCM env = SCM_ENV (proc);
+      while (scm_is_pair (env))
+        env = scm_cdr (env);
+      return env;
+    }
   else
-    return scm_env_module (scm_procedure_environment (proc));
+    return SCM_BOOL_F;
 }
 #undef FUNC_NAME
 
 
 
 
-/* Eval in a local environment.  We would like to have the ability to
- * evaluate in a specified local environment, but due to the
- * memoization this isn't normally possible.  We solve it by copying
- * the code before evaluating.  One solution would be to have eval.c
- * generate yet another evaluator.  They are not very big actually.
- */
-SCM_DEFINE (scm_local_eval, "local-eval", 1, 1, 0,
-            (SCM exp, SCM env),
-           "Evaluate @var{exp} in its environment.  If @var{env} is 
supplied,\n"
-           "it is the environment in which to evaluate @var{exp}.  
Otherwise,\n"
-           "@var{exp} must be a memoized code object (in which case, its 
environment\n"
-           "is implicit).")
-#define FUNC_NAME s_scm_local_eval
-{
-  if (SCM_UNBNDP (env))
-  {
-    SCM_VALIDATE_MEMOIZED (1, exp);
-    return scm_i_eval_x (SCM_MEMOIZED_EXP (exp), SCM_MEMOIZED_ENV (exp));
-  }
-  return scm_i_eval (exp, env);
-}
-#undef FUNC_NAME
-
 #if 0
 SCM_REGISTER_PROC (s_reverse_lookup, "reverse-lookup", 2, 0, 0, 
scm_reverse_lookup);
 #endif
@@ -565,31 +337,9 @@ scm_init_debug ()
   init_stack_limit ();
   scm_init_opts (scm_debug_options, scm_debug_opts);
 
-  scm_tc16_memoized = scm_make_smob_type ("memoized", 0);
-  scm_set_smob_print (scm_tc16_memoized, memoized_print);
-
   scm_tc16_debugobj = scm_make_smob_type ("debug-object", 0);
   scm_set_smob_print (scm_tc16_debugobj, debugobj_print);
 
-#ifdef GUILE_DEBUG
-  scm_c_define ("SCM_IM_AND", SCM_IM_AND);
-  scm_c_define ("SCM_IM_BEGIN", SCM_IM_BEGIN);
-  scm_c_define ("SCM_IM_CASE", SCM_IM_CASE);
-  scm_c_define ("SCM_IM_COND", SCM_IM_COND);
-  scm_c_define ("SCM_IM_DO", SCM_IM_DO);
-  scm_c_define ("SCM_IM_IF", SCM_IM_IF);
-  scm_c_define ("SCM_IM_LAMBDA", SCM_IM_LAMBDA);
-  scm_c_define ("SCM_IM_LET", SCM_IM_LET);
-  scm_c_define ("SCM_IM_LETSTAR", SCM_IM_LETSTAR);
-  scm_c_define ("SCM_IM_LETREC", SCM_IM_LETREC);
-  scm_c_define ("SCM_IM_OR", SCM_IM_OR);
-  scm_c_define ("SCM_IM_QUOTE", SCM_IM_QUOTE);
-  scm_c_define ("SCM_IM_SET_X", SCM_IM_SET_X);
-  scm_c_define ("SCM_IM_DEFINE", SCM_IM_DEFINE);
-  scm_c_define ("SCM_IM_APPLY", SCM_IM_APPLY);
-  scm_c_define ("SCM_IM_CONT", SCM_IM_CONT);
-  scm_c_define ("SCM_IM_DISPATCH", SCM_IM_DISPATCH);
-#endif
   scm_add_feature ("debug-extensions");
 
 #include "libguile/debug.x"
diff --git a/libguile/debug.h b/libguile/debug.h
index 20febdb..24c6b9e 100644
--- a/libguile/debug.h
+++ b/libguile/debug.h
@@ -3,7 +3,7 @@
 #ifndef SCM_DEBUG_H
 #define SCM_DEBUG_H
 
-/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2004,2008
+/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2004,2008,2009
  * Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
@@ -45,26 +45,6 @@
 
 
 
-SCM_API int scm_debug_mode_p;
-SCM_API int scm_check_entry_p;
-SCM_API int scm_check_apply_p;
-SCM_API int scm_check_exit_p;
-SCM_API int scm_check_memoize_p;
-
-#define SCM_RESET_DEBUG_MODE \
-do {\
-  scm_check_entry_p = (SCM_ENTER_FRAME_P || SCM_BREAKPOINTS_P)\
-    && scm_is_true (SCM_ENTER_FRAME_HDLR);\
-  scm_check_apply_p = (SCM_APPLY_FRAME_P || SCM_TRACE_P)\
-    && scm_is_true (SCM_APPLY_FRAME_HDLR);\
-  scm_check_exit_p = (SCM_EXIT_FRAME_P || SCM_TRACE_P)\
-    && scm_is_true (SCM_EXIT_FRAME_HDLR);\
-  scm_check_memoize_p = (SCM_MEMOIZE_P)\
-    && scm_is_true (SCM_MEMOIZE_HDLR);\
-  scm_debug_mode_p = SCM_DEVAL_P\
-    || scm_check_memoize_p || scm_check_entry_p || scm_check_apply_p || 
scm_check_exit_p;\
-} while (0)
-
 /* {Evaluator}
  */
 
@@ -75,8 +55,6 @@ typedef union scm_t_debug_info
   SCM id;
 } scm_t_debug_info;
 
-SCM_API long scm_debug_eframe_size;
-
 typedef struct scm_t_debug_frame
 {
   struct scm_t_debug_frame *prev;
@@ -125,28 +103,14 @@ SCM_API scm_t_bits scm_tc16_debugobj;
   ((scm_t_debug_frame *) SCM_CELL_WORD_1 (x))
 #define SCM_SET_DEBUGOBJ_FRAME(x, f)  SCM_SET_CELL_WORD_1 (x, f)
 
-/* {Memoized Source}
- */
-
-SCM_API scm_t_bits scm_tc16_memoized;
-
-#define SCM_MEMOIZEDP(x)       SCM_TYP16_PREDICATE (scm_tc16_memoized, x)
-#define SCM_MEMOIZED_EXP(x)    SCM_CAR (SCM_CELL_OBJECT_1 (x))
-#define SCM_MEMOIZED_ENV(x)    SCM_CDR (SCM_CELL_OBJECT_1 (x))
-
 
 
 SCM_API SCM scm_debug_object_p (SCM obj);
-SCM_API SCM scm_local_eval (SCM exp, SCM env);
 SCM_API SCM scm_reverse_lookup (SCM env, SCM data);
 SCM_API SCM scm_sys_start_stack (SCM info_id, SCM thunk);
-SCM_API SCM scm_procedure_environment (SCM proc);
 SCM_API SCM scm_procedure_module (SCM proc);
 SCM_API SCM scm_procedure_source (SCM proc);
 SCM_API SCM scm_procedure_name (SCM proc);
-SCM_API SCM scm_memoized_environment (SCM m);
-SCM_API SCM scm_make_memoized (SCM exp, SCM env);
-SCM_API SCM scm_memoized_p (SCM obj);
 SCM_API SCM scm_with_traps (SCM thunk);
 SCM_API SCM scm_evaluator_traps (SCM setting);
 SCM_API SCM scm_debug_options (SCM setting);
@@ -156,9 +120,6 @@ SCM_INTERNAL SCM scm_i_unmemoize_expr (SCM memoized);
 SCM_INTERNAL void scm_init_debug (void);
 
 #ifdef GUILE_DEBUG
-SCM_API SCM scm_memcons (SCM car, SCM cdr, SCM env);
-SCM_API SCM scm_mem_to_proc (SCM obj);
-SCM_API SCM scm_proc_to_mem (SCM obj);
 SCM_API SCM scm_debug_hang (SCM obj);
 #endif /*GUILE_DEBUG*/
 
diff --git a/libguile/deprecated.c b/libguile/deprecated.c
index bef3c90..1f35d2a 100644
--- a/libguile/deprecated.c
+++ b/libguile/deprecated.c
@@ -70,17 +70,6 @@ char *scm_isymnames[] =
 };
 
 
-/* From eval.c: Error messages of the evaluator.  These were deprecated in
- * guile 1.7.0 on 2003-06-02.  */
-const char scm_s_expression[] = "missing or extra expression";
-const char scm_s_test[] = "bad test";
-const char scm_s_body[] = "bad body";
-const char scm_s_bindings[] = "bad bindings";
-const char scm_s_variable[] = "bad variable";
-const char scm_s_clauses[] = "bad or missing clauses";
-const char scm_s_formals[] = "bad formals";
-
-
 SCM_REGISTER_PROC(s_substring_move_left_x, "substring-move-left!", 5, 0, 0, 
scm_substring_move_x);
 
 SCM_REGISTER_PROC(s_substring_move_right_x, "substring-move-right!", 5, 0, 0, 
scm_substring_move_x);
@@ -271,17 +260,6 @@ init_module_stuff ()
     }
 }
 
-SCM
-scm_the_root_module ()
-{
-  init_module_stuff ();
-  scm_c_issue_deprecation_warning ("`scm_the_root_module' is deprecated. "
-                                  "Use `scm_c_resolve_module (\"guile\")' "
-                                  "instead.");
-
-  return scm_c_resolve_module ("guile");
-}
-
 static SCM
 scm_module_full_name (SCM name)
 {
@@ -1595,6 +1573,45 @@ scm_gc_set_debug_check_freelist_x (SCM flag)
 #endif
 
 
+/* Trampolines
+ *  
+ * Trampolines were an intent to speed up calling the same Scheme procedure 
many
+ * times from C.
+ *
+ * However, this was the wrong thing to optimize; if you really know what 
you're
+ * calling, call its function directly, otherwise you're in Scheme-land, and we
+ * have many better tricks there (inlining, for example, which can remove the
+ * need for closures and free variables).
+ *
+ * Also, in the normal debugging case, trampolines were being computed but not
+ * used. Silliness.
+ */
+
+scm_t_trampoline_0
+scm_trampoline_0 (SCM proc)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_trampoline_0' is deprecated. Just use `scm_call_0' instead.");
+  return scm_call_0;
+}
+
+scm_t_trampoline_1
+scm_trampoline_1 (SCM proc)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_trampoline_1' is deprecated. Just use `scm_call_1' instead.");
+  return scm_call_1;
+}
+
+scm_t_trampoline_2
+scm_trampoline_2 (SCM proc)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_trampoline_2' is deprecated. Just use `scm_call_2' instead.");
+  return scm_call_2;
+}
+
+
 void
 scm_i_init_deprecated ()
 {
diff --git a/libguile/deprecated.h b/libguile/deprecated.h
index cad1454..5570a43 100644
--- a/libguile/deprecated.h
+++ b/libguile/deprecated.h
@@ -26,6 +26,7 @@
 #include "libguile/__scm.h"
 #include "libguile/arrays.h"
 #include "libguile/strings.h"
+#include "libguile/eval.h"
 
 #if (SCM_ENABLE_DEPRECATED == 1)
 
@@ -58,40 +59,6 @@ SCM_API char *scm_isymnames[];
 #define SCM_SLOPPY_COMPLEXP(x) (SCM_TYP16 (x) == scm_tc16_complex)
 
 
-/* From eval.h: Macros for handling ilocs.  These were deprecated in guile
- * 1.7.0 on 2003-06-04.  */
-#define SCM_ILOC00             SCM_MAKE_ITAG8(0L, scm_tc8_iloc)
-#define SCM_IDINC              (0x00100000L)
-#define SCM_IDSTMSK            (-SCM_IDINC)
-
-
-/* From eval.h: Error messages of the evaluator.  These were deprecated in
- * guile 1.7.0 on 2003-06-02.  */
-SCM_DEPRECATED const char scm_s_expression[];
-SCM_DEPRECATED const char scm_s_test[];
-SCM_DEPRECATED const char scm_s_body[];
-SCM_DEPRECATED const char scm_s_bindings[];
-SCM_DEPRECATED const char scm_s_variable[];
-SCM_DEPRECATED const char scm_s_clauses[];
-SCM_DEPRECATED const char scm_s_formals[];
-
-
-/* From eval.h: Helper macros for evaluation and application.  These were
- * deprecated in guile 1.7.0 on 2003-06-02.  */
-#define SCM_EVALIM2(x) \
-  ((scm_is_eq ((x), SCM_EOL) \
-    ? scm_misc_error (NULL, scm_s_expression, SCM_EOL), 0 \
-    : 0), \
-   (x))
-#define SCM_EVALIM(x, env) (SCM_ILOCP (x) \
-                            ? *scm_ilookup ((x), env) \
-                           : SCM_EVALIM2(x))
-#define SCM_XEVAL(x, env) (scm_i_eval_x ((x), (env)))
-#define SCM_XEVALCAR(x, env) (SCM_SYMBOLP (SCM_CAR (x)) \
-                             ? *scm_lookupcar (x, env, 1) \
-                             : scm_i_eval_x (SCM_CAR (x), (env)))
-
-
 /* From structs.h:
    Deprecated in Guile 1.9.5 on 2009-11-03. */
 #define scm_vtable_index_vtable scm_vtable_index_self
@@ -133,7 +100,6 @@ SCM_DEPRECATED SCM scm_unprotect_object (SCM obj);
 #define SCM_GCCDR(x) SCM_CDR (x)
 SCM_DEPRECATED void scm_remember (SCM * ptr);
 
-SCM_DEPRECATED SCM scm_the_root_module (void);
 SCM_DEPRECATED SCM scm_make_module (SCM name);
 SCM_DEPRECATED SCM scm_ensure_user_module (SCM name);
 SCM_DEPRECATED SCM scm_load_scheme_module (SCM name);
@@ -622,6 +588,12 @@ SCM_DEPRECATED SCM scm_map_free_list (void);
 SCM_DEPRECATED SCM scm_gc_set_debug_check_freelist_x (SCM flag);
 #endif
 
+
+
+/* Deprecated 2009-11-27, scm_call_N is sufficient */
+SCM_DEPRECATED scm_t_trampoline_0 scm_trampoline_0 (SCM proc);
+SCM_DEPRECATED scm_t_trampoline_1 scm_trampoline_1 (SCM proc);
+SCM_DEPRECATED scm_t_trampoline_2 scm_trampoline_2 (SCM proc);
 
 
 void scm_i_init_deprecated (void);
diff --git a/libguile/eval.c b/libguile/eval.c
index 7152322..d540595 100644
--- a/libguile/eval.c
+++ b/libguile/eval.c
@@ -19,9 +19,6 @@
 
 
 
-/* SECTION: This code is compiled once.
- */
-
 #ifdef HAVE_CONFIG_H
 #  include <config.h>
 #endif
@@ -47,6 +44,7 @@
 #include "libguile/lang.h"
 #include "libguile/list.h"
 #include "libguile/macros.h"
+#include "libguile/memoize.h"
 #include "libguile/modules.h"
 #include "libguile/ports.h"
 #include "libguile/print.h"
@@ -70,2882 +68,364 @@
 
 
 
-static SCM unmemoize_exprs (SCM expr, SCM env);
-static SCM canonicalize_define (SCM expr);
-static SCM *scm_lookupcar1 (SCM vloc, SCM genv, int check);
-static SCM unmemoize_builtin_macro (SCM expr, SCM env);
-static void ceval_letrec_inits (SCM env, SCM init_forms, SCM 
**init_values_eol);
-static SCM ceval (SCM x, SCM env);
-static SCM deval (SCM x, SCM env);
-
-
-
-/* {Syntax Errors}
- *
- * This section defines the message strings for the syntax errors that can be
- * detected during memoization and the functions and macros that shall be
- * called by the memoizer code to signal syntax errors.  */
-
-
-/* Syntax errors that can be detected during memoization: */
-
-/* Circular or improper lists do not form valid scheme expressions.  If a
- * circular list or an improper list is detected in a place where a scheme
- * expression is expected, a 'Bad expression' error is signalled.  */
-static const char s_bad_expression[] = "Bad expression";
-
-/* If a form is detected that holds a different number of expressions than are
- * required in that context, a 'Missing or extra expression' error is
- * signalled.  */
-static const char s_expression[] = "Missing or extra expression in";
-
-/* If a form is detected that holds less expressions than are required in that
- * context, a 'Missing expression' error is signalled.  */
-static const char s_missing_expression[] = "Missing expression in";
-
-/* If a form is detected that holds more expressions than are allowed in that
- * context, an 'Extra expression' error is signalled.  */
-static const char s_extra_expression[] = "Extra expression in";
-
-/* The empty combination '()' is not allowed as an expression in scheme.  If
- * it is detected in a place where an expression is expected, an 'Illegal
- * empty combination' error is signalled.  Note: If you encounter this error
- * message, it is very likely that you intended to denote the empty list.  To
- * do so, you need to quote the empty list like (quote ()) or '().  */
-static const char s_empty_combination[] = "Illegal empty combination";
-
-/* A body may hold an arbitrary number of internal defines, followed by a
- * non-empty sequence of expressions.  If a body with an empty sequence of
- * expressions is detected, a 'Missing body expression' error is signalled.
- */
-static const char s_missing_body_expression[] = "Missing body expression in";
-
-/* A body may hold an arbitrary number of internal defines, followed by a
- * non-empty sequence of expressions.  Each the definitions and the
- * expressions may be grouped arbitraryly with begin, but it is not allowed to
- * mix definitions and expressions.  If a define form in a body mixes
- * definitions and expressions, a 'Mixed definitions and expressions' error is
- * signalled.  */
-static const char s_mixed_body_forms[] = "Mixed definitions and expressions 
in";
-/* Definitions are only allowed on the top level and at the start of a body.
- * If a definition is detected anywhere else, a 'Bad define placement' error
- * is signalled.  */
-static const char s_bad_define[] = "Bad define placement";
-
-/* Case or cond expressions must have at least one clause.  If a case or cond
- * expression without any clauses is detected, a 'Missing clauses' error is
- * signalled.  */
-static const char s_missing_clauses[] = "Missing clauses";
-
-/* If there is an 'else' clause in a case or a cond statement, it must be the
- * last clause.  If after the 'else' case clause further clauses are detected,
- * a 'Misplaced else clause' error is signalled.  */
-static const char s_misplaced_else_clause[] = "Misplaced else clause";
-
-/* If a case clause is detected that is not in the format
- *   (<label(s)> <expression1> <expression2> ...)
- * a 'Bad case clause' error is signalled.  */
-static const char s_bad_case_clause[] = "Bad case clause";
-
-/* If a case clause is detected where the <label(s)> element is neither a
- * proper list nor (in case of the last clause) the syntactic keyword 'else',
- * a 'Bad case labels' error is signalled.  Note: If you encounter this error
- * for an else-clause which seems to be syntactically correct, check if 'else'
- * is really a syntactic keyword in that context.  If 'else' is bound in the
- * local or global environment, it is not considered a syntactic keyword, but
- * will be treated as any other variable.  */
-static const char s_bad_case_labels[] = "Bad case labels";
-
-/* In a case statement all labels have to be distinct.  If in a case statement
- * a label occurs more than once, a 'Duplicate case label' error is
- * signalled.  */
-static const char s_duplicate_case_label[] = "Duplicate case label";
-
-/* If a cond clause is detected that is not in one of the formats
- *   (<test> <expression1> ...) or (else <expression1> <expression2> ...)
- * a 'Bad cond clause' error is signalled.  */
-static const char s_bad_cond_clause[] = "Bad cond clause";
-
-/* If a cond clause is detected that uses the alternate '=>' form, but does
- * not hold a recipient element for the test result, a 'Missing recipient'
- * error is signalled.  */
-static const char s_missing_recipient[] = "Missing recipient in";
-
-/* If in a position where a variable name is required some other object is
- * detected, a 'Bad variable' error is signalled.  */
-static const char s_bad_variable[] = "Bad variable";
-
-/* Bindings for forms like 'let' and 'do' have to be given in a proper,
- * possibly empty list.  If any other object is detected in a place where a
- * list of bindings was required, a 'Bad bindings' error is signalled.  */
-static const char s_bad_bindings[] = "Bad bindings";
-
-/* Depending on the syntactic context, a binding has to be in the format
- * (<variable> <expression>) or (<variable> <expression1> <expression2>).
- * If anything else is detected in a place where a binding was expected, a
- * 'Bad binding' error is signalled.  */
-static const char s_bad_binding[] = "Bad binding";
-
-/* Some syntactic forms don't allow variable names to appear more than once in
- * a list of bindings.  If such a situation is nevertheless detected, a
- * 'Duplicate binding' error is signalled.  */
-static const char s_duplicate_binding[] = "Duplicate binding";
-
-/* If the exit form of a 'do' expression is not in the format
- *   (<test> <expression> ...)
- * a 'Bad exit clause' error is signalled.  */
-static const char s_bad_exit_clause[] = "Bad exit clause";
-
-/* The formal function arguments of a lambda expression have to be either a
- * single symbol or a non-cyclic list.  For anything else a 'Bad formals'
- * error is signalled.  */
-static const char s_bad_formals[] = "Bad formals";
-
-/* If in a lambda expression something else than a symbol is detected at a
- * place where a formal function argument is required, a 'Bad formal' error is
- * signalled.  */
-static const char s_bad_formal[] = "Bad formal";
-
-/* If in the arguments list of a lambda expression an argument name occurs
- * more than once, a 'Duplicate formal' error is signalled.  */
-static const char s_duplicate_formal[] = "Duplicate formal";
-
-/* If the evaluation of an unquote-splicing expression gives something else
- * than a proper list, a 'Non-list result for unquote-splicing' error is
- * signalled.  */
-static const char s_splicing[] = "Non-list result for unquote-splicing";
-
-/* If something else than an exact integer is detected as the argument for
- * @slot-ref and @slot-set!, a 'Bad slot number' error is signalled.  */
-static const char s_bad_slot_number[] = "Bad slot number";
-
-
-/* Signal a syntax error.  We distinguish between the form that caused the
- * error and the enclosing expression.  The error message will print out as
- * shown in the following pattern.  The file name and line number are only
- * given when they can be determined from the erroneous form or from the
- * enclosing expression.
- *
- * <filename>: In procedure memoization:
- * <filename>: In file <name>, line <nr>: <error-message> in <expression>.  */
-
-SCM_SYMBOL (syntax_error_key, "syntax-error");
-
-/* The prototype is needed to indicate that the function does not return.  */
-static void
-syntax_error (const char* const, const SCM, const SCM) SCM_NORETURN;
-
-static void 
-syntax_error (const char* const msg, const SCM form, const SCM expr)
-{
-  SCM msg_string = scm_from_locale_string (msg);
-  SCM filename = SCM_BOOL_F;
-  SCM linenr = SCM_BOOL_F;
-  const char *format;
-  SCM args;
-
-  if (scm_is_pair (form))
-    {
-      filename = scm_source_property (form, scm_sym_filename);
-      linenr = scm_source_property (form, scm_sym_line);
-    }
-
-  if (scm_is_false (filename) && scm_is_false (linenr) && scm_is_pair (expr))
-    {
-      filename = scm_source_property (expr, scm_sym_filename);
-      linenr = scm_source_property (expr, scm_sym_line);
-    }
-
-  if (!SCM_UNBNDP (expr))
-    {
-      if (scm_is_true (filename))
-       {
-         format = "In file ~S, line ~S: ~A ~S in expression ~S.";
-         args = scm_list_5 (filename, linenr, msg_string, form, expr);
-       }
-      else if (scm_is_true (linenr))
-       {
-         format = "In line ~S: ~A ~S in expression ~S.";
-         args = scm_list_4 (linenr, msg_string, form, expr);
-       }
-      else
-       {
-         format = "~A ~S in expression ~S.";
-         args = scm_list_3 (msg_string, form, expr);
-       }
-    }
-  else
-    {
-      if (scm_is_true (filename))
-       {
-         format = "In file ~S, line ~S: ~A ~S.";
-         args = scm_list_4 (filename, linenr, msg_string, form);
-       }
-      else if (scm_is_true (linenr))
-       {
-         format = "In line ~S: ~A ~S.";
-         args = scm_list_3 (linenr, msg_string, form);
-       }
-      else
-       {
-         format = "~A ~S.";
-         args = scm_list_2 (msg_string, form);
-       }
-    }
-
-  scm_error (syntax_error_key, "memoization", format, args, SCM_BOOL_F);
-}
-
-
-/* Shortcut macros to simplify syntax error handling. */
-#define ASSERT_SYNTAX(cond, message, form)             \
-  { if (SCM_UNLIKELY (!(cond)))                        \
-      syntax_error (message, form, SCM_UNDEFINED); }
-#define ASSERT_SYNTAX_2(cond, message, form, expr)     \
-  { if (SCM_UNLIKELY (!(cond)))                        \
-      syntax_error (message, form, expr); }
-
-static void error_unbound_variable (SCM symbol) SCM_NORETURN;
-static void error_defined_variable (SCM symbol) SCM_NORETURN;
-
-
+/* We have three levels of EVAL here:
 
-/* {Ilocs}
- *
- * Ilocs are memoized references to variables in local environment frames.
- * They are represented as three values:  The relative offset of the
- * environment frame, the number of the binding within that frame, and a
- * boolean value indicating whether the binding is the last binding in the
- * frame.
- *
- * Frame numbers have 11 bits, relative offsets have 12 bits.
- */
+   - eval (exp, env)
 
-#define SCM_ILOC00             SCM_MAKE_ITAG8(0L, scm_tc8_iloc)
-#define SCM_IFRINC             (0x00000100L)
-#define SCM_ICDR               (0x00080000L)
-#define SCM_IDINC              (0x00100000L)
-#define SCM_IFRAME(n)          ((long)((SCM_ICDR-SCM_IFRINC)>>8) \
-                                & (SCM_UNPACK (n) >> 8))
-#define SCM_IDIST(n)           (SCM_UNPACK (n) >> 20)
-#define SCM_ICDRP(n)           (SCM_ICDR & SCM_UNPACK (n))
-#define SCM_IDSTMSK            (-SCM_IDINC)
-#define SCM_IFRAMEMAX           ((1<<11)-1)
-#define SCM_IDISTMAX            ((1<<12)-1)
-#define SCM_MAKE_ILOC(frame_nr, binding_nr, last_p) \
-  SCM_PACK ( \
-    ((frame_nr) << 8) \
-    + ((binding_nr) << 20) \
-    + ((last_p) ? SCM_ICDR : 0) \
-    + scm_tc8_iloc )
+     evaluates EXP in environment ENV.  ENV is a lexical environment
+     structure as used by the actual tree code evaluator.  When ENV is
+     a top-level environment, then changes to the current module are
+     tracked by updating ENV so that it continues to be in sync with
+     the current module.
 
-void
-scm_i_print_iloc (SCM iloc, SCM port)
-{
-  scm_puts ("#@", port);
-  scm_intprint ((long) SCM_IFRAME (iloc), 10, port);
-  scm_putc (SCM_ICDRP (iloc) ? '-' : '+', port);
-  scm_intprint ((long) SCM_IDIST (iloc), 10, port);
-}
+   - scm_primitive_eval (exp)
 
-#if (SCM_DEBUG_DEBUGGING_SUPPORT == 1)
+     evaluates EXP in the top-level environment as determined by the
+     current module.  This is done by constructing a suitable
+     environment and calling eval.  Thus, changes to the
+     top-level module are tracked normally.
 
-SCM scm_dbg_make_iloc (SCM frame, SCM binding, SCM cdrp);
+   - scm_eval (exp, mod)
 
-SCM_DEFINE (scm_dbg_make_iloc, "dbg-make-iloc", 3, 0, 0,
-            (SCM frame, SCM binding, SCM cdrp),
-           "Return a new iloc with frame offset @var{frame}, binding\n"
-           "offset @var{binding} and the cdr flag @var{cdrp}.")
-#define FUNC_NAME s_scm_dbg_make_iloc
-{
-  return SCM_MAKE_ILOC ((scm_t_bits) scm_to_unsigned_integer (frame, 0, 
SCM_IFRAMEMAX),
-                       (scm_t_bits) scm_to_unsigned_integer (binding, 0, 
SCM_IDISTMAX),
-                       scm_is_true (cdrp));
-}
-#undef FUNC_NAME
+     evaluates EXP while MOD is the current module. This is done
+     by setting the current module to MOD_OR_STATE, invoking
+     scm_primitive_eval on EXP, and then restoring the current module
+     to the value it had previously.  That is, while EXP is evaluated,
+     changes to the current module (or dynamic state) are tracked,
+     but these changes do not persist when scm_eval returns.
 
-SCM scm_dbg_iloc_p (SCM obj);
+*/
 
-SCM_DEFINE (scm_dbg_iloc_p, "dbg-iloc?", 1, 0, 0, 
-          (SCM obj),
-           "Return @code{#t} if @var{obj} is an iloc.")
-#define FUNC_NAME s_scm_dbg_iloc_p
-{
-  return scm_from_bool (SCM_ILOCP (obj));
-}
-#undef FUNC_NAME
 
+#if 0
+#define CAR(x)   SCM_CAR(x)
+#define CDR(x)   SCM_CDR(x)
+#define CAAR(x)  SCM_CAAR(x)
+#define CADR(x)  SCM_CADR(x)
+#define CDAR(x)  SCM_CDAR(x)
+#define CDDR(x)  SCM_CDDR(x)
+#define CADDR(x) SCM_CADDR(x)
+#define CDDDR(x) SCM_CDDDR(x)
+#else
+#define CAR(x)   scm_car(x)
+#define CDR(x)   scm_cdr(x)
+#define CAAR(x)  scm_caar(x)
+#define CADR(x)  scm_cadr(x)
+#define CDAR(x)  scm_cdar(x)
+#define CDDR(x)  scm_cddr(x)
+#define CADDR(x) scm_caddr(x)
+#define CDDDR(x) scm_cdddr(x)
 #endif
 
-
-
-/* {Evaluator byte codes (isyms)}
- */
-
-#define ISYMNUM(n)             (SCM_ITAG8_DATA (n))
 
-/* This table must agree with the list of SCM_IM_ constants in tags.h */
-static const char *const isymnames[] =
-{
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden",
-  "address@hidden"
-};
-
-void
-scm_i_print_isym (SCM isym, SCM port)
-{
-  const size_t isymnum = ISYMNUM (isym);
-  if (isymnum < (sizeof isymnames / sizeof (char *)))
-    scm_puts (isymnames[isymnum], port);
-  else
-    scm_ipruk ("isym", isym, port);
-}
-
-
-
-/* The function lookup_symbol is used during memoization: Lookup the symbol in
- * the environment.  If there is no binding for the symbol, SCM_UNDEFINED is
- * returned.  If the symbol is a global variable, the variable object to which
- * the symbol is bound is returned.  Finally, if the symbol is a local
- * variable the corresponding iloc object is returned.  */
-
-/* A helper function for lookup_symbol: Try to find the symbol in the top
- * level environment frame.  The function returns SCM_UNDEFINED if the symbol
- * is unbound and it returns a variable object if the symbol is a global
- * variable.  */
-static SCM
-lookup_global_symbol (const SCM symbol, const SCM top_level)
-{
-  const SCM variable = scm_sym2var (symbol, top_level, SCM_BOOL_F);
-  if (scm_is_false (variable))
-    return SCM_UNDEFINED;
-  else
-    return variable;
-}
-
-static SCM
-lookup_symbol (const SCM symbol, const SCM env)
-{
-  SCM frame_idx;
-  unsigned int frame_nr;
-
-  for (frame_idx = env, frame_nr = 0;
-       !scm_is_null (frame_idx);
-       frame_idx = SCM_CDR (frame_idx), ++frame_nr)
-    {
-      const SCM frame = SCM_CAR (frame_idx);
-      if (scm_is_pair (frame))
-       {
-         /* frame holds a local environment frame */
-         SCM symbol_idx;
-         unsigned int symbol_nr;
-
-         for (symbol_idx = SCM_CAR (frame), symbol_nr = 0;
-              scm_is_pair (symbol_idx);
-              symbol_idx = SCM_CDR (symbol_idx), ++symbol_nr)
-           {
-             if (scm_is_eq (SCM_CAR (symbol_idx), symbol))
-               /* found the symbol, therefore return the iloc */
-               return SCM_MAKE_ILOC (frame_nr, symbol_nr, 0);
-           }
-         if (scm_is_eq (symbol_idx, symbol))
-           /* found the symbol as the last element of the current frame */
-           return SCM_MAKE_ILOC (frame_nr, symbol_nr, 1);
-       }
-      else
-       {
-         /* no more local environment frames */
-         return lookup_global_symbol (symbol, frame);
-       }
-    }
-
-  return lookup_global_symbol (symbol, SCM_BOOL_F);
-}
-
-
-/* Return true if the symbol is - from the point of view of a macro
- * transformer - a literal in the sense specified in chapter "pattern
- * language" of R5RS.  In the code below, however, we don't match the
- * definition of R5RS exactly:  It returns true if the identifier has no
- * binding or if it is a syntactic keyword.  */
-static int
-literal_p (const SCM symbol, const SCM env)
-{
-  const SCM variable = lookup_symbol (symbol, env);
-  if (SCM_UNBNDP (variable))
-    return 1;
-  if (SCM_VARIABLEP (variable) && SCM_MACROP (SCM_VARIABLE_REF (variable)))
-    return 1;
-  else
-    return 0;
-}
-
-
-/* Return true if the expression is self-quoting in the memoized code.  Thus,
- * some other objects (like e. g. vectors) are reported as self-quoting, which
- * according to R5RS would need to be quoted.  */
-static int
-is_self_quoting_p (const SCM expr)
-{
-  if (scm_is_pair (expr))
-    return 0;
-  else if (scm_is_symbol (expr))
-    return 0;
-  else if (scm_is_null (expr))
-    return 0;
-  else return 1;
-}
-
-
-SCM_SYMBOL (sym_three_question_marks, "???");
+SCM_SYMBOL (scm_unbound_variable_key, "unbound-variable");
 
-static SCM
-unmemoize_expression (const SCM expr, const SCM env)
+static void error_used_before_defined (void)
 {
-  if (SCM_ILOCP (expr))
-    {
-      SCM frame_idx;
-      unsigned long int frame_nr;
-      SCM symbol_idx;
-      unsigned long int symbol_nr;
-
-      for (frame_idx = env, frame_nr = SCM_IFRAME (expr);
-           frame_nr != 0; 
-           frame_idx = SCM_CDR (frame_idx), --frame_nr)
-        ;
-      for (symbol_idx = SCM_CAAR (frame_idx), symbol_nr = SCM_IDIST (expr);
-           symbol_nr != 0;
-           symbol_idx = SCM_CDR (symbol_idx), --symbol_nr)
-        ;
-      return SCM_ICDRP (expr) ? symbol_idx : SCM_CAR (symbol_idx);
-    }
-  else if (SCM_VARIABLEP (expr))
-    {
-      const SCM sym = scm_module_reverse_lookup (scm_env_module (env), expr);
-      return scm_is_true (sym) ? sym : sym_three_question_marks;
-    }
-  else if (scm_is_simple_vector (expr))
-    {
-      return scm_list_2 (scm_sym_quote, expr);
-    }
-  else if (!scm_is_pair (expr))
-    {
-      return expr;
-    }
-  else if (SCM_ISYMP (SCM_CAR (expr)))
-    {
-      return unmemoize_builtin_macro (expr, env);
-    }
-  else
-    {
-      return unmemoize_exprs (expr, env);
-    }
+  scm_error (scm_unbound_variable_key, NULL,
+             "Variable used before given a value", SCM_EOL, SCM_BOOL_F);
 }
 
-
-static SCM
-unmemoize_exprs (const SCM exprs, const SCM env)
+int
+scm_badargsp (SCM formals, SCM args)
 {
-  SCM r_result = SCM_EOL;
-  SCM expr_idx = exprs;
-  SCM um_expr;
-
-  /* Note that due to the current lazy memoizer we may find partially memoized
-   * code during execution.  In such code we have to expect improper lists of
-   * expressions: On the one hand, for such code syntax checks have not yet
-   * fully been performed, on the other hand, there may be even legal code
-   * like '(a . b) appear as an improper list of expressions as long as the
-   * quote expression is still in its unmemoized form.  For this reason, the
-   * following code handles improper lists of expressions until memoization
-   * and execution have been completely separated.  */
-  for (; scm_is_pair (expr_idx); expr_idx = SCM_CDR (expr_idx))
-    {
-      const SCM expr = SCM_CAR (expr_idx);
-
-      /* In partially memoized code, lists of expressions that stem from a
-       * body form may start with an ISYM if the body itself has not yet been
-       * memoized.  This isym is just an internal marker to indicate that the
-       * body still needs to be memoized.  An isym may occur at the very
-       * beginning of the body or after one or more comment strings.  It is
-       * dropped during unmemoization.  */
-      if (!SCM_ISYMP (expr))
-        {
-          um_expr = unmemoize_expression (expr, env);
-          r_result = scm_cons (um_expr, r_result);
-        }
-    }
-  um_expr = unmemoize_expression (expr_idx, env);
-  if (!scm_is_null (r_result))
-    {
-      const SCM result = scm_reverse_x (r_result, SCM_UNDEFINED);
-      SCM_SETCDR (r_result, um_expr);
-      return result;
-    }
-  else
+  while (!scm_is_null (formals))
     {
-      return um_expr;
+      if (!scm_is_pair (formals)) 
+        return 0;
+      if (scm_is_null (args)) 
+        return 1;
+      formals = CDR (formals);
+      args = CDR (args);
     }
+  return !scm_is_null (args) ? 1 : 0;
 }
 
+/* the environment:
+   (VAL ... . MOD)
+   If MOD is #f, it means the environment was captured before modules were
+   booted.
+   If MOD is the literal value '(), we are evaluating at the top level, and so
+   should track changes to the current module. You have to be careful in this
+   case, because further lexical contours should capture the current module.
+*/
+#define CAPTURE_ENV(env)                                        \
+  ((env == SCM_EOL) ? scm_current_module () :                   \
+   ((env == SCM_BOOL_F) ? scm_the_root_module () : env))
 
-/* Rewrite the body (which is given as the list of expressions forming the
- * body) into its internal form.  The internal form of a body (<expr> ...) is
- * just the body itself, but prefixed with an ISYM that denotes to what kind
- * of outer construct this body belongs: (<ISYM> <expr> ...).  A lambda body
- * starts with SCM_IM_LAMBDA, for example, a body of a let starts with
- * SCM_IM_LET, etc.
- *
- * It is assumed that the calling expression has already made sure that the
- * body is a proper list.  */
-static SCM
-m_body (SCM op, SCM exprs)
-{
-  /* Don't add another ISYM if one is present already. */
-  if (SCM_ISYMP (SCM_CAR (exprs)))
-    return exprs;
-  else
-    return scm_cons (op, exprs);
-}
-
-
-/* The function m_expand_body memoizes a proper list of expressions forming a
- * body.  This function takes care of dealing with internal defines and
- * transforming them into an equivalent letrec expression.  The list of
- * expressions is rewritten in place.  */ 
-
-/* This is a helper function for m_expand_body.  If the argument expression is
- * a symbol that denotes a syntactic keyword, the corresponding macro object
- * is returned, in all other cases the function returns SCM_UNDEFINED.  */ 
-static SCM
-try_macro_lookup (const SCM expr, const SCM env)
-{
-  if (scm_is_symbol (expr))
-    {
-      const SCM variable = lookup_symbol (expr, env);
-      if (SCM_VARIABLEP (variable))
-        {
-          const SCM value = SCM_VARIABLE_REF (variable);
-          if (SCM_MACROP (value))
-            return value;
-        }
-    }
-
-  return SCM_UNDEFINED;
-}
-
-/* This is a helper function for m_expand_body.  It expands user macros,
- * because for the correct translation of a body we need to know whether they
- * expand to a definition. */ 
 static SCM
-expand_user_macros (SCM expr, const SCM env)
+eval (SCM x, SCM env)
 {
-  while (scm_is_pair (expr))
-    {
-      const SCM car_expr = SCM_CAR (expr);
-      const SCM new_car = expand_user_macros (car_expr, env);
-      const SCM value = try_macro_lookup (new_car, env);
+  SCM mx;
+  SCM proc = SCM_UNDEFINED, args = SCM_EOL;
 
-      if (SCM_MACROP (value) && SCM_MACRO_TYPE (value) == 2)
-       {
-         /* User macros transform code into code.  */
-         expr = scm_call_2 (SCM_MACRO_CODE (value), expr, env);
-         /* We need to reiterate on the transformed code.  */
-       }
+ loop:
+  SCM_TICK;
+  if (!SCM_MEMOIZED_P (x))
+    abort ();
+  
+  mx = SCM_MEMOIZED_ARGS (x);
+  switch (SCM_MEMOIZED_TAG (x))
+    {
+    case SCM_M_BEGIN:
+      for (; !scm_is_null (CDR (mx)); mx = CDR (mx))
+        eval (CAR (mx), env);
+      x = CAR (mx);
+      goto loop;
+
+    case SCM_M_IF:
+      if (scm_is_true (eval (CAR (mx), env)))
+        x = CADR (mx);
       else
-       {
-         /* No user macro: return.  */
-         SCM_SETCAR (expr, new_car);
-         return expr;
-       }
-    }
-
-  return expr;
-}
+        x = CDDR (mx);
+      goto loop;
 
-/* This is a helper function for m_expand_body.  It determines if a given form
- * represents an application of a given built-in macro.  The built-in macro to
- * check for is identified by its syntactic keyword.  The form is an
- * application of the given macro if looking up the car of the form in the
- * given environment actually returns the built-in macro.  */
-static int
-is_system_macro_p (const SCM syntactic_keyword, const SCM form, const SCM env)
-{
-  if (scm_is_pair (form))
-    {
-      const SCM car_form = SCM_CAR (form);
-      const SCM value = try_macro_lookup (car_form, env);
-      if (SCM_BUILTIN_MACRO_P (value))
-        {
-          const SCM macro_name = scm_macro_name (value);
-          return scm_is_eq (macro_name, syntactic_keyword);
-        }
-    }
-
-  return 0;
-}
-
-static SCM
-macroexp (SCM x, SCM env)
-{
-  SCM res, proc, orig_sym;
-
-  /* Don't bother to produce error messages here.  We get them when we
-     eventually execute the code for real. */
-
- macro_tail:
-  orig_sym = SCM_CAR (x);
-  if (!scm_is_symbol (orig_sym))
-    return x;
-
-  {
-    SCM *proc_ptr = scm_lookupcar1 (x, env, 0);
-    if (proc_ptr == NULL)
+    case SCM_M_LET:
       {
-       /* We have lost the race. */
-       goto macro_tail;
+        SCM inits = CAR (mx);
+        SCM new_env = CAPTURE_ENV (env);
+        for (; scm_is_pair (inits); inits = CDR (inits))
+          new_env = scm_cons (eval (CAR (inits), env), new_env);
+        env = new_env;
+        x = CDR (mx);
+        goto loop;
       }
-    proc = *proc_ptr;
-  }
-  
-  /* Only handle memoizing macros.  `Acros' and `macros' are really
-     special forms and should not be evaluated here. */
-
-  if (!SCM_MACROP (proc)
-      || (SCM_MACRO_TYPE (proc) != 2 && !SCM_BUILTIN_MACRO_P (proc)))
-    return x;
-
-  SCM_SETCAR (x, orig_sym);  /* Undo memoizing effect of lookupcar */
-  res = scm_call_2 (SCM_MACRO_CODE (proc), x, env);
-
-  if (scm_ilength (res) <= 0)
-    /* Result of expansion is not a list.  */
-    return (scm_list_2 (SCM_IM_BEGIN, res));
-  else
-    {
-      /* njrev: Several queries here: (1) I don't see how it can be
-        correct that the SCM_SETCAR 2 lines below this comment needs
-        protection, but the SCM_SETCAR 6 lines above does not, so
-        something here is probably wrong.  (2) macroexp() is now only
-        used in one place - scm_m_generalized_set_x - whereas all other
-        macro expansion happens through expand_user_macros.  Therefore
-        (2.1) perhaps macroexp() could be eliminated completely now?
-        (2.2) Does expand_user_macros need any critical section
-        protection? */
-
-      SCM_CRITICAL_SECTION_START;
-      SCM_SETCAR (x, SCM_CAR (res));
-      SCM_SETCDR (x, SCM_CDR (res));
-      SCM_CRITICAL_SECTION_END;
+          
+    case SCM_M_LAMBDA:
+      return scm_closure (mx, CAPTURE_ENV (env));
 
-      goto macro_tail;
-    }
-}
-
-
-/* Start of the memoizers for the standard R5RS builtin macros.  */
-
-static SCM scm_m_quote (SCM xorig, SCM env);
-static SCM scm_m_begin (SCM xorig, SCM env);
-static SCM scm_m_if (SCM xorig, SCM env);
-static SCM scm_m_set_x (SCM xorig, SCM env);
-static SCM scm_m_and (SCM xorig, SCM env);
-static SCM scm_m_or (SCM xorig, SCM env);
-static SCM scm_m_case (SCM xorig, SCM env);
-static SCM scm_m_cond (SCM xorig, SCM env);
-static SCM scm_m_lambda (SCM xorig, SCM env);
-static SCM scm_m_letstar (SCM xorig, SCM env);
-static SCM scm_m_do (SCM xorig, SCM env);
-static SCM scm_m_quasiquote (SCM xorig, SCM env);
-static SCM scm_m_delay (SCM xorig, SCM env);
-static SCM scm_m_generalized_set_x (SCM xorig, SCM env);
-static SCM scm_m_define (SCM x, SCM env);
-static SCM scm_m_letrec (SCM xorig, SCM env);
-static SCM scm_m_let (SCM xorig, SCM env);
-static SCM scm_m_at (SCM xorig, SCM env);
-static SCM scm_m_atat (SCM xorig, SCM env);
-static SCM scm_m_atslot_ref (SCM xorig, SCM env);
-static SCM scm_m_atslot_set_x (SCM xorig, SCM env);
-static SCM scm_m_apply (SCM xorig, SCM env);
-static SCM scm_m_cont (SCM xorig, SCM env);
-#if SCM_ENABLE_ELISP
-static SCM scm_m_nil_cond (SCM xorig, SCM env);
-static SCM scm_m_atfop (SCM xorig, SCM env);
-#endif /* SCM_ENABLE_ELISP */
-static SCM scm_m_atbind (SCM xorig, SCM env);
-static SCM scm_m_at_call_with_values (SCM xorig, SCM env);
-static SCM scm_m_eval_when (SCM xorig, SCM env);
+    case SCM_M_QUOTE:
+      return mx;
 
+    case SCM_M_DEFINE:
+      scm_define (CAR (mx), eval (CDR (mx), env));
+      return SCM_UNSPECIFIED;
 
-static void
-m_expand_body (const SCM forms, const SCM env)
-{
-  /* The first body form can be skipped since it is known to be the ISYM that
-   * was prepended to the body by m_body.  */
-  SCM cdr_forms = SCM_CDR (forms);
-  SCM form_idx = cdr_forms;
-  SCM definitions = SCM_EOL;
-  SCM sequence = SCM_EOL;
-
-  /* According to R5RS, the list of body forms consists of two parts: a number
-   * (maybe zero) of definitions, followed by a non-empty sequence of
-   * expressions.  Each the definitions and the expressions may be grouped
-   * arbitrarily with begin, but it is not allowed to mix definitions and
-   * expressions.  The task of the following loop therefore is to split the
-   * list of body forms into the list of definitions and the sequence of
-   * expressions.  */ 
-  while (!scm_is_null (form_idx))
-    {
-      const SCM form = SCM_CAR (form_idx);
-      const SCM new_form = expand_user_macros (form, env);
-      if (is_system_macro_p (scm_sym_define, new_form, env))
-       {
-         definitions = scm_cons (new_form, definitions);
-         form_idx = SCM_CDR (form_idx);
-       }
-      else if (is_system_macro_p (scm_sym_begin, new_form, env))
-       {
-          /* We have encountered a group of forms.  This has to be either a
-           * (possibly empty) group of (possibly further grouped) definitions,
-           * or a non-empty group of (possibly further grouped)
-           * expressions.  */
-          const SCM grouped_forms = SCM_CDR (new_form);
-          unsigned int found_definition = 0;
-          unsigned int found_expression = 0;
-          SCM grouped_form_idx = grouped_forms;
-          while (!found_expression && !scm_is_null (grouped_form_idx))
-            {
-              const SCM inner_form = SCM_CAR (grouped_form_idx);
-              const SCM new_inner_form = expand_user_macros (inner_form, env);
-              if (is_system_macro_p (scm_sym_define, new_inner_form, env))
-                {
-                  found_definition = 1;
-                  definitions = scm_cons (new_inner_form, definitions);
-                  grouped_form_idx = SCM_CDR (grouped_form_idx);
-                }
-              else if (is_system_macro_p (scm_sym_begin, new_inner_form, env))
-                {
-                  const SCM inner_group = SCM_CDR (new_inner_form);
-                  grouped_form_idx
-                    = scm_append (scm_list_2 (inner_group,
-                                              SCM_CDR (grouped_form_idx)));
-                }
-              else
-                {
-                  /* The group marks the start of the expressions of the body.
-                   * We have to make sure that within the same group we have
-                   * not encountered a definition before.  */
-                  ASSERT_SYNTAX (!found_definition, s_mixed_body_forms, form);
-                  found_expression = 1;
-                  grouped_form_idx = SCM_EOL;
-                }
-            }
-
-          /* We have finished processing the group.  If we have not yet
-           * encountered an expression we continue processing the forms of the
-           * body to collect further definition forms.  Otherwise, the group
-           * marks the start of the sequence of expressions of the body.  */
-          if (!found_expression)
+    case SCM_M_APPLY:
+      /* Evaluate the procedure to be applied.  */
+      proc = eval (CAR (mx), env);
+      /* Evaluate the argument holding the list of arguments */
+      args = eval (CADR (mx), env);
+          
+    apply_proc:
+      /* Go here to tail-apply a procedure.  PROC is the procedure and
+       * ARGS is the list of arguments. */
+      if (SCM_CLOSUREP (proc))
+        {
+          int nreq = SCM_CLOSURE_NUM_REQUIRED_ARGS (proc);
+          SCM new_env = SCM_ENV (proc);
+          if (SCM_CLOSURE_HAS_REST_ARGS (proc))
             {
-              form_idx = SCM_CDR (form_idx);
+              if (SCM_UNLIKELY (scm_ilength (args) < nreq))
+                scm_wrong_num_args (proc);
+              for (; nreq; nreq--, args = CDR (args))
+                new_env = scm_cons (CAR (args), new_env);
+              new_env = scm_cons (args, new_env);
             }
           else
             {
-              sequence = form_idx;
-              form_idx = SCM_EOL;
+              if (SCM_UNLIKELY (scm_ilength (args) != nreq))
+                scm_wrong_num_args (proc);
+              for (; scm_is_pair (args); args = CDR (args))
+                new_env = scm_cons (CAR (args), new_env);
             }
-       }
-      else
-       {
-          /* We have detected a form which is no definition.  This marks the
-           * start of the sequence of expressions of the body.  */
-          sequence = form_idx;
-          form_idx = SCM_EOL;
-       }
-    }
-
-  /* FIXME: forms does not hold information about the file location.  */
-  ASSERT_SYNTAX (scm_is_pair (sequence), s_missing_body_expression, cdr_forms);
-
-  if (!scm_is_null (definitions))
-    {
-      SCM definition_idx;
-      SCM letrec_tail;
-      SCM letrec_expression;
-      SCM new_letrec_expression;
-
-      SCM bindings = SCM_EOL;
-      for (definition_idx = definitions;
-           !scm_is_null (definition_idx);
-           definition_idx = SCM_CDR (definition_idx))
-       {
-         const SCM definition = SCM_CAR (definition_idx);
-         const SCM canonical_definition = canonicalize_define (definition);
-         const SCM binding = SCM_CDR (canonical_definition);
-         bindings = scm_cons (binding, bindings);
-       };
-
-      letrec_tail = scm_cons (bindings, sequence);
-      /* FIXME: forms does not hold information about the file location.  */
-      letrec_expression = scm_cons_source (forms, scm_sym_letrec, letrec_tail);
-      new_letrec_expression = scm_m_letrec (letrec_expression, env);
-      SCM_SETCAR (forms, new_letrec_expression);
-      SCM_SETCDR (forms, SCM_EOL);
-    }
-  else
-    {
-      SCM_SETCAR (forms, SCM_CAR (sequence));
-      SCM_SETCDR (forms, SCM_CDR (sequence));
-    }
-}
-
-SCM_SYNTAX (s_and, "and", scm_i_makbimacro, scm_m_and);
-SCM_GLOBAL_SYMBOL (scm_sym_and, "and");
-
-static SCM
-scm_m_and (SCM expr, SCM env SCM_UNUSED)
-{
-  const SCM cdr_expr = SCM_CDR (expr);
-  const long length = scm_ilength (cdr_expr);
-
-  ASSERT_SYNTAX (length >= 0, s_bad_expression, expr);
-
-  if (length == 0)
-    {
-      /* Special case:  (and) is replaced by #t. */
-      return SCM_BOOL_T;
-    }
-  else
-    {
-      SCM_SETCAR (expr, SCM_IM_AND);
-      return expr;
-    }
-}
-
-static SCM
-unmemoize_and (const SCM expr, const SCM env)
-{
-  return scm_cons (scm_sym_and, unmemoize_exprs (SCM_CDR (expr), env));
-}
-
-
-SCM_SYNTAX (s_begin, "begin", scm_i_makbimacro, scm_m_begin);
-SCM_GLOBAL_SYMBOL (scm_sym_begin, "begin");
-
-static SCM
-scm_m_begin (SCM expr, SCM env SCM_UNUSED)
-{
-  const SCM cdr_expr = SCM_CDR (expr);
-  /* Dirk:FIXME:: An empty begin clause is not generally allowed by R5RS.
-   * That means, there should be a distinction between uses of begin where an
-   * empty clause is OK and where it is not.  */
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-
-  SCM_SETCAR (expr, SCM_IM_BEGIN);
-  return expr;
-}
-
-static SCM
-unmemoize_begin (const SCM expr, const SCM env)
-{
-  return scm_cons (scm_sym_begin, unmemoize_exprs (SCM_CDR (expr), env));
-}
-
-
-SCM_SYNTAX (s_case, "case", scm_i_makbimacro, scm_m_case);
-SCM_GLOBAL_SYMBOL (scm_sym_case, "case");
-SCM_GLOBAL_SYMBOL (scm_sym_else, "else");
-
-static SCM
-scm_m_case (SCM expr, SCM env)
-{
-  SCM clauses;
-  SCM all_labels = SCM_EOL;
-
-  /* Check, whether 'else is a literal, i. e. not bound to a value. */
-  const int else_literal_p = literal_p (scm_sym_else, env);
-
-  const SCM cdr_expr = SCM_CDR (expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 2, s_missing_clauses, expr);
-
-  clauses = SCM_CDR (cdr_expr);
-  while (!scm_is_null (clauses))
-    {
-      SCM labels;
-
-      const SCM clause = SCM_CAR (clauses);
-      ASSERT_SYNTAX_2 (scm_ilength (clause) >= 2, 
-                      s_bad_case_clause, clause, expr);
-
-      labels = SCM_CAR (clause);
-      if (scm_is_pair (labels))
-        {
-          ASSERT_SYNTAX_2 (scm_ilength (labels) >= 0,
-                           s_bad_case_labels, labels, expr);
-          all_labels = scm_append (scm_list_2 (labels, all_labels));
-        }
-      else if (scm_is_null (labels))
-        {
-          /* The list of labels is empty.  According to R5RS this is allowed.
-           * It means that the sequence of expressions will never be executed.
-           * Therefore, as an optimization, we could remove the whole
-           * clause.  */
+          x = SCM_CLOSURE_BODY (proc);
+          env = new_env;
+          goto loop;
         }
       else
-        {
-          ASSERT_SYNTAX_2 (scm_is_eq (labels, scm_sym_else) && else_literal_p,
-                           s_bad_case_labels, labels, expr);
-          ASSERT_SYNTAX_2 (scm_is_null (SCM_CDR (clauses)),
-                           s_misplaced_else_clause, clause, expr);
-        }
+        return scm_vm_apply (scm_the_vm (), proc, args);
 
-      /* build the new clause */
-      if (scm_is_eq (labels, scm_sym_else))
-        SCM_SETCAR (clause, SCM_IM_ELSE);
+    case SCM_M_CALL:
+      /* Evaluate the procedure to be applied.  */
+      proc = eval (CAR (mx), env);
+          
+      mx = CDR (mx);
 
-      clauses = SCM_CDR (clauses);
-    }
-
-  /* Check whether all case labels are distinct. */
-  for (; !scm_is_null (all_labels); all_labels = SCM_CDR (all_labels))
-    {
-      const SCM label = SCM_CAR (all_labels);
-      ASSERT_SYNTAX_2 (scm_is_false (scm_c_memq (label, SCM_CDR (all_labels))),
-                       s_duplicate_case_label, label, expr);
-    }
-
-  SCM_SETCAR (expr, SCM_IM_CASE);
-  return expr;
-}
-
-static SCM
-unmemoize_case (const SCM expr, const SCM env)
-{
-  const SCM um_key_expr = unmemoize_expression (SCM_CADR (expr), env);
-  SCM um_clauses = SCM_EOL;
-  SCM clause_idx;
-
-  for (clause_idx = SCM_CDDR (expr);
-       !scm_is_null (clause_idx);
-       clause_idx = SCM_CDR (clause_idx))
-    {
-      const SCM clause = SCM_CAR (clause_idx);
-      const SCM labels = SCM_CAR (clause);
-      const SCM exprs = SCM_CDR (clause);
-
-      const SCM um_exprs = unmemoize_exprs (exprs, env);
-      const SCM um_labels = (scm_is_eq (labels, SCM_IM_ELSE))
-        ? scm_sym_else
-        : scm_i_finite_list_copy (labels);
-      const SCM um_clause = scm_cons (um_labels, um_exprs);
-
-      um_clauses = scm_cons (um_clause, um_clauses);
-    }
-  um_clauses = scm_reverse_x (um_clauses, SCM_UNDEFINED);
-
-  return scm_cons2 (scm_sym_case, um_key_expr, um_clauses);
-}
-
-
-SCM_SYNTAX (s_cond, "cond", scm_i_makbimacro, scm_m_cond);
-SCM_GLOBAL_SYMBOL (scm_sym_cond, "cond");
-SCM_GLOBAL_SYMBOL (scm_sym_arrow, "=>");
-
-static SCM
-scm_m_cond (SCM expr, SCM env)
-{
-  /* Check, whether 'else or '=> is a literal, i. e. not bound to a value. */
-  const int else_literal_p = literal_p (scm_sym_else, env);
-  const int arrow_literal_p = literal_p (scm_sym_arrow, env);
-
-  const SCM clauses = SCM_CDR (expr);
-  SCM clause_idx;
-
-  ASSERT_SYNTAX (scm_ilength (clauses) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (clauses) >= 1, s_missing_clauses, expr);
-
-  for (clause_idx = clauses;
-       !scm_is_null (clause_idx);
-       clause_idx = SCM_CDR (clause_idx))
-    {
-      SCM test;
-
-      const SCM clause = SCM_CAR (clause_idx);
-      const long length = scm_ilength (clause);
-      ASSERT_SYNTAX_2 (length >= 1, s_bad_cond_clause, clause, expr);
-
-      test = SCM_CAR (clause);
-      if (scm_is_eq (test, scm_sym_else) && else_literal_p)
-       {
-         const int last_clause_p = scm_is_null (SCM_CDR (clause_idx));
-          ASSERT_SYNTAX_2 (length >= 2,
-                           s_bad_cond_clause, clause, expr);
-          ASSERT_SYNTAX_2 (last_clause_p,
-                           s_misplaced_else_clause, clause, expr);
-          SCM_SETCAR (clause, SCM_IM_ELSE);
-       }
-      else if (length >= 2
-               && scm_is_eq (SCM_CADR (clause), scm_sym_arrow)
-               && arrow_literal_p)
+      if (SCM_CLOSUREP (proc))
         {
-          ASSERT_SYNTAX_2 (length > 2, s_missing_recipient, clause, expr);
-          ASSERT_SYNTAX_2 (length == 3, s_extra_expression, clause, expr);
-          SCM_SETCAR (SCM_CDR (clause), SCM_IM_ARROW);
-       }
-      /* SRFI 61 extended cond */
-      else if (length >= 3
-              && scm_is_eq (SCM_CADDR (clause), scm_sym_arrow)
-              && arrow_literal_p)
-       {
-         ASSERT_SYNTAX_2 (length > 3, s_missing_recipient, clause, expr);
-         ASSERT_SYNTAX_2 (length == 4, s_extra_expression, clause, expr);
-         SCM_SETCAR (SCM_CDDR (clause), SCM_IM_ARROW);
-       }
-    }
-
-  SCM_SETCAR (expr, SCM_IM_COND);
-  return expr;
-}
-
-static SCM
-unmemoize_cond (const SCM expr, const SCM env)
-{
-  SCM um_clauses = SCM_EOL;
-  SCM clause_idx;
-
-  for (clause_idx = SCM_CDR (expr);
-       !scm_is_null (clause_idx);
-       clause_idx = SCM_CDR (clause_idx))
-    {
-      const SCM clause = SCM_CAR (clause_idx);
-      const SCM sequence = SCM_CDR (clause);
-      const SCM test = SCM_CAR (clause);
-      SCM um_test;
-      SCM um_sequence;
-      SCM um_clause;
-
-      if (scm_is_eq (test, SCM_IM_ELSE))
-        um_test = scm_sym_else;
-      else
-        um_test = unmemoize_expression (test, env);
-
-      if (!scm_is_null (sequence) && scm_is_eq (SCM_CAR (sequence),
-                                             SCM_IM_ARROW))
-        {
-          const SCM target = SCM_CADR (sequence);
-          const SCM um_target = unmemoize_expression (target, env);
-          um_sequence = scm_list_2 (scm_sym_arrow, um_target);
+          int nreq = SCM_CLOSURE_NUM_REQUIRED_ARGS (proc);
+          SCM new_env = SCM_ENV (proc);
+          if (SCM_CLOSURE_HAS_REST_ARGS (proc))
+            {
+              if (SCM_UNLIKELY (scm_ilength (mx) < nreq))
+                scm_wrong_num_args (proc);
+              for (; nreq; nreq--, mx = CDR (mx))
+                new_env = scm_cons (eval (CAR (mx), env), new_env);
+              {
+                SCM rest = SCM_EOL;
+                for (; scm_is_pair (mx); mx = CDR (mx))
+                  rest = scm_cons (eval (CAR (mx), env), rest);
+                new_env = scm_cons (scm_reverse (rest),
+                                    new_env);
+              }
+            }
+          else
+            {
+              for (; scm_is_pair (mx); mx = CDR (mx), nreq--)
+                new_env = scm_cons (eval (CAR (mx), env), new_env);
+              if (SCM_UNLIKELY (nreq != 0))
+                scm_wrong_num_args (proc);
+            }
+          x = SCM_CLOSURE_BODY (proc);
+          env = new_env;
+          goto loop;
         }
       else
         {
-          um_sequence = unmemoize_exprs (sequence, env);
+          SCM rest = SCM_EOL;
+          for (; scm_is_pair (mx); mx = CDR (mx))
+            rest = scm_cons (eval (CAR (mx), env), rest);
+          return scm_vm_apply (scm_the_vm (), proc, scm_reverse (rest));
         }
-
-      um_clause = scm_cons (um_test, um_sequence);
-      um_clauses = scm_cons (um_clause, um_clauses);
-    }
-  um_clauses = scm_reverse_x (um_clauses, SCM_UNDEFINED);
-
-  return scm_cons (scm_sym_cond, um_clauses);
-}
-
-
-SCM_SYNTAX (s_define, "define", scm_i_makbimacro, scm_m_define);
-SCM_GLOBAL_SYMBOL (scm_sym_define, "define");
-
-/* Guile provides an extension to R5RS' define syntax to represent function
- * currying in a compact way.  With this extension, it is allowed to write
- * (define <nested-variable> <body>), where <nested-variable> has of one of
- * the forms (<nested-variable> <formals>), (<nested-variable> . <formal>),  
- * (<variable> <formals>) or (<variable> . <formal>).  As in R5RS, <formals>
- * should be either a sequence of zero or more variables, or a sequence of one
- * or more variables followed by a space-delimited period and another
- * variable.  Each level of argument nesting wraps the <body> within another
- * lambda expression.  For example, the following forms are allowed, each one
- * followed by an equivalent, more explicit implementation.
- * Example 1:
- *   (define ((a b . c) . d) <body>)  is equivalent to
- *   (define a (lambda (b . c) (lambda d <body>)))
- * Example 2:
- *   (define (((a) b) c . d) <body>)  is equivalent to
- *   (define a (lambda () (lambda (b) (lambda (c . d) <body>))))
- */
-/* Dirk:FIXME:: We should provide an implementation for 'define' in the R5RS
- * module that does not implement this extension.  */
-static SCM
-canonicalize_define (const SCM expr)
-{
-  SCM body;
-  SCM variable;
-
-  const SCM cdr_expr = SCM_CDR (expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 2, s_missing_expression, expr);
-
-  body = SCM_CDR (cdr_expr);
-  variable = SCM_CAR (cdr_expr);
-  while (scm_is_pair (variable))
-    {
-      /* This while loop realizes function currying by variable nesting.
-       * Variable is known to be a nested-variable.  In every iteration of the
-       * loop another level of lambda expression is created, starting with the
-       * innermost one.  Note that we don't check for duplicate formals here:
-       * This will be done by the memoizer of the lambda expression.  */
-      const SCM formals = SCM_CDR (variable);
-      const SCM tail = scm_cons (formals, body);
-
-      /* Add source properties to each new lambda expression:  */
-      const SCM lambda = scm_cons_source (variable, scm_sym_lambda, tail);
-
-      body = scm_list_1 (lambda);
-      variable = SCM_CAR (variable);
-    }
-  ASSERT_SYNTAX_2 (scm_is_symbol (variable), s_bad_variable, variable, expr);
-  ASSERT_SYNTAX (scm_ilength (body) == 1, s_expression, expr);
-
-  SCM_SETCAR (cdr_expr, variable);
-  SCM_SETCDR (cdr_expr, body);
-  return expr;
-}
-
-/* According to Section 5.2.1 of R5RS we first have to make sure that the
-   variable is bound, and then perform the `(set! variable expression)'
-   operation.  However, EXPRESSION _can_ be evaluated before VARIABLE is
-   bound.  This means that EXPRESSION won't necessarily be able to assign
-   values to VARIABLE as in `(define foo (begin (set! foo 1) (+ foo 1)))'.  */
-static SCM
-scm_m_define (SCM expr, SCM env)
-{
-  ASSERT_SYNTAX (SCM_TOP_LEVEL (env), s_bad_define, expr);
-
-  {
-    const SCM canonical_definition = canonicalize_define (expr);
-    const SCM cdr_canonical_definition = SCM_CDR (canonical_definition);
-    const SCM variable = SCM_CAR (cdr_canonical_definition);
-    const SCM value = scm_eval_car (SCM_CDR (cdr_canonical_definition), env);
-    const SCM location
-      = scm_sym2var (variable, scm_env_top_level (env), SCM_BOOL_T);
-
-    if (SCM_REC_PROCNAMES_P)
+          
+    case SCM_M_CONT:
       {
-        SCM tmp = value;
-        while (SCM_MACROP (tmp))
-          tmp = SCM_MACRO_CODE (tmp);
-        if (scm_is_true (scm_procedure_p (tmp))
-            /* Only the first definition determines the name. */
-            && scm_is_false (scm_procedure_property (tmp, scm_sym_name)))
-          scm_set_procedure_property_x (tmp, scm_sym_name, variable);
+        int first;
+        SCM val = scm_make_continuation (&first);
+
+        if (!first)
+          return val;
+        else
+          {
+            proc = eval (mx, env);
+            args = scm_list_1 (val);
+            goto apply_proc;
+          }
       }
 
-    SCM_VARIABLE_SET (location, value);
-
-    return SCM_UNSPECIFIED;
-  }
-}
-
-
-/* This is a helper function for forms (<keyword> <expression>) that are
- * transformed into (#@<keyword> '() <memoized_expression>) in order to allow
- * for easy creation of a thunk (i. e. a closure without arguments) using the
- * ('() <memoized_expression>) tail of the memoized form.  */
-static SCM
-memoize_as_thunk_prototype (const SCM expr, const SCM env SCM_UNUSED)
-{
-  const SCM cdr_expr = SCM_CDR (expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) == 1, s_expression, expr);
-
-  SCM_SETCDR (expr, scm_cons (SCM_EOL, cdr_expr));
-
-  return expr;
-}
-
-
-SCM_SYNTAX (s_delay, "delay", scm_i_makbimacro, scm_m_delay);
-SCM_GLOBAL_SYMBOL (scm_sym_delay, "delay");
-
-/* Promises are implemented as closures with an empty parameter list.  Thus,
- * (delay <expression>) is transformed into (address@hidden '() <expression>), 
where
- * the empty list represents the empty parameter list.  This representation
- * allows for easy creation of the closure during evaluation.  */
-static SCM
-scm_m_delay (SCM expr, SCM env)
-{
-  const SCM new_expr = memoize_as_thunk_prototype (expr, env);
-  SCM_SETCAR (new_expr, SCM_IM_DELAY);
-  return new_expr;
-}
-
-static SCM
-unmemoize_delay (const SCM expr, const SCM env)
-{
-  const SCM thunk_expr = SCM_CADDR (expr);
-  /* A promise is implemented as a closure, and when applying a
-     closure the evaluator adds a new frame to the environment - even
-     though, in the case of a promise, the added frame is always
-     empty.  We need to extend the environment here in the same way,
-     so that any ILOCs in thunk_expr can be unmemoized correctly. */
-  const SCM new_env = SCM_EXTEND_ENV (SCM_EOL, SCM_EOL, env);
-  return scm_list_2 (scm_sym_delay, unmemoize_expression (thunk_expr, 
new_env));
-}
-
-
-SCM_SYNTAX(s_do, "do", scm_i_makbimacro, scm_m_do);
-SCM_GLOBAL_SYMBOL(scm_sym_do, "do");
-
-/* DO gets the most radically altered syntax.  The order of the vars is
- * reversed here.  During the evaluation this allows for simple consing of the
- * results of the inits and steps:
-
-   (do ((<var1> <init1> <step1>)
-        (<var2> <init2>)
-        ... )
-       (<test> <return>)
-     <body>)
-
-   ;; becomes
-
-   (address@hidden (<init1> <init2> ... <initn>)
-         (varn ... var2 var1)
-         (<test> <return>)
-         (<body>)
-     <step1> <step2> ... <stepn>) ;; missing steps replaced by var
- */
-static SCM
-scm_m_do (SCM expr, SCM env SCM_UNUSED)
-{
-  SCM variables = SCM_EOL;
-  SCM init_forms = SCM_EOL;
-  SCM step_forms = SCM_EOL;
-  SCM binding_idx;
-  SCM cddr_expr;
-  SCM exit_clause;
-  SCM commands;
-  SCM tail;
-
-  const SCM cdr_expr = SCM_CDR (expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 2, s_missing_expression, expr);
-
-  /* Collect variables, init and step forms. */
-  binding_idx = SCM_CAR (cdr_expr);
-  ASSERT_SYNTAX_2 (scm_ilength (binding_idx) >= 0,
-                   s_bad_bindings, binding_idx, expr);
-  for (; !scm_is_null (binding_idx); binding_idx = SCM_CDR (binding_idx))
-    {
-      const SCM binding = SCM_CAR (binding_idx);
-      const long length = scm_ilength (binding);
-      ASSERT_SYNTAX_2 (length == 2 || length == 3,
-                       s_bad_binding, binding, expr);
-
+    case SCM_M_CALL_WITH_VALUES:
       {
-        const SCM name = SCM_CAR (binding);
-        const SCM init = SCM_CADR (binding);
-        const SCM step = (length == 2) ? name : SCM_CADDR (binding);
-        ASSERT_SYNTAX_2 (scm_is_symbol (name), s_bad_variable, name, expr);
-        ASSERT_SYNTAX_2 (scm_is_false (scm_c_memq (name, variables)),
-                         s_duplicate_binding, name, expr);
-
-        variables = scm_cons (name, variables);
-        init_forms = scm_cons (init, init_forms);
-        step_forms = scm_cons (step, step_forms);
+        SCM producer;
+        SCM v;
+
+        producer = eval (CAR (mx), env);
+        proc = eval (CDR (mx), env);  /* proc is the consumer. */
+        v = scm_vm_apply (scm_the_vm (), producer, SCM_EOL);
+        if (SCM_VALUESP (v))
+          args = scm_struct_ref (v, SCM_INUM0);
+        else
+          args = scm_list_1 (v);
+        goto apply_proc;
       }
-    }
-  init_forms = scm_reverse_x (init_forms, SCM_UNDEFINED);
-  step_forms = scm_reverse_x (step_forms, SCM_UNDEFINED);
-
-  /* Memoize the test form and the exit sequence. */
-  cddr_expr = SCM_CDR (cdr_expr);
-  exit_clause = SCM_CAR (cddr_expr);
-  ASSERT_SYNTAX_2 (scm_ilength (exit_clause) >= 1,
-                   s_bad_exit_clause, exit_clause, expr);
-
-  commands = SCM_CDR (cddr_expr);
-  tail = scm_cons2 (exit_clause, commands, step_forms);
-  tail = scm_cons2 (init_forms, variables, tail);
-  SCM_SETCAR (expr, SCM_IM_DO);
-  SCM_SETCDR (expr, tail);
-  return expr;
-}
-
-static SCM
-unmemoize_do (const SCM expr, const SCM env)
-{
-  const SCM cdr_expr = SCM_CDR (expr);
-  const SCM cddr_expr = SCM_CDR (cdr_expr);
-  const SCM rnames = SCM_CAR (cddr_expr);
-  const SCM extended_env = SCM_EXTEND_ENV (rnames, SCM_EOL, env);
-  const SCM cdddr_expr = SCM_CDR (cddr_expr);
-  const SCM exit_sequence = SCM_CAR (cdddr_expr);
-  const SCM um_exit_sequence = unmemoize_exprs (exit_sequence, extended_env);
-  const SCM cddddr_expr = SCM_CDR (cdddr_expr);
-  const SCM um_body = unmemoize_exprs (SCM_CAR (cddddr_expr), extended_env);
-
-  /* build transformed binding list */
-  SCM um_names = scm_reverse (rnames);
-  SCM um_inits = unmemoize_exprs (SCM_CAR (cdr_expr), env);
-  SCM um_steps = unmemoize_exprs (SCM_CDR (cddddr_expr), extended_env);
-  SCM um_bindings = SCM_EOL;
-  while (!scm_is_null (um_names))
-    {
-      const SCM name = SCM_CAR (um_names);
-      const SCM init = SCM_CAR (um_inits);
-      SCM step = SCM_CAR (um_steps);
-      step = scm_is_eq (step, name) ? SCM_EOL : scm_list_1 (step);
-
-      um_bindings = scm_cons (scm_cons2 (name, init, step), um_bindings);
-
-      um_names = SCM_CDR (um_names);
-      um_inits = SCM_CDR (um_inits);
-      um_steps = SCM_CDR (um_steps);
-    }
-  um_bindings = scm_reverse_x (um_bindings, SCM_UNDEFINED);
-
-  return scm_cons (scm_sym_do,
-                   scm_cons2 (um_bindings, um_exit_sequence, um_body));
-}
-
-
-SCM_SYNTAX (s_if, "if", scm_i_makbimacro, scm_m_if);
-SCM_GLOBAL_SYMBOL (scm_sym_if, "if");
-
-static SCM
-scm_m_if (SCM expr, SCM env SCM_UNUSED)
-{
-  const SCM cdr_expr = SCM_CDR (expr);
-  const long length = scm_ilength (cdr_expr);
-  ASSERT_SYNTAX (length == 2 || length == 3, s_expression, expr);
-  SCM_SETCAR (expr, SCM_IM_IF);
-  return expr;
-}
-
-static SCM
-unmemoize_if (const SCM expr, const SCM env)
-{
-  const SCM cdr_expr = SCM_CDR (expr);
-  const SCM um_condition = unmemoize_expression (SCM_CAR (cdr_expr), env);
-  const SCM cddr_expr = SCM_CDR (cdr_expr);
-  const SCM um_then = unmemoize_expression (SCM_CAR (cddr_expr), env);
-  const SCM cdddr_expr = SCM_CDR (cddr_expr);
-
-  if (scm_is_null (cdddr_expr))
-    {
-      return scm_list_3 (scm_sym_if, um_condition, um_then);
-    }
-  else
-    {
-      const SCM um_else = unmemoize_expression (SCM_CAR (cdddr_expr), env);
-      return scm_list_4 (scm_sym_if, um_condition, um_then, um_else);
-    }
-}
-
-
-SCM_SYNTAX (s_lambda, "lambda", scm_i_makbimacro, scm_m_lambda);
-SCM_GLOBAL_SYMBOL (scm_sym_lambda, "lambda");
-
-/* A helper function for memoize_lambda to support checking for duplicate
- * formal arguments: Return true if OBJ is `eq?' to one of the elements of
- * LIST or to the cdr of the last cons.  Therefore, LIST may have any of the
- * forms that a formal argument can have:
- *   <rest>, (<arg1> ...), (<arg1> ...  .  <rest>) */
-static int
-c_improper_memq (SCM obj, SCM list)
-{
-  for (; scm_is_pair (list); list = SCM_CDR (list))
-    {
-      if (scm_is_eq (SCM_CAR (list), obj))
-        return 1;
-    }
-  return scm_is_eq (list, obj);
-}
-
-static SCM
-scm_m_lambda (SCM expr, SCM env SCM_UNUSED)
-{
-  SCM formals;
-  SCM formals_idx;
-  SCM cddr_expr;
-  int documentation;
-  SCM body;
-  SCM new_body;
-
-  const SCM cdr_expr = SCM_CDR (expr);
-  const long length = scm_ilength (cdr_expr);
-  ASSERT_SYNTAX (length >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (length >= 2, s_missing_expression, expr);
-
-  /* Before iterating the list of formal arguments, make sure the formals
-   * actually are given as either a symbol or a non-cyclic list.  */
-  formals = SCM_CAR (cdr_expr);
-  if (scm_is_pair (formals))
-    {
-      /* Dirk:FIXME:: We should check for a cyclic list of formals, and if
-       * detected, report a 'Bad formals' error.  */
-    }
-  else
-    {
-      ASSERT_SYNTAX_2 (scm_is_symbol (formals) || scm_is_null (formals),
-                       s_bad_formals, formals, expr);
-    }
-
-  /* Now iterate the list of formal arguments to check if all formals are
-   * symbols, and that there are no duplicates.  */
-  formals_idx = formals;
-  while (scm_is_pair (formals_idx))
-    {
-      const SCM formal = SCM_CAR (formals_idx);
-      const SCM next_idx = SCM_CDR (formals_idx);
-      ASSERT_SYNTAX_2 (scm_is_symbol (formal), s_bad_formal, formal, expr);
-      ASSERT_SYNTAX_2 (!c_improper_memq (formal, next_idx),
-                       s_duplicate_formal, formal, expr);
-      formals_idx = next_idx;
-    }
-  ASSERT_SYNTAX_2 (scm_is_null (formals_idx) || scm_is_symbol (formals_idx),
-                   s_bad_formal, formals_idx, expr);
-
-  /* Memoize the body.  Keep a potential documentation string.  */
-  /* Dirk:FIXME:: We should probably extract the documentation string to
-   * some external database.  Otherwise it will slow down execution, since
-   * the documentation string will have to be skipped with every execution
-   * of the closure.  */
-  cddr_expr = SCM_CDR (cdr_expr);
-  documentation = (length >= 3 && scm_is_string (SCM_CAR (cddr_expr)));
-  body = documentation ? SCM_CDR (cddr_expr) : cddr_expr;
-  new_body = m_body (SCM_IM_LAMBDA, body);
-
-  SCM_SETCAR (expr, SCM_IM_LAMBDA);
-  if (documentation)
-    SCM_SETCDR (cddr_expr, new_body);
-  else
-    SCM_SETCDR (cdr_expr, new_body);
-  return expr;
-}
-
-static SCM
-unmemoize_lambda (const SCM expr, const SCM env)
-{
-  const SCM formals = SCM_CADR (expr);
-  const SCM body = SCM_CDDR (expr);
-
-  const SCM new_env = SCM_EXTEND_ENV (formals, SCM_EOL, env);
-  const SCM um_formals = scm_i_finite_list_copy (formals);
-  const SCM um_body = unmemoize_exprs (body, new_env);
-
-  return scm_cons2 (scm_sym_lambda, um_formals, um_body);
-}
-
-
-/* Check if the format of the bindings is ((<symbol> <init-form>) ...).  */
-static void
-check_bindings (const SCM bindings, const SCM expr)
-{
-  SCM binding_idx;
-
-  ASSERT_SYNTAX_2 (scm_ilength (bindings) >= 0,
-                   s_bad_bindings, bindings, expr);
-
-  binding_idx = bindings;
-  for (; !scm_is_null (binding_idx); binding_idx = SCM_CDR (binding_idx))
-    {
-      SCM name;         /* const */
-
-      const SCM binding = SCM_CAR (binding_idx);
-      ASSERT_SYNTAX_2 (scm_ilength (binding) == 2,
-                       s_bad_binding, binding, expr);
-
-      name = SCM_CAR (binding);
-      ASSERT_SYNTAX_2 (scm_is_symbol (name), s_bad_variable, name, expr);
-    }
-}
-
-
-/* The bindings, which must have the format ((v1 i1) (v2 i2) ... (vn in)), are
- * transformed to the lists (vn ... v2 v1) and (i1 i2 ... in).  That is, the
- * variables are returned in a list with their order reversed, and the init
- * forms are returned in a list in the same order as they are given in the
- * bindings.  If a duplicate variable name is detected, an error is
- * signalled.  */
-static void
-transform_bindings (
-  const SCM bindings, const SCM expr,
-  SCM *const rvarptr, SCM *const initptr )
-{
-  SCM rvariables = SCM_EOL;
-  SCM rinits = SCM_EOL;
-  SCM binding_idx = bindings;
-  for (; !scm_is_null (binding_idx); binding_idx = SCM_CDR (binding_idx))
-    {
-      const SCM binding = SCM_CAR (binding_idx);
-      const SCM cdr_binding = SCM_CDR (binding);
-      const SCM name = SCM_CAR (binding);
-      ASSERT_SYNTAX_2 (scm_is_false (scm_c_memq (name, rvariables)),
-                       s_duplicate_binding, name, expr);
-      rvariables = scm_cons (name, rvariables);
-      rinits = scm_cons (SCM_CAR (cdr_binding), rinits);
-    }
-  *rvarptr = rvariables;
-  *initptr = scm_reverse_x (rinits, SCM_UNDEFINED);
-}
-
-
-SCM_SYNTAX(s_let, "let", scm_i_makbimacro, scm_m_let);
-SCM_GLOBAL_SYMBOL(scm_sym_let, "let");
-
-/* This function is a helper function for memoize_let.  It transforms
- * (let name ((var init) ...) body ...) into
- * ((letrec ((name (lambda (var ...) body ...))) name) init ...)
- * and memoizes the expression.  It is assumed that the caller has checked
- * that name is a symbol and that there are bindings and a body.  */
-static SCM
-memoize_named_let (const SCM expr, const SCM env SCM_UNUSED)
-{
-  SCM rvariables;
-  SCM variables;
-  SCM inits;
-
-  const SCM cdr_expr = SCM_CDR (expr);
-  const SCM name = SCM_CAR (cdr_expr);
-  const SCM cddr_expr = SCM_CDR (cdr_expr);
-  const SCM bindings = SCM_CAR (cddr_expr);
-  check_bindings (bindings, expr);
-
-  transform_bindings (bindings, expr, &rvariables, &inits);
-  variables = scm_reverse_x (rvariables, SCM_UNDEFINED);
-
-  {
-    const SCM let_body = SCM_CDR (cddr_expr);
-    const SCM lambda_body = m_body (SCM_IM_LET, let_body);
-    const SCM lambda_tail = scm_cons (variables, lambda_body);
-    const SCM lambda_form = scm_cons_source (expr, scm_sym_lambda, 
lambda_tail);
-
-    const SCM rvar = scm_list_1 (name);
-    const SCM init = scm_list_1 (lambda_form);
-    const SCM body = m_body (SCM_IM_LET, scm_list_1 (name));
-    const SCM letrec_tail = scm_cons (rvar, scm_cons (init, body));
-    const SCM letrec_form = scm_cons_source (expr, SCM_IM_LETREC, letrec_tail);
-    return scm_cons_source (expr, letrec_form, inits);
-  }
-}
-
-/* (let ((v1 i1) (v2 i2) ...) body) with variables v1 .. vn and initializers
- * i1 .. in is transformed to (address@hidden (vn ... v2 v1) (i1 i2 ...) 
body).  */
-static SCM
-scm_m_let (SCM expr, SCM env)
-{
-  SCM bindings;
-
-  const SCM cdr_expr = SCM_CDR (expr);
-  const long length = scm_ilength (cdr_expr);
-  ASSERT_SYNTAX (length >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (length >= 2, s_missing_expression, expr);
-
-  bindings = SCM_CAR (cdr_expr);
-  if (scm_is_symbol (bindings))
-    {
-      ASSERT_SYNTAX (length >= 3, s_missing_expression, expr);
-      return memoize_named_let (expr, env);
-    }
-
-  check_bindings (bindings, expr);
-  if (scm_is_null (bindings) || scm_is_null (SCM_CDR (bindings)))
-    {
-      /* Special case: no bindings or single binding => let* is faster. */
-      const SCM body = m_body (SCM_IM_LET, SCM_CDR (cdr_expr));
-      return scm_m_letstar (scm_cons2 (SCM_CAR (expr), bindings, body), env);
-    }
-  else
-    {
-      /* plain let */
-      SCM rvariables;
-      SCM inits;
-      transform_bindings (bindings, expr, &rvariables, &inits);
 
+    case SCM_M_LEXICAL_REF:
       {
-        const SCM new_body = m_body (SCM_IM_LET, SCM_CDR (cdr_expr));
-        const SCM new_tail = scm_cons2 (rvariables, inits, new_body);
-        SCM_SETCAR (expr, SCM_IM_LET);
-        SCM_SETCDR (expr, new_tail);
-        return expr;
+        int n;
+        SCM ret;
+        for (n = SCM_I_INUM (mx); n; n--)
+          env = CDR (env);
+        ret = CAR (env);
+        if (SCM_UNLIKELY (SCM_UNBNDP (ret)))
+          /* we don't know what variable, though, because we don't have its
+             name */
+          error_used_before_defined ();
+        return ret;
       }
-    }
-}
-
-static SCM
-build_binding_list (SCM rnames, SCM rinits)
-{
-  SCM bindings = SCM_EOL;
-  while (!scm_is_null (rnames))
-    {
-      const SCM binding = scm_list_2 (SCM_CAR (rnames), SCM_CAR (rinits));
-      bindings = scm_cons (binding, bindings);
-      rnames = SCM_CDR (rnames);
-      rinits = SCM_CDR (rinits);
-    }
-  return bindings;
-}
 
-static SCM
-unmemoize_let (const SCM expr, const SCM env)
-{
-  const SCM cdr_expr = SCM_CDR (expr);
-  const SCM um_rnames = SCM_CAR (cdr_expr);
-  const SCM extended_env = SCM_EXTEND_ENV (um_rnames, SCM_EOL, env);
-  const SCM cddr_expr = SCM_CDR (cdr_expr);
-  const SCM um_inits = unmemoize_exprs (SCM_CAR (cddr_expr), env);
-  const SCM um_rinits = scm_reverse_x (um_inits, SCM_UNDEFINED);
-  const SCM um_bindings = build_binding_list (um_rnames, um_rinits);
-  const SCM um_body = unmemoize_exprs (SCM_CDR (cddr_expr), extended_env);
-
-  return scm_cons2 (scm_sym_let, um_bindings, um_body);
-}
-
-
-SCM_SYNTAX(s_letrec, "letrec", scm_i_makbimacro, scm_m_letrec);
-SCM_GLOBAL_SYMBOL(scm_sym_letrec, "letrec");
-
-static SCM
-scm_m_letrec (SCM expr, SCM env)
-{
-  SCM bindings;
-
-  const SCM cdr_expr = SCM_CDR (expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 2, s_missing_expression, expr);
-
-  bindings = SCM_CAR (cdr_expr);
-  if (scm_is_null (bindings))
-    {
-      /* no bindings, let* is executed faster */
-      SCM body = m_body (SCM_IM_LETREC, SCM_CDR (cdr_expr));
-      return scm_m_letstar (scm_cons2 (SCM_CAR (expr), SCM_EOL, body), env);
-    }
-  else
-    {
-      SCM rvariables;
-      SCM inits;
-      SCM new_body;
-
-      check_bindings (bindings, expr);
-      transform_bindings (bindings, expr, &rvariables, &inits);
-      new_body = m_body (SCM_IM_LETREC, SCM_CDR (cdr_expr));
-      return scm_cons2 (SCM_IM_LETREC, rvariables, scm_cons (inits, new_body));
-    }
-}
-
-static SCM
-unmemoize_letrec (const SCM expr, const SCM env)
-{
-  const SCM cdr_expr = SCM_CDR (expr);
-  const SCM um_rnames = SCM_CAR (cdr_expr);
-  const SCM extended_env = SCM_EXTEND_ENV (um_rnames, SCM_EOL, env);
-  const SCM cddr_expr = SCM_CDR (cdr_expr);
-  const SCM um_inits = unmemoize_exprs (SCM_CAR (cddr_expr), extended_env);
-  const SCM um_rinits = scm_reverse_x (um_inits, SCM_UNDEFINED);
-  const SCM um_bindings = build_binding_list (um_rnames, um_rinits);
-  const SCM um_body = unmemoize_exprs (SCM_CDR (cddr_expr), extended_env);
-
-  return scm_cons2 (scm_sym_letrec, um_bindings, um_body);
-}
-
-
-
-SCM_SYNTAX (s_letstar, "let*", scm_i_makbimacro, scm_m_letstar);
-SCM_GLOBAL_SYMBOL (scm_sym_letstar, "let*");
-
-/* (let* ((v1 i1) (v2 i2) ...) body) with variables v1 .. vn and initializers
- * i1 .. in is transformed into the form (address@hidden (v1 i1 v2 i2 ...) 
body).  */
-static SCM
-scm_m_letstar (SCM expr, SCM env SCM_UNUSED)
-{
-  SCM binding_idx;
-  SCM new_body;
-
-  const SCM cdr_expr = SCM_CDR (expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 2, s_missing_expression, expr);
-
-  binding_idx = SCM_CAR (cdr_expr);
-  check_bindings (binding_idx, expr);
-
-  /* Transform ((v1 i1) (v2 i2) ...) into (v1 i1 v2 i2 ...).  The
-   * transformation is done in place.  At the beginning of one iteration of
-   * the loop the variable binding_idx holds the form
-   *   P1:( (vn . P2:(in . ())) . P3:( (vn+1 in+1) ... ) ),
-   * where P1, P2 and P3 indicate the pairs, that are relevant for the
-   * transformation.  P1 and P2 are modified in the loop, P3 remains
-   * untouched.  After the execution of the loop, P1 will hold
-   *   P1:( vn . P2:(in . P3:( (vn+1 in+1) ... )) )
-   * and binding_idx will hold P3.  */
-  while (!scm_is_null (binding_idx))
-    {
-      const SCM cdr_binding_idx = SCM_CDR (binding_idx);  /* remember P3 */
-      const SCM binding = SCM_CAR (binding_idx);
-      const SCM name = SCM_CAR (binding);
-      const SCM cdr_binding = SCM_CDR (binding);
-
-      SCM_SETCDR (cdr_binding, cdr_binding_idx);        /* update P2 */
-      SCM_SETCAR (binding_idx, name);                   /* update P1 */
-      SCM_SETCDR (binding_idx, cdr_binding);            /* update P1 */
-
-      binding_idx = cdr_binding_idx;                    /* continue with P3 */
-    }
-
-  new_body = m_body (SCM_IM_LETSTAR, SCM_CDR (cdr_expr));
-  SCM_SETCAR (expr, SCM_IM_LETSTAR);
-  /* the bindings have been changed in place */
-  SCM_SETCDR (cdr_expr, new_body);
-  return expr;
-}
-
-static SCM
-unmemoize_letstar (const SCM expr, const SCM env)
-{
-  const SCM cdr_expr = SCM_CDR (expr);
-  const SCM body = SCM_CDR (cdr_expr);
-  SCM bindings = SCM_CAR (cdr_expr);
-  SCM um_bindings = SCM_EOL;
-  SCM extended_env = env;
-  SCM um_body;
-
-  while (!scm_is_null (bindings))
-    {
-      const SCM variable = SCM_CAR (bindings);
-      const SCM init = SCM_CADR (bindings);
-      const SCM um_init = unmemoize_expression (init, extended_env);
-      um_bindings = scm_cons (scm_list_2 (variable, um_init), um_bindings);
-      extended_env = SCM_EXTEND_ENV (variable, SCM_BOOL_F, extended_env);
-      bindings = SCM_CDDR (bindings);
-    }
-  um_bindings = scm_reverse_x (um_bindings, SCM_UNDEFINED);
-
-  um_body = unmemoize_exprs (body, extended_env);
-
-  return scm_cons2 (scm_sym_letstar, um_bindings, um_body);
-}
-
-
-SCM_SYNTAX (s_or, "or", scm_i_makbimacro, scm_m_or);
-SCM_GLOBAL_SYMBOL (scm_sym_or, "or");
-
-static SCM
-scm_m_or (SCM expr, SCM env SCM_UNUSED)
-{
-  const SCM cdr_expr = SCM_CDR (expr);
-  const long length = scm_ilength (cdr_expr);
-
-  ASSERT_SYNTAX (length >= 0, s_bad_expression, expr);
-
-  if (length == 0)
-    {
-      /* Special case:  (or) is replaced by #f. */
-      return SCM_BOOL_F;
-    }
-  else
-    {
-      SCM_SETCAR (expr, SCM_IM_OR);
-      return expr;
-    }
-}
-
-static SCM
-unmemoize_or (const SCM expr, const SCM env)
-{
-  return scm_cons (scm_sym_or, unmemoize_exprs (SCM_CDR (expr), env));
-}
-
-
-SCM_SYNTAX (s_quasiquote, "quasiquote", scm_makacro, scm_m_quasiquote);
-SCM_GLOBAL_SYMBOL (scm_sym_quasiquote, "quasiquote");
-SCM_GLOBAL_SYMBOL (scm_sym_unquote, "unquote");
-SCM_GLOBAL_SYMBOL (scm_sym_uq_splicing, "unquote-splicing");
+    case SCM_M_LEXICAL_SET:
+      {
+        int n;
+        SCM val = eval (CDR (mx), env);
+        for (n = SCM_I_INUM (CAR (mx)); n; n--)
+          env = CDR (env);
+        SCM_SETCAR (env, val);
+        return SCM_UNSPECIFIED;
+      }
 
-/* Internal function to handle a quasiquotation:  'form' is the parameter in
- * the call (quasiquotation form), 'env' is the environment where unquoted
- * expressions will be evaluated, and 'depth' is the current quasiquotation
- * nesting level and is known to be greater than zero.  */
-static SCM 
-iqq (SCM form, SCM env, unsigned long int depth)
-{
-  if (scm_is_pair (form))
-    {
-      const SCM tmp = SCM_CAR (form);
-      if (scm_is_eq (tmp, scm_sym_quasiquote))
-       {
-         const SCM args = SCM_CDR (form);
-         ASSERT_SYNTAX (scm_ilength (args) == 1, s_expression, form);
-         return scm_list_2 (tmp, iqq (SCM_CAR (args), env, depth + 1));
-       }
-      else if (scm_is_eq (tmp, scm_sym_unquote))
-       {
-         const SCM args = SCM_CDR (form);
-         ASSERT_SYNTAX (scm_ilength (args) == 1, s_expression, form);
-         if (depth - 1 == 0)
-           return scm_eval_car (args, env);
-         else
-           return scm_list_2 (tmp, iqq (SCM_CAR (args), env, depth - 1));
-       }
-      else if (scm_is_pair (tmp)
-              && scm_is_eq (SCM_CAR (tmp), scm_sym_uq_splicing))
-       {
-         const SCM args = SCM_CDR (tmp);
-         ASSERT_SYNTAX (scm_ilength (args) == 1, s_expression, form);
-         if (depth - 1 == 0)
-           {
-             const SCM list = scm_eval_car (args, env);
-             const SCM rest = SCM_CDR (form);
-             ASSERT_SYNTAX_2 (scm_ilength (list) >= 0,
-                              s_splicing, list, form);
-             return scm_append (scm_list_2 (list, iqq (rest, env, depth)));
-           }
-         else
-           return scm_cons (iqq (SCM_CAR (form), env, depth - 1),
-                            iqq (SCM_CDR (form), env, depth));
-       }
+    case SCM_M_TOPLEVEL_REF:
+      if (SCM_VARIABLEP (mx))
+        return SCM_VARIABLE_REF (mx);
       else
-       return scm_cons (iqq (SCM_CAR (form), env, depth),
-                        iqq (SCM_CDR (form), env, depth));
-    }
-  else if (scm_is_vector (form))
-    return scm_vector (iqq (scm_vector_to_list (form), env, depth));
-  else
-    return form;
-}
-
-static SCM
-scm_m_quasiquote (SCM expr, SCM env)
-{
-  const SCM cdr_expr = SCM_CDR (expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) == 1, s_expression, expr);
-  return iqq (SCM_CAR (cdr_expr), env, 1);
-}
-
-
-SCM_SYNTAX (s_quote, "quote", scm_i_makbimacro, scm_m_quote);
-SCM_GLOBAL_SYMBOL (scm_sym_quote, "quote");
-
-static SCM
-scm_m_quote (SCM expr, SCM env SCM_UNUSED)
-{
-  SCM quotee;
-
-  const SCM cdr_expr = SCM_CDR (expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) == 1, s_expression, expr);
-  quotee = SCM_CAR (cdr_expr);
-  if (is_self_quoting_p (quotee))
-    return quotee;
-
-  SCM_SETCAR (expr, SCM_IM_QUOTE);
-  SCM_SETCDR (expr, quotee);
-  return expr;
-}
-
-static SCM
-unmemoize_quote (const SCM expr, const SCM env SCM_UNUSED)
-{
-  return scm_list_2 (scm_sym_quote, SCM_CDR (expr));
-}
-
-
-/* Will go into the RnRS module when Guile is factorized.
-SCM_SYNTAX (s_set_x, "set!", scm_i_makbimacro, scm_m_set_x); */
-SCM_GLOBAL_SYMBOL (scm_sym_set_x, "set!");
-
-static SCM
-scm_m_set_x (SCM expr, SCM env SCM_UNUSED)
-{
-  SCM variable;
-  SCM new_variable;
-
-  const SCM cdr_expr = SCM_CDR (expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) == 2, s_expression, expr);
-  variable = SCM_CAR (cdr_expr);
-
-  /* Memoize the variable form. */
-  ASSERT_SYNTAX_2 (scm_is_symbol (variable), s_bad_variable, variable, expr);
-  new_variable = lookup_symbol (variable, env);
-  /* Leave the memoization of unbound symbols to lazy memoization: */
-  if (SCM_UNBNDP (new_variable))
-    new_variable = variable;
-
-  SCM_SETCAR (expr, SCM_IM_SET_X);
-  SCM_SETCAR (cdr_expr, new_variable);
-  return expr;
-}
-
-static SCM
-unmemoize_set_x (const SCM expr, const SCM env)
-{
-  return scm_cons (scm_sym_set_x, unmemoize_exprs (SCM_CDR (expr), env));
-}
-
-
-
-/* Start of the memoizers for non-R5RS builtin macros.  */
-
-
-SCM_SYNTAX (s_at, "@", scm_makmmacro, scm_m_at);
-SCM_GLOBAL_SYMBOL (scm_sym_at, "@");
-
-static SCM
-scm_m_at (SCM expr, SCM env SCM_UNUSED)
-{
-  SCM mod, var;
-  ASSERT_SYNTAX (scm_ilength (expr) == 3, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (scm_cadr (expr)) > 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_is_symbol (scm_caddr (expr)), s_bad_expression, expr);
-
-  mod = scm_resolve_module (scm_cadr (expr));
-  if (scm_is_false (mod))
-    error_unbound_variable (expr);
-  var = scm_module_variable (scm_module_public_interface (mod), scm_caddr 
(expr));
-  if (scm_is_false (var))
-    error_unbound_variable (expr);
-  
-  return var;
-}
-
-SCM_SYNTAX (s_atat, "@@", scm_makmmacro, scm_m_atat);
-SCM_GLOBAL_SYMBOL (scm_sym_atat, "@@");
-
-static SCM
-scm_m_atat (SCM expr, SCM env SCM_UNUSED)
-{
-  SCM mod, var;
-  ASSERT_SYNTAX (scm_ilength (expr) == 3, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (scm_cadr (expr)) > 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_is_symbol (scm_caddr (expr)), s_bad_expression, expr);
-
-  mod = scm_resolve_module (scm_cadr (expr));
-  if (scm_is_false (mod))
-    error_unbound_variable (expr);
-  var = scm_module_variable (mod, scm_caddr (expr));
-  if (scm_is_false (var))
-    error_unbound_variable (expr);
-  
-  return var;
-}
-
-SCM_SYNTAX (s_atapply, "@apply", scm_i_makbimacro, scm_m_apply);
-SCM_GLOBAL_SYMBOL (scm_sym_atapply, "@apply");
-SCM_GLOBAL_SYMBOL (scm_sym_apply, "apply");
-
-static SCM
-scm_m_apply (SCM expr, SCM env SCM_UNUSED)
-{
-  const SCM cdr_expr = SCM_CDR (expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) == 2, s_missing_expression, expr);
-
-  SCM_SETCAR (expr, SCM_IM_APPLY);
-  return expr;
-}
-
-static SCM
-unmemoize_apply (const SCM expr, const SCM env)
-{
-  return scm_list_2 (scm_sym_atapply, unmemoize_exprs (SCM_CDR (expr), env));
-}
-
-
-SCM_SYNTAX (s_atbind, "@bind", scm_i_makbimacro, scm_m_atbind);
-
-/* FIXME: The following explanation should go into the documentation: */
-/* (@bind ((var init) ...) body ...) will assign the values of the `init's to
- * the global variables named by `var's (symbols, not evaluated), creating
- * them if they don't exist, executes body, and then restores the previous
- * values of the `var's.  Additionally, whenever control leaves body, the
- * values of the `var's are saved and restored when control returns.  It is an
- * error when a symbol appears more than once among the `var's.  All `init's
- * are evaluated before any `var' is set.
- *
- * Think of this as `let' for dynamic scope.
- */
-
-/* (@bind ((var1 exp1) ... (varn expn)) body ...) is memoized into
- * (address@hidden ((varn ... var1) . (exp1 ... expn)) body ...).
- *
- * FIXME - also implement address@hidden'.
- */
-static SCM
-scm_m_atbind (SCM expr, SCM env)
-{
-  SCM bindings;
-  SCM rvariables;
-  SCM inits;
-  SCM variable_idx;
-
-  const SCM top_level = scm_env_top_level (env);
-
-  const SCM cdr_expr = SCM_CDR (expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 2, s_missing_expression, expr);
-  bindings = SCM_CAR (cdr_expr);
-  check_bindings (bindings, expr);
-  transform_bindings (bindings, expr, &rvariables, &inits);
-
-  for (variable_idx = rvariables;
-       !scm_is_null (variable_idx);
-       variable_idx = SCM_CDR (variable_idx))
-    {
-      /* The first call to scm_sym2var will look beyond the current module,
-       * while the second call wont.  */
-      const SCM variable = SCM_CAR (variable_idx);
-      SCM new_variable = scm_sym2var (variable, top_level, SCM_BOOL_F);
-      if (scm_is_false (new_variable))
-       new_variable = scm_sym2var (variable, top_level, SCM_BOOL_T);
-      SCM_SETCAR (variable_idx, new_variable);
-    }
-
-  SCM_SETCAR (expr, SCM_IM_BIND);
-  SCM_SETCAR (cdr_expr, scm_cons (rvariables, inits));
-  return expr;
-}
-
-
-SCM_SYNTAX(s_atcall_cc, "@call-with-current-continuation", scm_i_makbimacro, 
scm_m_cont);
-SCM_GLOBAL_SYMBOL(scm_sym_atcall_cc, "@call-with-current-continuation");
-
-static SCM
-scm_m_cont (SCM expr, SCM env SCM_UNUSED)
-{
-  const SCM cdr_expr = SCM_CDR (expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) == 1, s_expression, expr);
-
-  SCM_SETCAR (expr, SCM_IM_CONT);
-  return expr;
-}
-
-static SCM
-unmemoize_atcall_cc (const SCM expr, const SCM env)
-{
-  return scm_list_2 (scm_sym_atcall_cc, unmemoize_exprs (SCM_CDR (expr), env));
-}
-
-
-SCM_SYNTAX (s_at_call_with_values, "@call-with-values", scm_i_makbimacro, 
scm_m_at_call_with_values);
-SCM_GLOBAL_SYMBOL(scm_sym_at_call_with_values, "@call-with-values");
-
-static SCM
-scm_m_at_call_with_values (SCM expr, SCM env SCM_UNUSED)
-{
-  const SCM cdr_expr = SCM_CDR (expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) == 2, s_expression, expr);
-
-  SCM_SETCAR (expr, SCM_IM_CALL_WITH_VALUES);
-  return expr;
-}
-
-static SCM
-unmemoize_at_call_with_values (const SCM expr, const SCM env)
-{
-  return scm_list_2 (scm_sym_at_call_with_values,
-                     unmemoize_exprs (SCM_CDR (expr), env));
-}
-
-SCM_SYNTAX (s_eval_when, "eval-when", scm_makmmacro, scm_m_eval_when);
-SCM_GLOBAL_SYMBOL (scm_sym_eval_when, "eval-when");
-SCM_SYMBOL (sym_eval, "eval");
-SCM_SYMBOL (sym_load, "load");
-
-
-static SCM
-scm_m_eval_when (SCM expr, SCM env SCM_UNUSED)
-{
-  ASSERT_SYNTAX (scm_ilength (expr) >= 3, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (scm_cadr (expr)) > 0, s_bad_expression, expr);
-
-  if (scm_is_true (scm_memq (sym_eval, scm_cadr (expr)))
-      || scm_is_true (scm_memq (sym_load, scm_cadr (expr))))
-    return scm_cons (SCM_IM_BEGIN, scm_cddr (expr));
-  
-  return scm_list_1 (SCM_IM_BEGIN);
-}
-
-SCM_SYNTAX (s_gset_x, "set!", scm_i_makbimacro, scm_m_generalized_set_x);
-SCM_SYMBOL (scm_sym_setter, "setter");
-
-static SCM
-scm_m_generalized_set_x (SCM expr, SCM env)
-{
-  SCM target, exp_target;
+        {
+          while (scm_is_pair (env))
+            env = scm_cdr (env);
+          return SCM_VARIABLE_REF
+            (scm_memoize_variable_access_x (x, CAPTURE_ENV (env)));
+        }
 
-  const SCM cdr_expr = SCM_CDR (expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) == 2, s_expression, expr);
+    case SCM_M_TOPLEVEL_SET:
+      {
+        SCM var = CAR (mx);
+        SCM val = eval (CDR (mx), env);
+        if (SCM_VARIABLEP (var))
+          {
+            SCM_VARIABLE_SET (var, val);
+            return SCM_UNSPECIFIED;
+          }
+        else
+          {
+            while (scm_is_pair (env))
+              env = scm_cdr (env);
+            SCM_VARIABLE_SET
+              (scm_memoize_variable_access_x (x, CAPTURE_ENV (env)),
+               val);
+            return SCM_UNSPECIFIED;
+          }
+      }
 
-  target = SCM_CAR (cdr_expr);
-  if (!scm_is_pair (target))
-    {
-      /* R5RS usage */
-      return scm_m_set_x (expr, env);
-    }
-  else
-    {
-      /* (set! (foo bar ...) baz) becomes ((setter foo) bar ... baz) */
-      /* Macroexpanding the target might return things of the form
-        (begin <atom>).  In that case, <atom> must be a symbol or a
-        variable and we memoize to (set! <atom> ...).
-      */
-      exp_target = macroexp (target, env);
-      if (scm_is_eq (SCM_CAR (exp_target), SCM_IM_BEGIN)
-         && !scm_is_null (SCM_CDR (exp_target))
-         && scm_is_null (SCM_CDDR (exp_target)))
-       {
-         exp_target= SCM_CADR (exp_target);
-         ASSERT_SYNTAX_2 (scm_is_symbol (exp_target)
-                          || SCM_VARIABLEP (exp_target),
-                          s_bad_variable, exp_target, expr);
-         return scm_cons (SCM_IM_SET_X, scm_cons (exp_target,
-                                                  SCM_CDR (cdr_expr)));
-       }
+    case SCM_M_MODULE_REF:
+      if (SCM_VARIABLEP (mx))
+        return SCM_VARIABLE_REF (mx);
       else
-       {
-         const SCM setter_proc_tail = scm_list_1 (SCM_CAR (target));
-         const SCM setter_proc = scm_cons_source (expr, scm_sym_setter,
-                                                  setter_proc_tail);
-
-         const SCM cddr_expr = SCM_CDR (cdr_expr);
-         const SCM setter_args = scm_append_x (scm_list_2 (SCM_CDR (target),
-                                                           cddr_expr));
-
-         SCM_SETCAR (expr, setter_proc);
-         SCM_SETCDR (expr, setter_args);
-         return expr;
-       }
-    }
-}
-
-
-/* @slot-ref is bound privately in the (oop goops) module from goops.c.  As
- * soon as the module system allows us to more freely create bindings in
- * arbitrary modules during the startup phase, the code from goops.c should be
- * moved here.  */
-
-SCM_SYNTAX (s_atslot_ref, "@slot-ref", scm_i_makbimacro, scm_m_atslot_ref);
-SCM_SYNTAX (s_atslot_set_x, "@slot-set!", scm_i_makbimacro, 
scm_m_atslot_set_x);
-SCM_SYMBOL (sym_atslot_ref, "@slot-ref");
-
-static SCM
-scm_m_atslot_ref (SCM expr, SCM env SCM_UNUSED)
-{
-  SCM slot_nr;
-
-  const SCM cdr_expr = SCM_CDR (expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) == 2, s_expression, expr);
-  slot_nr = SCM_CADR (cdr_expr);
-  ASSERT_SYNTAX_2 (SCM_I_INUMP (slot_nr), s_bad_slot_number, slot_nr, expr);
-
-  SCM_SETCAR (expr, SCM_IM_SLOT_REF);
-  SCM_SETCDR (cdr_expr, slot_nr);
-  return expr;
-}
-
-static SCM
-unmemoize_atslot_ref (const SCM expr, const SCM env)
-{
-  const SCM instance = SCM_CADR (expr);
-  const SCM um_instance = unmemoize_expression (instance, env);
-  const SCM slot_nr = SCM_CDDR (expr);
-  return scm_list_3 (sym_atslot_ref, um_instance, slot_nr);
-}
-
-
-/* @slot-set! is bound privately in the (oop goops) module from goops.c.  As
- * soon as the module system allows us to more freely create bindings in
- * arbitrary modules during the startup phase, the code from goops.c should be
- * moved here.  */
-
-SCM_SYMBOL (sym_atslot_set_x, "@slot-set!");
-
-static SCM
-scm_m_atslot_set_x (SCM expr, SCM env SCM_UNUSED)
-{
-  SCM slot_nr;
-
-  const SCM cdr_expr = SCM_CDR (expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) == 3, s_expression, expr);
-  slot_nr = SCM_CADR (cdr_expr);
-  ASSERT_SYNTAX_2 (SCM_I_INUMP (slot_nr), s_bad_slot_number, slot_nr, expr);
-
-  SCM_SETCAR (expr, SCM_IM_SLOT_SET_X);
-  return expr;
-}
-
-static SCM
-unmemoize_atslot_set_x (const SCM expr, const SCM env)
-{
-  const SCM cdr_expr = SCM_CDR (expr);
-  const SCM instance = SCM_CAR (cdr_expr);
-  const SCM um_instance = unmemoize_expression (instance, env);
-  const SCM cddr_expr = SCM_CDR (cdr_expr);
-  const SCM slot_nr = SCM_CAR (cddr_expr);
-  const SCM cdddr_expr = SCM_CDR (cddr_expr);
-  const SCM value = SCM_CAR (cdddr_expr);
-  const SCM um_value = unmemoize_expression (value, env);
-  return scm_list_4 (sym_atslot_set_x, um_instance, slot_nr, um_value);
-}
-
-
-#if SCM_ENABLE_ELISP
+        return SCM_VARIABLE_REF
+          (scm_memoize_variable_access_x (x, SCM_BOOL_F));
 
-static const char s_defun[] = "Symbol's function definition is void";
-
-SCM_SYNTAX (s_nil_cond, "nil-cond", scm_i_makbimacro, scm_m_nil_cond);
-
-/* nil-cond expressions have the form
- *   (nil-cond COND VAL COND VAL ... ELSEVAL)  */
-static SCM
-scm_m_nil_cond (SCM expr, SCM env SCM_UNUSED)
-{
-  const long length = scm_ilength (SCM_CDR (expr));
-  ASSERT_SYNTAX (length >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (length >= 1 && (length % 2) == 1, s_expression, expr);
-
-  SCM_SETCAR (expr, SCM_IM_NIL_COND);
-  return expr;
-}
-
-
-SCM_SYNTAX (s_atfop, "@fop", scm_i_makbimacro, scm_m_atfop);
-
-/* The @fop-macro handles procedure and macro applications for elisp.  The
- * input expression must have the form
- *    (@fop <var> (transformer-macro <expr> ...))
- * where <var> must be a symbol.  The expression is transformed into the
- * memoized form of either
- *    (apply <un-aliased var> (transformer-macro <expr> ...))
- * if the value of var (across all aliasing) is not a macro, or
- *    (<un-aliased var> <expr> ...)
- * if var is a macro. */
-static SCM
-scm_m_atfop (SCM expr, SCM env SCM_UNUSED)
-{
-  SCM location;
-  SCM symbol;
-
-  const SCM cdr_expr = SCM_CDR (expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 1, s_missing_expression, expr);
-
-  symbol = SCM_CAR (cdr_expr);
-  ASSERT_SYNTAX_2 (scm_is_symbol (symbol), s_bad_variable, symbol, expr);
-
-  location = scm_symbol_fref (symbol);
-  ASSERT_SYNTAX_2 (SCM_VARIABLEP (location), s_defun, symbol, expr);
-
-  /* The elisp function `defalias' allows to define aliases for symbols.  To
-   * look up such definitions, the chain of symbol definitions has to be
-   * followed up to the terminal symbol.  */
-  while (scm_is_symbol (SCM_VARIABLE_REF (location)))
-    {
-      const SCM alias = SCM_VARIABLE_REF (location);
-      location = scm_symbol_fref (alias);
-      ASSERT_SYNTAX_2 (SCM_VARIABLEP (location), s_defun, symbol, expr);
-    }
-
-  /* Memoize the value location belonging to the terminal symbol.  */
-  SCM_SETCAR (cdr_expr, location);
-
-  if (!SCM_MACROP (SCM_VARIABLE_REF (location)))
-    {
-      /* Since the location does not contain a macro, the form is a procedure
-       * application.  Replace address@hidden' by address@hidden' and 
transform the expression
-       * including the `transformer-macro'.  */
-      SCM_SETCAR (expr, SCM_IM_APPLY);
-      return expr;
-    }
-  else
-    {
-      /* Since the location contains a macro, the arguments should not be
-       * transformed, so the `transformer-macro' is cut out.  The resulting
-       * expression starts with the memoized variable, that is at the cdr of
-       * the input expression.  */
-      SCM_SETCDR (cdr_expr, SCM_CDADR (cdr_expr));
-      return cdr_expr;
-    }
-}
-
-#endif /* SCM_ENABLE_ELISP */
-
-
-static SCM
-unmemoize_builtin_macro (const SCM expr, const SCM env)
-{
-  switch (ISYMNUM (SCM_CAR (expr)))
-    {
-    case (ISYMNUM (SCM_IM_AND)):
-      return unmemoize_and (expr, env);
-
-    case (ISYMNUM (SCM_IM_BEGIN)):
-      return unmemoize_begin (expr, env);
-
-    case (ISYMNUM (SCM_IM_CASE)):
-      return unmemoize_case (expr, env);
-
-    case (ISYMNUM (SCM_IM_COND)):
-      return unmemoize_cond (expr, env);
-
-    case (ISYMNUM (SCM_IM_DELAY)):
-      return unmemoize_delay (expr, env);
-
-    case (ISYMNUM (SCM_IM_DO)):
-      return unmemoize_do (expr, env);
-
-    case (ISYMNUM (SCM_IM_IF)):
-      return unmemoize_if (expr, env);
-
-    case (ISYMNUM (SCM_IM_LAMBDA)):
-      return unmemoize_lambda (expr, env);
-
-    case (ISYMNUM (SCM_IM_LET)):
-      return unmemoize_let (expr, env);
-
-    case (ISYMNUM (SCM_IM_LETREC)):
-      return unmemoize_letrec (expr, env);
-
-    case (ISYMNUM (SCM_IM_LETSTAR)):
-      return unmemoize_letstar (expr, env);
-
-    case (ISYMNUM (SCM_IM_OR)):
-      return unmemoize_or (expr, env);
-
-    case (ISYMNUM (SCM_IM_QUOTE)):
-      return unmemoize_quote (expr, env);
-
-    case (ISYMNUM (SCM_IM_SET_X)):
-      return unmemoize_set_x (expr, env);
-
-    case (ISYMNUM (SCM_IM_APPLY)):
-      return unmemoize_apply (expr, env);
-
-    case (ISYMNUM (SCM_IM_BIND)):
-      return unmemoize_exprs (expr, env);  /* FIXME */
-
-    case (ISYMNUM (SCM_IM_CONT)):
-      return unmemoize_atcall_cc (expr, env);
-
-    case (ISYMNUM (SCM_IM_CALL_WITH_VALUES)):
-      return unmemoize_at_call_with_values (expr, env);
-
-    case (ISYMNUM (SCM_IM_SLOT_REF)):
-      return unmemoize_atslot_ref (expr, env);
-
-    case (ISYMNUM (SCM_IM_SLOT_SET_X)):
-      return unmemoize_atslot_set_x (expr, env);
-
-    case (ISYMNUM (SCM_IM_NIL_COND)):
-      return unmemoize_exprs (expr, env);  /* FIXME */
+    case SCM_M_MODULE_SET:
+      if (SCM_VARIABLEP (CDR (mx)))
+        {
+          SCM_VARIABLE_SET (CDR (mx), eval (CAR (mx), env));
+          return SCM_UNSPECIFIED;
+        }
+      else
+        {
+          SCM_VARIABLE_SET
+            (scm_memoize_variable_access_x (x, SCM_BOOL_F),
+             eval (CAR (mx), env));
+          return SCM_UNSPECIFIED;
+        }
 
     default:
-      return unmemoize_exprs (expr, env);  /* FIXME */
+      abort ();
     }
 }
 
-
-/* scm_i_unmemocopy_expr and scm_i_unmemocopy_body take a memoized expression
- * respectively a memoized body together with its environment and rewrite it
- * to its original form.  Thus, these functions are the inversion of the
- * rewrite rules above.  The procedure is not optimized for speed.  It's used
- * in scm_i_unmemoize_expr, scm_procedure_source, macro_print and scm_iprin1.
- *
- * Unmemoizing is not a reliable process.  You cannot in general expect to get
- * the original source back.
- *
- * However, GOOPS currently relies on this for method compilation.  This ought
- * to change.  */
-
-SCM
-scm_i_unmemocopy_expr (SCM expr, SCM env)
-{
-  const SCM source_properties = scm_whash_lookup (scm_source_whash, expr);
-  const SCM um_expr = unmemoize_expression (expr, env);
-
-  if (scm_is_true (source_properties))
-    scm_whash_insert (scm_source_whash, um_expr, source_properties);
-
-  return um_expr;
-}
-
 SCM
-scm_i_unmemocopy_body (SCM forms, SCM env)
+scm_closure_apply (SCM proc, SCM args)
 {
-  const SCM source_properties = scm_whash_lookup (scm_source_whash, forms);
-  const SCM um_forms = unmemoize_exprs (forms, env);
-
-  if (scm_is_true (source_properties))
-    scm_whash_insert (scm_source_whash, um_forms, source_properties);
-
-  return um_forms;
-}
-
-
-#if (SCM_ENABLE_DEPRECATED == 1)
-
-static SCM scm_m_undefine (SCM expr, SCM env);
-
-SCM_SYNTAX (s_undefine, "undefine", scm_makacro, scm_m_undefine);
-
-static SCM
-scm_m_undefine (SCM expr, SCM env)
-{
-  SCM variable;
-  SCM location;
-
-  const SCM cdr_expr = SCM_CDR (expr);
-  ASSERT_SYNTAX (SCM_TOP_LEVEL (env), "Bad undefine placement in", expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
-  ASSERT_SYNTAX (scm_ilength (cdr_expr) == 1, s_expression, expr);
-
-  scm_c_issue_deprecation_warning
-    ("`undefine' is deprecated.\n");
-
-  variable = SCM_CAR (cdr_expr);
-  ASSERT_SYNTAX_2 (scm_is_symbol (variable), s_bad_variable, variable, expr);
-  location = scm_sym2var (variable, scm_env_top_level (env), SCM_BOOL_F);
-  ASSERT_SYNTAX_2 (scm_is_true (location)
-                   && !SCM_UNBNDP (SCM_VARIABLE_REF (location)),
-                   "variable already unbound ", variable, expr);
-  SCM_VARIABLE_SET (location, SCM_UNDEFINED);
-  return SCM_UNSPECIFIED;
-}
-
-#endif /* SCM_ENABLE_DEPRECATED */
-
-
-
-/*****************************************************************************/
-/*****************************************************************************/
-/*                 The definitions for execution start here.                 */
-/*****************************************************************************/
-/*****************************************************************************/
-
-SCM_GLOBAL_SYMBOL (scm_sym_enter_frame, "enter-frame");
-SCM_GLOBAL_SYMBOL (scm_sym_apply_frame, "apply-frame");
-SCM_GLOBAL_SYMBOL (scm_sym_exit_frame, "exit-frame");
-SCM_GLOBAL_SYMBOL (scm_sym_memoize_symbol, "memoize-symbol");
-SCM_GLOBAL_SYMBOL (scm_sym_trace, "trace");
-SCM_SYMBOL (sym_instead, "instead");
-
-/* A function object to implement "apply" for non-closure functions.  */
-static SCM f_apply;
-/* An endless list consisting of #<undefined> objects:  */
-static SCM undefineds;
-
-
-int
-scm_badargsp (SCM formals, SCM args)
-{
-  while (!scm_is_null (formals))
-    {
-      if (!scm_is_pair (formals)) 
-        return 0;
-      if (scm_is_null (args)) 
-        return 1;
-      formals = SCM_CDR (formals);
-      args = SCM_CDR (args);
-    }
-  return !scm_is_null (args) ? 1 : 0;
-}
-
-
-
-/* The evaluator contains a plethora of EVAL symbols.  
- *
- *
- *   SCM_I_EVALIM is used when it is known that the expression is an
- *   immediate.  (This macro never calls an evaluator.)
- *
- *   SCM_I_XEVAL evaluates an expression that is expected to have its symbols 
already
- *   memoized.  Expressions that are not of the form '(<form> <form> ...)' are
- *   evaluated inline without calling an evaluator.
- *
- *   This macro uses ceval or deval depending on its 3rd argument.
- *
- *   SCM_I_XEVALCAR evaluates the car of an expression 'X:(Y:<form> <form> 
...)',
- *   potentially replacing a symbol at the position Y:<form> by its memoized
- *   variable.  If Y:<form> is not of the form '(<form> <form> ...)', the
- *   evaluation is performed inline without calling an evaluator.
- *  
- *   This macro uses ceval or deval depending on its 3rd argument.
- *
- */
-
-#define SCM_I_EVALIM2(x) \
-  ((scm_is_eq ((x), SCM_EOL) \
-    ? syntax_error (s_empty_combination, (x), SCM_UNDEFINED), 0 \
-    : 0), \
-   (x))
-
-#define SCM_I_EVALIM(x, env) (SCM_ILOCP (x) \
-                            ? *scm_ilookup ((x), (env)) \
-                           : SCM_I_EVALIM2(x))
-
-#define SCM_I_XEVAL(x, env, debug_p)                   \
-  (SCM_IMP (x) \
-   ? SCM_I_EVALIM2 (x) \
-   : (SCM_VARIABLEP (x) \
-      ? SCM_VARIABLE_REF (x) \
-      : (scm_is_pair (x) \
-         ? (debug_p \
-            ? deval ((x), (env)) \
-            : ceval ((x), (env))) \
-         : (x))))
-
-#define SCM_I_XEVALCAR(x, env, debug_p)                        \
-  (SCM_IMP (SCM_CAR (x)) \
-   ? SCM_I_EVALIM (SCM_CAR (x), (env)) \
-   : (SCM_VARIABLEP (SCM_CAR (x)) \
-      ? SCM_VARIABLE_REF (SCM_CAR (x)) \
-      : (scm_is_pair (SCM_CAR (x)) \
-         ? (debug_p \
-            ? deval (SCM_CAR (x), (env)) \
-            : ceval (SCM_CAR (x), (env))) \
-         : (!scm_is_symbol (SCM_CAR (x)) \
-            ? SCM_CAR (x) \
-            : *scm_lookupcar ((x), (env), 1)))))
-
-scm_i_pthread_mutex_t source_mutex;
-
-
-/* Lookup a given local variable in an environment.  The local variable is
- * given as an iloc, that is a triple <frame, binding, last?>, where frame
- * indicates the relative number of the environment frame (counting upwards
- * from the innermost environment frame), binding indicates the number of the
- * binding within the frame, and last? (which is extracted from the iloc using
- * the macro SCM_ICDRP) indicates whether the binding forms the binding at the
- * very end of the improper list of bindings.  */
-SCM *
-scm_ilookup (SCM iloc, SCM env)
-{
-  unsigned int frame_nr = SCM_IFRAME (iloc);
-  unsigned int binding_nr = SCM_IDIST (iloc);
-  SCM frames = env;
-  SCM bindings;
- 
-  for (; 0 != frame_nr; --frame_nr)
-    frames = SCM_CDR (frames);
-
-  bindings = SCM_CAR (frames);
-  for (; 0 != binding_nr; --binding_nr)
-    bindings = SCM_CDR (bindings);
-
-  if (SCM_ICDRP (iloc))
-    return SCM_CDRLOC (bindings);
-  return SCM_CARLOC (SCM_CDR (bindings));
-}
-
-
-SCM_SYMBOL (scm_unbound_variable_key, "unbound-variable");
-
-/* Call this for variables that are unfound.
- */
-static void
-error_unbound_variable (SCM symbol)
-{
-  scm_error (scm_unbound_variable_key, NULL,
-            "Unbound variable: ~S",
-            scm_list_1 (symbol), SCM_BOOL_F);
-}
-
-/* Call this for variables that are found but contain SCM_UNDEFINED.
- */
-static void
-error_defined_variable (SCM symbol)
-{
-  /* We use the 'unbound-variable' key here as well, since it
-     basically is the same kind of error, with a slight variation in
-     the displayed message.
-  */
-  scm_error (scm_unbound_variable_key, NULL,
-            "Variable used before given a value: ~S",
-            scm_list_1 (symbol), SCM_BOOL_F);
-}
-
-
-/* The Lookup Car Race
-    - by Eva Luator
-
-   Memoization of variables and special forms is done while executing
-   the code for the first time.  As long as there is only one thread
-   everything is fine, but as soon as two threads execute the same
-   code concurrently `for the first time' they can come into conflict.
-
-   This memoization includes rewriting variable references into more
-   efficient forms and expanding macros.  Furthermore, macro expansion
-   includes `compiling' special forms like `let', `cond', etc. into
-   tree-code instructions.
-
-   There shouldn't normally be a problem with memoizing local and
-   global variable references (into ilocs and variables), because all
-   threads will mutate the code in *exactly* the same way and (if I
-   read the C code correctly) it is not possible to observe a half-way
-   mutated cons cell.  The lookup procedure can handle this
-   transparently without any critical sections.
-
-   It is different with macro expansion, because macro expansion
-   happens outside of the lookup procedure and can't be
-   undone. Therefore the lookup procedure can't cope with it.  It has
-   to indicate failure when it detects a lost race and hope that the
-   caller can handle it.  Luckily, it turns out that this is the case.
-
-   An example to illustrate this: Suppose that the following form will
-   be memoized concurrently by two threads
-
-       (let ((x 12)) x)
-
-   Let's first examine the lookup of X in the body.  The first thread
-   decides that it has to find the symbol "x" in the environment and
-   starts to scan it.  Then the other thread takes over and actually
-   overtakes the first.  It looks up "x" and substitutes an
-   appropriate iloc for it.  Now the first thread continues and
-   completes its lookup.  It comes to exactly the same conclusions as
-   the second one and could - without much ado - just overwrite the
-   iloc with the same iloc.
-
-   But let's see what will happen when the race occurs while looking
-   up the symbol "let" at the start of the form.  It could happen that
-   the second thread interrupts the lookup of the first thread and not
-   only substitutes a variable for it but goes right ahead and
-   replaces it with the compiled form (address@hidden (x 12) x).  Now, when
-   the first thread completes its lookup, it would replace the address@hidden
-   with a variable containing the "let" binding, effectively reverting
-   the form to (let (x 12) x).  This is wrong.  It has to detect that
-   it has lost the race and the evaluator has to reconsider the
-   changed form completely.
-
-   This race condition could be resolved with some kind of traffic
-   light (like mutexes) around scm_lookupcar, but I think that it is
-   best to avoid them in this case.  They would serialize memoization
-   completely and because lookup involves calling arbitrary Scheme
-   code (via the lookup-thunk), threads could be blocked for an
-   arbitrary amount of time or even deadlock.  But with the current
-   solution a lot of unnecessary work is potentially done. */
-
-/* SCM_LOOKUPCAR1 is what SCM_LOOKUPCAR used to be but is allowed to
-   return NULL to indicate a failed lookup due to some race conditions
-   between threads.  This only happens when VLOC is the first cell of
-   a special form that will eventually be memoized (like `let', etc.)
-   In that case the whole lookup is bogus and the caller has to
-   reconsider the complete special form.
-
-   SCM_LOOKUPCAR is still there, of course.  It just calls
-   SCM_LOOKUPCAR1 and aborts on receiving NULL.  So SCM_LOOKUPCAR
-   should only be called when it is known that VLOC is not the first
-   pair of a special form.  Otherwise, use SCM_LOOKUPCAR1 and check
-   for NULL.  I think I've found the only places where this
-   applies. */
+  unsigned int nargs;
+  int nreq;
+  SCM env;
 
-static SCM *
-scm_lookupcar1 (SCM vloc, SCM genv, int check)
-{
-  SCM env = genv;
-  register SCM *al, fl, var = SCM_CAR (vloc);
-  register SCM iloc = SCM_ILOC00;
-  for (; SCM_NIMP (env); env = SCM_CDR (env))
-    {
-      if (!scm_is_pair (SCM_CAR (env)))
-       break;
-      al = SCM_CARLOC (env);
-      for (fl = SCM_CAR (*al); SCM_NIMP (fl); fl = SCM_CDR (fl))
-       {
-         if (!scm_is_pair (fl))
-           {
-             if (scm_is_eq (fl, var))
-             {
-               if (!scm_is_eq (SCM_CAR (vloc), var))
-                 goto race;
-               SCM_SET_CELL_WORD_0 (vloc, SCM_UNPACK (iloc) + SCM_ICDR);
-               return SCM_CDRLOC (*al);
-             }
-             else
-               break;
-           }
-         al = SCM_CDRLOC (*al);
-         if (scm_is_eq (SCM_CAR (fl), var))
-           {
-             if (SCM_UNBNDP (SCM_CAR (*al)))
-               error_defined_variable (var);
-             if (!scm_is_eq (SCM_CAR (vloc), var))
-               goto race;
-             SCM_SETCAR (vloc, iloc);
-             return SCM_CARLOC (*al);
-           }
-         iloc = SCM_PACK (SCM_UNPACK (iloc) + SCM_IDINC);
-       }
-      iloc = SCM_PACK ((~SCM_IDSTMSK) & (SCM_UNPACK(iloc) + SCM_IFRINC));
-    }
+  /* Args contains a list of all args. */
   {
-    SCM top_thunk, real_var;
-    if (SCM_NIMP (env))
-      {
-       top_thunk = SCM_CAR (env); /* env now refers to a
-                                     top level env thunk */
-       env = SCM_CDR (env);
-      }
-    else
-      top_thunk = SCM_BOOL_F;
-    real_var = scm_sym2var (var, top_thunk, SCM_BOOL_F);
-    if (scm_is_false (real_var))
-      goto errout;
-
-    if (!scm_is_null (env) || SCM_UNBNDP (SCM_VARIABLE_REF (real_var)))
-      {
-      errout:
-       if (check)
-         {
-           if (scm_is_null (env))
-              error_unbound_variable (var);
-           else
-             scm_misc_error (NULL, "Damaged environment: ~S",
-                             scm_list_1 (var));
-         }
-       else 
-         {
-           /* A variable could not be found, but we shall
-              not throw an error. */
-           static SCM undef_object = SCM_UNDEFINED;
-           return &undef_object;
-         }
-      }
-
-    if (!scm_is_eq (SCM_CAR (vloc), var))
-      {
-       /* Some other thread has changed the very cell we are working
-          on.  In effect, it must have done our job or messed it up
-          completely. */
-      race:
-       var = SCM_CAR (vloc);
-       if (SCM_VARIABLEP (var))
-         return SCM_VARIABLE_LOC (var);
-       if (SCM_ILOCP (var))
-         return scm_ilookup (var, genv);
-       /* We can't cope with anything else than variables and ilocs.  When
-          a special form has been memoized (i.e. `let' into address@hidden') we
-          return NULL and expect the calling function to do the right
-          thing.  For the evaluator, this means going back and redoing
-          the dispatch on the car of the form. */
-       return NULL;
-      }
-
-    SCM_SETCAR (vloc, real_var);
-    return SCM_VARIABLE_LOC (real_var);
+    int ilen = scm_ilength (args);
+    if (ilen < 0)
+      scm_wrong_num_args (proc);
+    nargs = ilen;
   }
-}
-
-SCM *
-scm_lookupcar (SCM vloc, SCM genv, int check)
-{
-  SCM *loc = scm_lookupcar1 (vloc, genv, check);
-  if (loc == NULL)
-    abort ();
-  return loc;
-}
-
-
-/* During execution, look up a symbol in the top level of the given local
- * environment and return the corresponding variable object.  If no binding
- * for the symbol can be found, an 'Unbound variable' error is signalled.  */
-static SCM
-lazy_memoize_variable (const SCM symbol, const SCM environment)
-{
-  const SCM top_level = scm_env_top_level (environment);
-  const SCM variable = scm_sym2var (symbol, top_level, SCM_BOOL_F);
 
-  if (scm_is_false (variable))
-    error_unbound_variable (symbol);
+  nreq = SCM_CLOSURE_NUM_REQUIRED_ARGS (proc);
+  env = SCM_ENV (proc);
+  if (SCM_CLOSURE_HAS_REST_ARGS (proc))
+    {
+      if (SCM_UNLIKELY (scm_ilength (args) < nreq))
+        scm_wrong_num_args (proc);
+      for (; nreq; nreq--, args = CDR (args))
+        env = scm_cons (CAR (args), env);
+      env = scm_cons (args, env);
+    }
   else
-    return variable;
-}
-
-
-SCM
-scm_eval_car (SCM pair, SCM env)
-{
-  return SCM_I_XEVALCAR (pair, env, scm_debug_mode_p);
-}
-
-
-SCM
-scm_eval_body (SCM code, SCM env)
-{
-  SCM next;
-
- again:
-  next = SCM_CDR (code);
-  while (!scm_is_null (next))
     {
-      if (SCM_IMP (SCM_CAR (code)))
-       {
-         if (SCM_ISYMP (SCM_CAR (code)))
-           {
-             scm_dynwind_begin (0);
-             scm_i_dynwind_pthread_mutex_lock (&source_mutex);
-             /* check for race condition */
-             if (SCM_ISYMP (SCM_CAR (code)))
-               m_expand_body (code, env);
-             scm_dynwind_end ();
-             goto again;
-           }
-       }
-      else
-       SCM_I_XEVAL (SCM_CAR (code), env, scm_debug_mode_p);
-      code = next;
-      next = SCM_CDR (code);
+      for (; scm_is_pair (args); args = CDR (args), nreq--)
+        env = scm_cons (CAR (args), env);
+      if (SCM_UNLIKELY (nreq != 0))
+        scm_wrong_num_args (proc);
     }
-  return SCM_I_XEVALCAR (code, env, scm_debug_mode_p);
+  return eval (SCM_CLOSURE_BODY (proc), env);
 }
 
 
-/* scm_last_debug_frame contains a pointer to the last debugging information
- * stack frame.  It is accessed very often from the debugging evaluator, so it
- * should probably not be indirectly addressed.  Better to save and restore it
- * from the current root at any stack swaps.
- */
-
-/* scm_debug_eframe_size is the number of slots available for pseudo
- * stack frames at each real stack frame.
- */
-
-long scm_debug_eframe_size;
-
-int scm_debug_mode_p;
-int scm_check_entry_p;
-int scm_check_apply_p;
-int scm_check_exit_p;
-int scm_check_memoize_p;
-
-long scm_eval_stack;
-
 scm_t_option scm_eval_opts[] = {
   { SCM_OPTION_INTEGER, "stack", 22000, "Size of thread stacks (in machine 
words)." },
   { 0 }
@@ -3024,7 +504,6 @@ SCM_DEFINE (scm_eval_options_interface, 
"eval-options-interface", 0, 1, 0,
   ans = scm_options (setting,
                     scm_eval_opts,
                     FUNC_NAME);
-  scm_eval_stack = SCM_EVAL_STACK * sizeof (void *);
   scm_dynwind_end ();
 
   return ans;
@@ -3049,7 +528,6 @@ SCM_DEFINE (scm_evaluator_traps, 
"evaluator-traps-interface", 0, 1, 0,
                     FUNC_NAME);
 
   /* njrev: same again. */
-  SCM_RESET_DEBUG_MODE;
   SCM_CRITICAL_SECTION_END;
   return ans;
 }
@@ -3192,335 +670,6 @@ SCM_DEFINE (scm_nconc2last, "apply:nconc2last", 1, 0, 0,
 
 
 
-/* SECTION: The rest of this file is only read once.
- */
-
-/* Trampolines
- *  
- * Trampolines make it possible to move procedure application dispatch
- * outside inner loops.  The motivation was clean implementation of
- * efficient replacements of R5RS primitives in SRFI-1.
- *
- * The semantics is clear: scm_trampoline_N returns an optimized
- * version of scm_call_N (or NULL if the procedure isn't applicable
- * on N args).
- *
- * Applying the optimization to map and for-each increased efficiency
- * noticeably.  For example, (map abs ls) is now 8 times faster than
- * before.
- */
-
-static SCM
-call_subr0_0 (SCM proc)
-{
-  return SCM_SUBRF (proc) ();
-}
-
-static SCM
-call_subr1o_0 (SCM proc)
-{
-  return SCM_SUBRF (proc) (SCM_UNDEFINED);
-}
-
-static SCM
-call_lsubr_0 (SCM proc)
-{
-  return SCM_SUBRF (proc) (SCM_EOL);
-}
-
-SCM 
-scm_i_call_closure_0 (SCM proc)
-{
-  const SCM env = SCM_EXTEND_ENV (SCM_CLOSURE_FORMALS (proc),
-                                  SCM_EOL,
-                                  SCM_ENV (proc));
-  const SCM result = scm_eval_body (SCM_CLOSURE_BODY (proc), env);
-  return result;
-}
-
-scm_t_trampoline_0
-scm_trampoline_0 (SCM proc)
-{
-  scm_t_trampoline_0 trampoline;
-
-  if (SCM_IMP (proc))
-    return NULL;
-
-  switch (SCM_TYP7 (proc))
-    {
-    case scm_tc7_subr_0:
-      trampoline = call_subr0_0;
-      break;
-    case scm_tc7_subr_1o:
-      trampoline = call_subr1o_0;
-      break;
-    case scm_tc7_lsubr:
-      trampoline = call_lsubr_0;
-      break;
-    case scm_tcs_closures:
-      {
-       SCM formals = SCM_CLOSURE_FORMALS (proc);
-       if (scm_is_null (formals) || !scm_is_pair (formals))
-         trampoline = scm_i_call_closure_0;
-       else
-         return NULL;
-        break;
-      }
-    case scm_tcs_struct:
-      if (SCM_OBJ_CLASS_FLAGS (proc) & SCM_CLASSF_PURE_GENERIC)
-       trampoline = scm_call_generic_0;
-      else if (SCM_STRUCT_APPLICABLE_P (proc))
-        trampoline = scm_call_0;
-      else
-        return NULL;
-      break;
-    case scm_tc7_smob:
-      if (SCM_SMOB_APPLICABLE_P (proc))
-       trampoline = SCM_SMOB_DESCRIPTOR (proc).apply_0;
-      else
-       return NULL;
-      break;
-    case scm_tc7_asubr:
-    case scm_tc7_rpsubr:
-    case scm_tc7_gsubr:
-    case scm_tc7_pws:
-    case scm_tc7_program:
-      trampoline = scm_call_0;
-      break;
-    default:
-      return NULL; /* not applicable on zero arguments */
-    }
-  /* We only reach this point if a valid trampoline was determined.  */
-
-  /* If debugging is enabled, we want to see all calls to proc on the stack.
-   * Thus, we replace the trampoline shortcut with scm_call_0.  */
-  if (scm_debug_mode_p)
-    return scm_call_0;
-  else
-    return trampoline;
-}
-
-static SCM
-call_subr1_1 (SCM proc, SCM arg1)
-{
-  return SCM_SUBRF (proc) (arg1);
-}
-
-static SCM
-call_subr2o_1 (SCM proc, SCM arg1)
-{
-  return SCM_SUBRF (proc) (arg1, SCM_UNDEFINED);
-}
-
-static SCM
-call_lsubr_1 (SCM proc, SCM arg1)
-{
-  return SCM_SUBRF (proc) (scm_list_1 (arg1));
-}
-
-static SCM
-call_dsubr_1 (SCM proc, SCM arg1)
-{
-  if (SCM_I_INUMP (arg1))
-    {
-      return (scm_from_double (SCM_DSUBRF (proc) ((double) SCM_I_INUM 
(arg1))));
-    }
-  else if (SCM_REALP (arg1))
-    {
-      return (scm_from_double (SCM_DSUBRF (proc) (SCM_REAL_VALUE (arg1))));
-    }
-  else if (SCM_BIGP (arg1))
-    {
-      return (scm_from_double (SCM_DSUBRF (proc) (scm_i_big2dbl (arg1))));
-    }
-  else if (SCM_FRACTIONP (arg1))
-    {
-      return (scm_from_double (SCM_DSUBRF (proc) (scm_i_fraction2double 
(arg1))));
-    }
-  SCM_WTA_DISPATCH_1_SUBR (proc, arg1, SCM_ARG1);
-}
-
-static SCM
-call_cxr_1 (SCM proc, SCM arg1)
-{
-  return scm_i_chase_pairs (arg1, (scm_t_bits) SCM_SUBRF (proc));
-}
-
-static SCM 
-call_closure_1 (SCM proc, SCM arg1)
-{
-  const SCM env = SCM_EXTEND_ENV (SCM_CLOSURE_FORMALS (proc),
-                                  scm_list_1 (arg1),
-                                  SCM_ENV (proc));
-  const SCM result = scm_eval_body (SCM_CLOSURE_BODY (proc), env);
-  return result;
-}
-
-scm_t_trampoline_1
-scm_trampoline_1 (SCM proc)
-{
-  scm_t_trampoline_1 trampoline;
-
-  if (SCM_IMP (proc))
-    return NULL;
-
-  switch (SCM_TYP7 (proc))
-    {
-    case scm_tc7_subr_1:
-    case scm_tc7_subr_1o:
-      trampoline = call_subr1_1;
-      break;
-    case scm_tc7_subr_2o:
-      trampoline = call_subr2o_1;
-      break;
-    case scm_tc7_lsubr:
-      trampoline = call_lsubr_1;
-      break;
-    case scm_tc7_dsubr:
-      trampoline = call_dsubr_1;
-      break;
-    case scm_tc7_cxr:
-      trampoline = call_cxr_1;
-      break;
-    case scm_tcs_closures:
-      {
-       SCM formals = SCM_CLOSURE_FORMALS (proc);
-       if (!scm_is_null (formals)
-           && (!scm_is_pair (formals) || !scm_is_pair (SCM_CDR (formals))))
-         trampoline = call_closure_1;
-       else
-         return NULL;
-        break;
-      }
-    case scm_tcs_struct:
-      if (SCM_OBJ_CLASS_FLAGS (proc) & SCM_CLASSF_PURE_GENERIC)
-       trampoline = scm_call_generic_1;
-      else if (SCM_STRUCT_APPLICABLE_P (proc))
-        trampoline = scm_call_1;
-      else
-        return NULL;
-      break;
-    case scm_tc7_smob:
-      if (SCM_SMOB_APPLICABLE_P (proc))
-       trampoline = SCM_SMOB_DESCRIPTOR (proc).apply_1;
-      else
-       return NULL;
-      break;
-    case scm_tc7_asubr:
-    case scm_tc7_rpsubr:
-    case scm_tc7_gsubr:
-    case scm_tc7_pws:
-    case scm_tc7_program:
-      trampoline = scm_call_1;
-      break;
-    default:
-      return NULL; /* not applicable on one arg */
-    }
-  /* We only reach this point if a valid trampoline was determined.  */
-
-  /* If debugging is enabled, we want to see all calls to proc on the stack.
-   * Thus, we replace the trampoline shortcut with scm_call_1.  */
-  if (scm_debug_mode_p)
-    return scm_call_1;
-  else
-    return trampoline;
-}
-
-static SCM
-call_subr2_2 (SCM proc, SCM arg1, SCM arg2)
-{
-  return SCM_SUBRF (proc) (arg1, arg2);
-}
-
-static SCM
-call_lsubr2_2 (SCM proc, SCM arg1, SCM arg2)
-{
-  return SCM_SUBRF (proc) (arg1, arg2, SCM_EOL);
-}
-
-static SCM
-call_lsubr_2 (SCM proc, SCM arg1, SCM arg2)
-{
-  return SCM_SUBRF (proc) (scm_list_2 (arg1, arg2));
-}
-
-static SCM 
-call_closure_2 (SCM proc, SCM arg1, SCM arg2)
-{
-  const SCM env = SCM_EXTEND_ENV (SCM_CLOSURE_FORMALS (proc),
-                                  scm_list_2 (arg1, arg2),
-                                  SCM_ENV (proc));
-  const SCM result = scm_eval_body (SCM_CLOSURE_BODY (proc), env);
-  return result;
-}
-
-scm_t_trampoline_2
-scm_trampoline_2 (SCM proc)
-{
-  scm_t_trampoline_2 trampoline;
-
-  if (SCM_IMP (proc))
-    return NULL;
-
-  switch (SCM_TYP7 (proc))
-    {
-    case scm_tc7_subr_2:
-    case scm_tc7_subr_2o:
-    case scm_tc7_rpsubr:
-    case scm_tc7_asubr:
-      trampoline = call_subr2_2;
-      break;
-    case scm_tc7_lsubr_2:
-      trampoline = call_lsubr2_2;
-      break;
-    case scm_tc7_lsubr:
-      trampoline = call_lsubr_2;
-      break;
-    case scm_tcs_closures:
-      {
-       SCM formals = SCM_CLOSURE_FORMALS (proc);
-       if (!scm_is_null (formals)
-           && (!scm_is_pair (formals)
-               || (!scm_is_null (SCM_CDR (formals))
-                   && (!scm_is_pair (SCM_CDR (formals))
-                       || !scm_is_pair (SCM_CDDR (formals))))))
-         trampoline = call_closure_2;
-       else
-         return NULL;
-        break;
-      }
-    case scm_tcs_struct:
-      if (SCM_OBJ_CLASS_FLAGS (proc) & SCM_CLASSF_PURE_GENERIC)
-       trampoline = scm_call_generic_2;
-      else if (SCM_STRUCT_APPLICABLE_P (proc))
-        trampoline = scm_call_2;
-      else
-        return NULL;
-      break;
-    case scm_tc7_smob:
-      if (SCM_SMOB_APPLICABLE_P (proc))
-       trampoline = SCM_SMOB_DESCRIPTOR (proc).apply_2;
-      else
-       return NULL;
-      break;
-    case scm_tc7_gsubr:
-    case scm_tc7_pws:
-    case scm_tc7_program:
-      trampoline = scm_call_2;
-      break;
-    default:
-      return NULL; /* not applicable on two args */
-    }
-  /* We only reach this point if a valid trampoline was determined.  */
-
-  /* If debugging is enabled, we want to see all calls to proc on the stack.
-   * Thus, we replace the trampoline shortcut with scm_call_2.  */
-  if (scm_debug_mode_p)
-    return scm_call_2;
-  else
-    return trampoline;
-}
-
 /* Typechecking for multi-argument MAP and FOR-EACH.
 
    Verify that each element of the vector ARGV, except for the first,
@@ -3578,11 +727,10 @@ scm_map (SCM proc, SCM arg1, SCM args)
   SCM_VALIDATE_REST_ARGUMENT (args);
   if (scm_is_null (args))
     {
-      scm_t_trampoline_1 call = scm_trampoline_1 (proc);
-      SCM_GASSERT2 (call, g_map, proc, arg1, SCM_ARG1, s_map);
+      SCM_GASSERT2 (scm_is_true (scm_procedure_p (proc)), g_map, proc, arg1, 
SCM_ARG1, s_map);
       while (SCM_NIMP (arg1))
        {
-         *pres = scm_list_1 (call (proc, SCM_CAR (arg1)));
+         *pres = scm_list_1 (scm_call_1 (proc, SCM_CAR (arg1)));
          pres = SCM_CDRLOC (*pres);
          arg1 = SCM_CDR (arg1);
        }
@@ -3592,16 +740,15 @@ scm_map (SCM proc, SCM arg1, SCM args)
     {
       SCM arg2 = SCM_CAR (args);
       int len2 = scm_ilength (arg2);
-      scm_t_trampoline_2 call = scm_trampoline_2 (proc);
-      SCM_GASSERTn (call,
-                   g_map, scm_cons2 (proc, arg1, args), SCM_ARG1, s_map);
+      SCM_GASSERTn (scm_is_true (scm_procedure_p (proc)), g_map,
+                    scm_cons2 (proc, arg1, args), SCM_ARG1, s_map);
       SCM_GASSERTn (len2 >= 0,
                    g_map, scm_cons2 (proc, arg1, args), SCM_ARG3, s_map);
       if (len2 != len)
        SCM_OUT_OF_RANGE (3, arg2);
       while (SCM_NIMP (arg1))
        {
-         *pres = scm_list_1 (call (proc, SCM_CAR (arg1), SCM_CAR (arg2)));
+         *pres = scm_list_1 (scm_call_2 (proc, SCM_CAR (arg1), SCM_CAR 
(arg2)));
          pres = SCM_CDRLOC (*pres);
          arg1 = SCM_CDR (arg1);
          arg2 = SCM_CDR (arg2);
@@ -3642,11 +789,11 @@ scm_for_each (SCM proc, SCM arg1, SCM args)
   SCM_VALIDATE_REST_ARGUMENT (args);
   if (scm_is_null (args))
     {
-      scm_t_trampoline_1 call = scm_trampoline_1 (proc);
-      SCM_GASSERT2 (call, g_for_each, proc, arg1, SCM_ARG1, s_for_each);
+      SCM_GASSERT2 (scm_is_true (scm_procedure_p (proc)), g_for_each,
+                    proc, arg1, SCM_ARG1, s_for_each);
       while (SCM_NIMP (arg1))
        {
-         call (proc, SCM_CAR (arg1));
+         scm_call_1 (proc, SCM_CAR (arg1));
          arg1 = SCM_CDR (arg1);
        }
       return SCM_UNSPECIFIED;
@@ -3655,8 +802,7 @@ scm_for_each (SCM proc, SCM arg1, SCM args)
     {
       SCM arg2 = SCM_CAR (args);
       int len2 = scm_ilength (arg2);
-      scm_t_trampoline_2 call = scm_trampoline_2 (proc);
-      SCM_GASSERTn (call, g_for_each,
+      SCM_GASSERTn (scm_is_true (scm_procedure_p (proc)), g_for_each,
                    scm_cons2 (proc, arg1, args), SCM_ARG1, s_for_each);
       SCM_GASSERTn (len2 >= 0, g_for_each,
                    scm_cons2 (proc, arg1, args), SCM_ARG3, s_for_each);
@@ -3664,7 +810,7 @@ scm_for_each (SCM proc, SCM arg1, SCM args)
        SCM_OUT_OF_RANGE (3, arg2);
       while (SCM_NIMP (arg1))
        {
-         call (proc, SCM_CAR (arg1), SCM_CAR (arg2));
+         scm_call_2 (proc, SCM_CAR (arg1), SCM_CAR (arg2));
          arg1 = SCM_CDR (arg1);
          arg2 = SCM_CDR (arg2);
        }
@@ -3702,334 +848,23 @@ scm_closure (SCM code, SCM env)
 }
 
 
-scm_t_bits scm_tc16_promise;
-
-SCM_DEFINE (scm_make_promise, "make-promise", 1, 0, 0, 
-           (SCM thunk),
-           "Create a new promise object.\n\n"
-            "@code{make-promise} is a procedural form of @code{delay}.\n"
-            "These two expressions are equivalent:\n"
-            "@lisp\n"
-           "(delay @var{exp})\n"
-           "(make-promise (lambda () @var{exp}))\n"
-            "@end lisp\n")
-#define FUNC_NAME s_scm_make_promise
-{
-  SCM_VALIDATE_THUNK (1, thunk);
-  SCM_RETURN_NEWSMOB2 (scm_tc16_promise,
-                      SCM_UNPACK (thunk),
-                      scm_make_recursive_mutex ());
-}
-#undef FUNC_NAME
-
-
-static int 
-promise_print (SCM exp, SCM port, scm_print_state *pstate)
-{
-  int writingp = SCM_WRITINGP (pstate);
-  scm_puts ("#<promise ", port);
-  SCM_SET_WRITINGP (pstate, 1);
-  scm_iprin1 (SCM_PROMISE_DATA (exp), port, pstate);
-  SCM_SET_WRITINGP (pstate, writingp);
-  scm_putc ('>', port);
-  return !0;
-}
-
-SCM_DEFINE (scm_force, "force", 1, 0, 0, 
-           (SCM promise),
-           "If the promise @var{x} has not been computed yet, compute and\n"
-           "return @var{x}, otherwise just return the previously computed\n"
-           "value.")
-#define FUNC_NAME s_scm_force
-{
-  SCM_VALIDATE_SMOB (1, promise, promise);
-  scm_lock_mutex (SCM_PROMISE_MUTEX (promise));
-  if (!SCM_PROMISE_COMPUTED_P (promise))
-    {
-      SCM ans = scm_call_0 (SCM_PROMISE_DATA (promise));
-      if (!SCM_PROMISE_COMPUTED_P (promise))
-       {
-         SCM_SET_PROMISE_DATA (promise, ans);
-         SCM_SET_PROMISE_COMPUTED (promise);
-       }
-    }
-  scm_unlock_mutex (SCM_PROMISE_MUTEX (promise));
-  return SCM_PROMISE_DATA (promise);
-}
-#undef FUNC_NAME
-
-
-SCM_DEFINE (scm_promise_p, "promise?", 1, 0, 0, 
-            (SCM obj),
-           "Return true if @var{obj} is a promise, i.e. a delayed 
computation\n"
-           "(@pxref{Delayed evaluation,,,r5rs.info,The Revised^5 Report on 
Scheme}).")
-#define FUNC_NAME s_scm_promise_p
-{
-  return scm_from_bool (SCM_TYP16_PREDICATE (scm_tc16_promise, obj));
-}
-#undef FUNC_NAME
-
-
-SCM_DEFINE (scm_cons_source, "cons-source", 3, 0, 0, 
-            (SCM xorig, SCM x, SCM y),
-           "Create and return a new pair whose car and cdr are @var{x} and 
@var{y}.\n"
-           "Any source properties associated with @var{xorig} are also 
associated\n"
-           "with the new pair.")
-#define FUNC_NAME s_scm_cons_source
-{
-  SCM p, z;
-  z = scm_cons (x, y);
-  /* Copy source properties possibly associated with xorig. */
-  p = scm_whash_lookup (scm_source_whash, xorig);
-  if (scm_is_true (p))
-    scm_whash_insert (scm_source_whash, z, p);
-  return z;
-}
-#undef FUNC_NAME
-
-
-/* The function scm_copy_tree is used to copy an expression tree to allow the
- * memoizer to modify the expression during memoization.  scm_copy_tree
- * creates deep copies of pairs and vectors, but not of any other data types,
- * since only pairs and vectors will be parsed by the memoizer.
- *
- * To avoid infinite recursion due to cyclic structures, the hare-and-tortoise
- * pattern is used to detect cycles.  In fact, the pattern is used in two
- * dimensions, vertical (indicated in the code by the variable names 'hare'
- * and 'tortoise') and horizontal ('rabbit' and 'turtle').  In both
- * dimensions, the hare/rabbit will take two steps when the tortoise/turtle
- * takes one.
- *
- * The vertical dimension corresponds to recursive calls to function
- * copy_tree: This happens when descending into vector elements, into cars of
- * lists and into the cdr of an improper list.  In this dimension, the
- * tortoise follows the hare by using the processor stack: Every stack frame
- * will hold an instance of struct t_trace.  These instances are connected in
- * a way that represents the trace of the hare, which thus can be followed by
- * the tortoise.  The tortoise will always point to struct t_trace instances
- * relating to SCM objects that have already been copied.  Thus, a cycle is
- * detected if the tortoise and the hare point to the same object,
- *
- * The horizontal dimension is within one execution of copy_tree, when the
- * function cdr's along the pairs of a list.  This is the standard
- * hare-and-tortoise implementation, found several times in guile.  */
-
-struct t_trace {
-  struct t_trace *trace; /* These pointers form a trace along the stack. */
-  SCM obj;               /* The object handled at the respective stack frame.*/
-};
-
 static SCM
-copy_tree (
-  struct t_trace *const hare,
-  struct t_trace *tortoise,
-  unsigned int tortoise_delay )
-{
-  if (!scm_is_pair (hare->obj) && !scm_is_simple_vector (hare->obj))
-    {
-      return hare->obj;
-    }
-  else
-    {
-      /* Prepare the trace along the stack.  */
-      struct t_trace new_hare;
-      hare->trace = &new_hare;
-
-      /* The tortoise will make its step after the delay has elapsed.  Note
-       * that in contrast to the typical hare-and-tortoise pattern, the step
-       * of the tortoise happens before the hare takes its steps.  This is, in
-       * principle, no problem, except for the start of the algorithm: Then,
-       * it has to be made sure that the hare actually gets its advantage of
-       * two steps.  */
-      if (tortoise_delay == 0)
-        {
-          tortoise_delay = 1;
-          tortoise = tortoise->trace;
-          ASSERT_SYNTAX (!scm_is_eq (hare->obj, tortoise->obj),
-                         s_bad_expression, hare->obj);
-        }
-      else
-        {
-          --tortoise_delay;
-        }
-
-      if (scm_is_simple_vector (hare->obj))
-        {
-          size_t length = SCM_SIMPLE_VECTOR_LENGTH (hare->obj);
-          SCM new_vector = scm_c_make_vector (length, SCM_UNSPECIFIED);
-
-          /* Each vector element is copied by recursing into copy_tree, having
-           * the tortoise follow the hare into the depths of the stack.  */
-          unsigned long int i;
-          for (i = 0; i < length; ++i)
-            {
-              SCM new_element;
-              new_hare.obj = SCM_SIMPLE_VECTOR_REF (hare->obj, i);
-              new_element = copy_tree (&new_hare, tortoise, tortoise_delay);
-              SCM_SIMPLE_VECTOR_SET (new_vector, i, new_element);
-            }
-
-          return new_vector;
-        }
-      else /* scm_is_pair (hare->obj) */
-        {
-          SCM result;
-          SCM tail;
-
-          SCM rabbit = hare->obj;
-          SCM turtle = hare->obj;
-
-          SCM copy;
-
-          /* The first pair of the list is treated specially, in order to
-           * preserve a potential source code position.  */
-          result = tail = scm_cons_source (rabbit, SCM_EOL, SCM_EOL);
-          new_hare.obj = SCM_CAR (rabbit);
-          copy = copy_tree (&new_hare, tortoise, tortoise_delay);
-          SCM_SETCAR (tail, copy);
-
-          /* The remaining pairs of the list are copied by, horizontally,
-           * having the turtle follow the rabbit, and, vertically, having the
-           * tortoise follow the hare into the depths of the stack.  */
-          rabbit = SCM_CDR (rabbit);
-          while (scm_is_pair (rabbit))
-            {
-              new_hare.obj = SCM_CAR (rabbit);
-              copy = copy_tree (&new_hare, tortoise, tortoise_delay);
-              SCM_SETCDR (tail, scm_cons (copy, SCM_UNDEFINED));
-              tail = SCM_CDR (tail);
-
-              rabbit = SCM_CDR (rabbit);
-              if (scm_is_pair (rabbit))
-                {
-                  new_hare.obj = SCM_CAR (rabbit);
-                  copy = copy_tree (&new_hare, tortoise, tortoise_delay);
-                  SCM_SETCDR (tail, scm_cons (copy, SCM_UNDEFINED));
-                  tail = SCM_CDR (tail);
-                  rabbit = SCM_CDR (rabbit);
-
-                  turtle = SCM_CDR (turtle);
-                  ASSERT_SYNTAX (!scm_is_eq (rabbit, turtle),
-                                 s_bad_expression, rabbit);
-                }
-            }
-
-          /* We have to recurse into copy_tree again for the last cdr, in
-           * order to handle the situation that it holds a vector.  */
-          new_hare.obj = rabbit;
-          copy = copy_tree (&new_hare, tortoise, tortoise_delay);
-          SCM_SETCDR (tail, copy);
-
-          return result;
-        }
-    }
-}
-
-SCM_DEFINE (scm_copy_tree, "copy-tree", 1, 0, 0, 
-            (SCM obj),
-           "Recursively copy the data tree that is bound to @var{obj}, and 
return a\n"
-           "the new data structure.  @code{copy-tree} recurses down the\n"
-           "contents of both pairs and vectors (since both cons cells and 
vector\n"
-           "cells may point to arbitrary objects), and stops recursing when it 
hits\n"
-           "any other object.")
-#define FUNC_NAME s_scm_copy_tree
+scm_c_primitive_eval (SCM exp)
 {
-  /* Prepare the trace along the stack.  */
-  struct t_trace trace;
-  trace.obj = obj;
-
-  /* In function copy_tree, if the tortoise makes its step, it will do this
-   * before the hare has the chance to move.  Thus, we have to make sure that
-   * the very first step of the tortoise will not happen after the hare has
-   * really made two steps.  This is achieved by passing '2' as the initial
-   * delay for the tortoise.  NOTE: Since cycles are unlikely, giving the hare
-   * a bigger advantage may improve performance slightly.  */
-  return copy_tree (&trace, &trace, 2);
-}
-#undef FUNC_NAME
-
-
-/* We have three levels of EVAL here:
-
-   - scm_i_eval (exp, env)
-
-     evaluates EXP in environment ENV.  ENV is a lexical environment
-     structure as used by the actual tree code evaluator.  When ENV is
-     a top-level environment, then changes to the current module are
-     tracked by updating ENV so that it continues to be in sync with
-     the current module.
-
-   - scm_primitive_eval (exp)
-
-     evaluates EXP in the top-level environment as determined by the
-     current module.  This is done by constructing a suitable
-     environment and calling scm_i_eval.  Thus, changes to the
-     top-level module are tracked normally.
-
-   - scm_eval (exp, mod_or_state)
-
-     evaluates EXP while MOD_OR_STATE is the current module or current
-     dynamic state (as appropriate).  This is done by setting the
-     current module (or dynamic state) to MOD_OR_STATE, invoking
-     scm_primitive_eval on EXP, and then restoring the current module
-     (or dynamic state) to the value it had previously.  That is,
-     while EXP is evaluated, changes to the current module (or dynamic
-     state) are tracked, but these changes do not persist when
-     scm_eval returns.
-
-  For each level of evals, there are two variants, distinguished by a
-  _x suffix: the ordinary variant does not modify EXP while the _x
-  variant can destructively modify EXP into something completely
-  unintelligible.  A Scheme data structure passed as EXP to one of the
-  _x variants should not ever be used again for anything.  So when in
-  doubt, use the ordinary variant.
-
-*/
-
-SCM 
-scm_i_eval_x (SCM exp, SCM env)
-{
-  if (scm_is_symbol (exp))
-    return *scm_lookupcar (scm_cons (exp, SCM_UNDEFINED), env, 1);
-  else
-    return SCM_I_XEVAL (exp, env, scm_debug_mode_p);
-}
-
-SCM 
-scm_i_eval (SCM exp, SCM env)
-{
-  exp = scm_copy_tree (exp);
-  if (scm_is_symbol (exp))
-    return *scm_lookupcar (scm_cons (exp, SCM_UNDEFINED), env, 1);
-  else
-    return SCM_I_XEVAL (exp, env, scm_debug_mode_p);
-}
-
-SCM
-scm_primitive_eval_x (SCM exp)
-{
-  SCM env;
   SCM transformer = scm_current_module_transformer ();
-  if (SCM_NIMP (transformer))
+  if (scm_is_true (transformer))
     exp = scm_call_1 (transformer, exp);
-  env = scm_top_level_env (scm_current_module_lookup_closure ());
-  return scm_i_eval_x (exp, env);
+  exp = scm_memoize_expression (exp);
+  return eval (exp, SCM_EOL);
 }
 
-SCM_DEFINE (scm_primitive_eval, "primitive-eval", 1, 0, 0,
-           (SCM exp),
-           "Evaluate @var{exp} in the top-level environment specified by\n"
-           "the current module.")
-#define FUNC_NAME s_scm_primitive_eval
+static SCM var_primitive_eval;
+SCM
+scm_primitive_eval (SCM exp)
 {
-  SCM env;
-  SCM transformer = scm_current_module_transformer ();
-  if (scm_is_true (transformer))
-    exp = scm_call_1 (transformer, exp);
-  env = scm_top_level_env (scm_current_module_lookup_closure ());
-  return scm_i_eval (exp, env);
+  return scm_c_vm_run (scm_the_vm (), scm_variable_ref (var_primitive_eval),
+                       &exp, 1);
 }
-#undef FUNC_NAME
 
 
 /* Eval does not take the second arg optionally.  This is intentional
@@ -4037,23 +872,6 @@ SCM_DEFINE (scm_primitive_eval, "primitive-eval", 1, 0, 0,
  * system, where we would like to make the choice of evaluation
  * environment explicit.  */
 
-SCM
-scm_eval_x (SCM exp, SCM module_or_state)
-{
-  SCM res;
-
-  scm_dynwind_begin (SCM_F_DYNWIND_REWINDABLE);
-  if (scm_is_dynamic_state (module_or_state))
-    scm_dynwind_current_dynamic_state (module_or_state);
-  else
-    scm_dynwind_current_module (module_or_state);
-
-  res = scm_primitive_eval_x (exp);
-
-  scm_dynwind_end ();
-  return res;
-}
-
 SCM_DEFINE (scm_eval, "eval", 2, 0, 0, 
            (SCM exp, SCM module_or_state),
            "Evaluate @var{exp}, a list representing a Scheme expression,\n"
@@ -4086,41 +904,52 @@ SCM_DEFINE (scm_eval, "eval", 2, 0, 0,
 #undef FUNC_NAME
 
 
-/* At this point, deval and scm_dapply are generated.
- */
+static SCM f_apply;
+
+/* Apply a function to a list of arguments.
+
+   This function is exported to the Scheme level as taking two
+   required arguments and a tail argument, as if it were:
+       (lambda (proc arg1 . args) ...)
+   Thus, if you just have a list of arguments to pass to a procedure,
+   pass the list as ARG1, and '() for ARGS.  If you have some fixed
+   args, pass the first as ARG1, then cons any remaining fixed args
+   onto the front of your argument list, and pass that as ARGS.  */
+
+SCM 
+scm_apply (SCM proc, SCM arg1, SCM args)
+{
+  /* Fix things up so that args contains all args. */
+  if (scm_is_null (args))
+    args = arg1;
+  else
+    args = scm_cons_star (arg1, args);
 
-#define DEVAL
-#include "eval.i.c"
-#undef DEVAL
-#include "eval.i.c"
+  return scm_vm_apply (scm_the_vm (), proc, args);
+}
 
 
 void 
 scm_init_eval ()
 {
-  scm_i_pthread_mutex_init (&source_mutex,
-                           scm_i_pthread_mutexattr_recursive);
+  SCM primitive_eval;
 
   scm_init_opts (scm_evaluator_traps,
                 scm_evaluator_trap_table);
   scm_init_opts (scm_eval_options_interface,
                 scm_eval_opts);
   
-  scm_tc16_promise = scm_make_smob_type ("promise", 0);
-  scm_set_smob_print (scm_tc16_promise, promise_print);
-
-  undefineds = scm_list_1 (SCM_UNDEFINED);
-  SCM_SETCDR (undefineds, undefineds);
-  scm_permanent_object (undefineds);
-
   scm_listofnull = scm_list_1 (SCM_EOL);
 
   f_apply = scm_c_define_subr ("apply", scm_tc7_lsubr_2, scm_apply);
   scm_permanent_object (f_apply);
 
-#include "libguile/eval.x"
+  primitive_eval = scm_c_make_gsubr ("primitive-eval", 1, 0, 0,
+                                     scm_c_primitive_eval);
+  var_primitive_eval = scm_define (SCM_SUBR_NAME (primitive_eval),
+                                   primitive_eval);
 
-  scm_add_feature ("delay");
+#include "libguile/eval.x"
 }
 
 /*
diff --git a/libguile/eval.h b/libguile/eval.h
index 522f639..62b84c1 100644
--- a/libguile/eval.h
+++ b/libguile/eval.h
@@ -27,6 +27,7 @@
 #include "libguile/__scm.h"
 
 #include "libguile/struct.h"
+#include "libguile/memoize.h"
 
 
 
@@ -45,23 +46,6 @@
 
 
 
-/* {Promises}
- */
-
-#define SCM_F_PROMISE_COMPUTED (1L << 0)
-#define SCM_PROMISE_COMPUTED_P(promise) \
-  (SCM_F_PROMISE_COMPUTED & SCM_SMOB_FLAGS (promise))
-#define SCM_SET_PROMISE_COMPUTED(promise) \
-  SCM_SET_SMOB_FLAGS ((promise), SCM_F_PROMISE_COMPUTED)
-#define SCM_PROMISE_MUTEX     SCM_SMOB_OBJECT_2
-#define SCM_PROMISE_DATA      SCM_SMOB_OBJECT
-#define SCM_SET_PROMISE_DATA  SCM_SET_SMOB_OBJECT
-
-
-SCM_API scm_t_bits scm_tc16_promise;
-
-
-
 /* {Evaluator}
  */
 
@@ -79,42 +63,6 @@ typedef SCM (*scm_t_trampoline_2) (SCM proc, SCM arg1, SCM 
arg2);
 
 
 
-SCM_API SCM scm_sym_and;
-SCM_API SCM scm_sym_begin;
-SCM_API SCM scm_sym_case;
-SCM_API SCM scm_sym_cond;
-SCM_API SCM scm_sym_define;
-SCM_API SCM scm_sym_do;
-SCM_API SCM scm_sym_if;
-SCM_API SCM scm_sym_lambda;
-SCM_API SCM scm_sym_let;
-SCM_API SCM scm_sym_letstar;
-SCM_API SCM scm_sym_letrec;
-SCM_API SCM scm_sym_quote;
-SCM_API SCM scm_sym_quasiquote;
-SCM_API SCM scm_sym_unquote;
-SCM_API SCM scm_sym_uq_splicing;
-
-SCM_API SCM scm_sym_at;
-SCM_API SCM scm_sym_atat;
-SCM_API SCM scm_sym_atapply;
-SCM_API SCM scm_sym_atcall_cc;
-SCM_API SCM scm_sym_at_call_with_values;
-SCM_API SCM scm_sym_delay;
-SCM_API SCM scm_sym_eval_when;
-SCM_API SCM scm_sym_arrow;
-SCM_API SCM scm_sym_else;
-SCM_API SCM scm_sym_apply;
-SCM_API SCM scm_sym_set_x;
-SCM_API SCM scm_sym_args;
-
-
-
-SCM_API SCM * scm_ilookup (SCM iloc, SCM env);
-SCM_API SCM * scm_lookupcar (SCM vloc, SCM genv, int check);
-SCM_API SCM scm_eval_car (SCM pair, SCM env);
-SCM_API SCM scm_eval_body (SCM code, SCM env);
-SCM_API SCM scm_eval_args (SCM i, SCM env, SCM proc);
 SCM_API int scm_badargsp (SCM formals, SCM args);
 SCM_API SCM scm_call_0 (SCM proc);
 SCM_API SCM scm_call_1 (SCM proc, SCM arg1);
@@ -126,44 +74,21 @@ SCM_API SCM scm_apply_1 (SCM proc, SCM arg1, SCM args);
 SCM_API SCM scm_apply_2 (SCM proc, SCM arg1, SCM arg2, SCM args);
 SCM_API SCM scm_apply_3 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM args);
 SCM_INTERNAL SCM scm_i_call_closure_0 (SCM proc);
-SCM_API scm_t_trampoline_0 scm_trampoline_0 (SCM proc);
-SCM_API scm_t_trampoline_1 scm_trampoline_1 (SCM proc);
-SCM_API scm_t_trampoline_2 scm_trampoline_2 (SCM proc);
 SCM_API SCM scm_nconc2last (SCM lst);
 SCM_API SCM scm_apply (SCM proc, SCM arg1, SCM args);
-SCM_API SCM scm_dapply (SCM proc, SCM arg1, SCM args);
+SCM_INTERNAL SCM scm_closure_apply (SCM proc, SCM args);
+#define scm_dapply(proc,arg1,args) scm_apply (proc, arg1, args)
 SCM_API SCM scm_map (SCM proc, SCM arg1, SCM args);
 SCM_API SCM scm_for_each (SCM proc, SCM arg1, SCM args);
 SCM_API SCM scm_closure (SCM code, SCM env);
-SCM_API SCM scm_make_promise (SCM thunk);
-SCM_API SCM scm_force (SCM x);
-SCM_API SCM scm_promise_p (SCM x);
-SCM_API SCM scm_cons_source (SCM xorig, SCM x, SCM y);
-SCM_API SCM scm_copy_tree (SCM obj);
-SCM_API SCM scm_i_eval_x (SCM exp, SCM env) /* not internal */;
-SCM_INTERNAL SCM scm_i_eval (SCM exp, SCM env);
 SCM_API SCM scm_primitive_eval (SCM exp);
-SCM_API SCM scm_primitive_eval_x (SCM exp);
+#define scm_primitive_eval_x(exp) scm_primitive_eval (exp)
 SCM_API SCM scm_eval (SCM exp, SCM module);
-SCM_API SCM scm_eval_x (SCM exp, SCM module);
+#define scm_eval_x(exp, module) scm_eval (exp, module)
 
-SCM_INTERNAL void scm_i_print_iloc (SCM /*iloc*/, SCM /*port*/);
-SCM_INTERNAL void scm_i_print_isym (SCM /*isym*/, SCM /*port*/);
-SCM_INTERNAL SCM scm_i_unmemocopy_expr (SCM expr, SCM env);
-SCM_INTERNAL SCM scm_i_unmemocopy_body (SCM forms, SCM env);
 SCM_INTERNAL void scm_init_eval (void);
 
 
-#if (SCM_ENABLE_DEPRECATED == 1)
-
-/* Deprecated in guile 1.7.0 on 2004-03-29.  */
-SCM_DEPRECATED SCM scm_ceval (SCM x, SCM env);
-SCM_DEPRECATED SCM scm_deval (SCM x, SCM env);
-SCM_DEPRECATED SCM (*scm_ceval_ptr) (SCM x, SCM env);
-
-#endif
-
-
 #endif  /* SCM_EVAL_H */
 
 /*
diff --git a/libguile/eval.i.c b/libguile/eval.i.c
deleted file mode 100644
index 6811698..0000000
--- a/libguile/eval.i.c
+++ /dev/null
@@ -1,1752 +0,0 @@
-/*
- * eval.i.c - actual evaluator code for GUILE
- *
- * Copyright (C) 2002, 03, 04, 05, 06, 07, 09 Free Software Foundation, Inc.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 3 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-
-#undef RETURN
-#undef ENTER_APPLY
-#undef PREP_APPLY
-#undef CEVAL
-#undef SCM_APPLY
-#undef EVAL_DEBUGGING_P
-
-
-#ifdef DEVAL
-
-/*
-  This code is specific for the debugging support.
- */
-
-#define EVAL_DEBUGGING_P 1
-#define CEVAL deval    /* Substitute all uses of ceval */
-#define SCM_APPLY scm_dapply
-#define PREP_APPLY(p, l)                                               \
-{ ++debug.info; debug.info->a.proc = p; debug.info->a.args = l; }
-
-#define ENTER_APPLY \
-do { \
-  SCM_SET_ARGSREADY (debug);\
-  if (scm_check_apply_p && SCM_TRAPS_P)\
-    if (SCM_APPLY_FRAME_P || (SCM_TRACE_P && SCM_PROCTRACEP (proc)))\
-      {\
-       SCM tmp, tail = scm_from_bool(SCM_TRACED_FRAME_P (debug)); \
-       SCM_SET_TRACED_FRAME (debug); \
-       SCM_TRAPS_P = 0;\
-        tmp = scm_make_debugobj (&debug);\
-       scm_call_3 (SCM_APPLY_FRAME_HDLR, scm_sym_apply_frame, tmp, tail);\
-       SCM_TRAPS_P = 1;\
-      }\
-} while (0)
-
-#define RETURN(e) do { proc = (e); goto exit; } while (0)
-
-#ifdef STACK_CHECKING
-# ifndef EVAL_STACK_CHECKING
-# define EVAL_STACK_CHECKING
-# endif /* EVAL_STACK_CHECKING */
-#endif /* STACK_CHECKING */
-
-
-
-
-static SCM
-deval_args (SCM l, SCM env, SCM proc, SCM *lloc)
-{
-  SCM *results = lloc;
-  while (scm_is_pair (l))
-    {
-      const SCM res = SCM_I_XEVALCAR (l, env, 1);
-
-      *lloc = scm_list_1 (res);
-      lloc = SCM_CDRLOC (*lloc);
-      l = SCM_CDR (l);
-    }
-  if (!scm_is_null (l))
-    scm_wrong_num_args (proc);
-  return *results;
-}
-
-
-#else /* DEVAL */
-
-/*
-  Code is specific to debugging-less support.
- */
-
-
-#define CEVAL ceval
-#define SCM_APPLY scm_apply
-#define PREP_APPLY(proc, args)
-#define ENTER_APPLY
-#define RETURN(x) do { return x; } while (0)
-#define EVAL_DEBUGGING_P 0
-
-#ifdef STACK_CHECKING
-# ifndef NO_CEVAL_STACK_CHECKING
-# define EVAL_STACK_CHECKING
-# endif
-#endif
-
-
-
-
-static void
-ceval_letrec_inits (SCM env, SCM init_forms, SCM **init_values_eol)
-{
-  SCM argv[10];
-  int i = 0, imax = sizeof (argv) / sizeof (SCM);
-
-  while (!scm_is_null (init_forms))
-    {
-      if (imax == i)
-       {
-         ceval_letrec_inits (env, init_forms, init_values_eol);
-         break;
-       }
-      argv[i++] = SCM_I_XEVALCAR (init_forms, env, 0);
-      init_forms = SCM_CDR (init_forms);
-    }
- 
-  for (i--; i >= 0; i--)
-    {
-      **init_values_eol = scm_list_1 (argv[i]);
-      *init_values_eol = SCM_CDRLOC (**init_values_eol);
-    }
-}
-
-static SCM 
-scm_ceval_args (SCM l, SCM env, SCM proc)
-{
-  SCM results = SCM_EOL, *lloc = &results, res;
-  while (scm_is_pair (l))
-    {
-      res = EVALCAR (l, env);
-
-      *lloc = scm_list_1 (res);
-      lloc = SCM_CDRLOC (*lloc);
-      l = SCM_CDR (l);
-    }
-  if (!scm_is_null (l))
-    scm_wrong_num_args (proc);
-  return results;
-}
-
-
-SCM 
-scm_eval_args (SCM l, SCM env, SCM proc)
-{
-  return scm_ceval_args (l, env, proc);
-}
-
-
-
-#endif
-
-
-
-
-#define EVAL(x, env) SCM_I_XEVAL(x, env, EVAL_DEBUGGING_P)
-#define EVALCAR(x, env) SCM_I_XEVALCAR(x, env, EVAL_DEBUGGING_P)
-
-
-
-/* Update the toplevel environment frame ENV so that it refers to the
- * current module.  */
-#define UPDATE_TOPLEVEL_ENV(env) \
-  do { \
-    SCM p = scm_current_module_lookup_closure (); \
-    if (p != SCM_CAR (env)) \
-      env = scm_top_level_env (p); \
-  } while (0)
-
-
-#define SCM_VALIDATE_NON_EMPTY_COMBINATION(x) \
-  ASSERT_SYNTAX (!scm_is_eq ((x), SCM_EOL), s_empty_combination, x)
-
-
-/* This is the evaluator.  Like any real monster, it has three heads:
- *
- * ceval is the non-debugging evaluator, deval is the debugging version.  Both
- * are implemented using a common code base, using the following mechanism:
- * CEVAL is a macro, which is either defined to ceval or deval.  Thus, there
- * is no function CEVAL, but the code for CEVAL actually compiles to either
- * ceval or deval.  When CEVAL is defined to ceval, it is known that the macro
- * DEVAL is not defined.  When CEVAL is defined to deval, then the macro DEVAL
- * is known to be defined.  Thus, in CEVAL parts for the debugging evaluator
- * are enclosed within #ifdef DEVAL ... #endif.
- *
- * All three (ceval, deval and their common implementation CEVAL) take two
- * input parameters, x and env: x is a single expression to be evalutated.
- * env is the environment in which bindings are searched.
- *
- * x is known to be a pair.  Since x is a single expression, it is necessarily
- * in a tail position.  If x is just a call to another function like in the
- * expression (foo exp1 exp2 ...), the realization of that call therefore
- * _must_not_ increase stack usage (the evaluation of exp1, exp2 etc.,
- * however, may do so).  This is realized by making extensive use of 'goto'
- * statements within the evaluator: The gotos replace recursive calls to
- * CEVAL, thus re-using the same stack frame that CEVAL was already using.
- * If, however, x represents some form that requires to evaluate a sequence of
- * expressions like (begin exp1 exp2 ...), then recursive calls to CEVAL are
- * performed for all but the last expression of that sequence.  */
-
-static SCM
-CEVAL (SCM x, SCM env)
-{
-  SCM proc, arg1;
-#ifdef DEVAL
-  scm_t_debug_frame debug;
-  scm_t_debug_info *debug_info_end;
-  debug.prev = scm_i_last_debug_frame ();
-  debug.status = 0;
-  /*
-   * The debug.vect contains twice as much scm_t_debug_info frames as the
-   * user has specified with (debug-set! frames <n>).
-   *
-   * Even frames are eval frames, odd frames are apply frames.
-   */
-  debug.vect = alloca (scm_debug_eframe_size * sizeof (scm_t_debug_info));
-  debug.info = debug.vect;
-  debug_info_end = debug.vect + scm_debug_eframe_size;
-  scm_i_set_last_debug_frame (&debug);
-#endif
-#ifdef EVAL_STACK_CHECKING
-  if (scm_stack_checking_enabled_p && SCM_STACK_OVERFLOW_P (&proc))
-    {
-#ifdef DEVAL
-      debug.info->e.exp = x;
-      debug.info->e.env = env;
-#endif
-      scm_report_stack_overflow ();
-    }
-#endif
-
-#ifdef DEVAL
-  goto start;
-#endif
-
-loop:
-#ifdef DEVAL
-  SCM_CLEAR_ARGSREADY (debug);
-  if (SCM_OVERFLOWP (debug))
-    --debug.info;
-  /*
-   * In theory, this should be the only place where it is necessary to
-   * check for space in debug.vect since both eval frames and
-   * available space are even.
-   *
-   * For this to be the case, however, it is necessary that primitive
-   * special forms which jump back to `loop', `begin' or some similar
-   * label call PREP_APPLY.
-   */
-  else if (++debug.info >= debug_info_end)
-    {
-      SCM_SET_OVERFLOW (debug);
-      debug.info -= 2;
-    }
-
-start:
-  debug.info->e.exp = x;
-  debug.info->e.env = env;
-  if (scm_check_entry_p && SCM_TRAPS_P)
-    {
-      if (SCM_ENTER_FRAME_P
-         || (SCM_BREAKPOINTS_P && scm_c_source_property_breakpoint_p (x)))
-       {
-         SCM stackrep;
-         SCM tail = scm_from_bool (SCM_TAILRECP (debug));
-         SCM_SET_TAILREC (debug);
-         stackrep = scm_make_debugobj (&debug);
-         SCM_TRAPS_P = 0;
-         stackrep = scm_call_4 (SCM_ENTER_FRAME_HDLR,
-                                scm_sym_enter_frame,
-                                stackrep,
-                                tail,
-                                unmemoize_expression (x, env));
-         SCM_TRAPS_P = 1;
-         if (scm_is_pair (stackrep) &&
-             scm_is_eq (SCM_CAR (stackrep), sym_instead))
-           {
-             /* This gives the possibility for the debugger to modify
-                the source expression before evaluation. */
-             x = SCM_CDR (stackrep);
-             if (SCM_IMP (x))
-               RETURN (x);
-           }
-       }
-    }
-#endif
-dispatch:
-  SCM_TICK;
-  if (SCM_ISYMP (SCM_CAR (x)))
-    {
-      switch (ISYMNUM (SCM_CAR (x)))
-        {
-        case (ISYMNUM (SCM_IM_AND)):
-          x = SCM_CDR (x);
-          while (!scm_is_null (SCM_CDR (x)))
-            {
-              SCM test_result = EVALCAR (x, env);
-              if (scm_is_false_or_nil (test_result))
-                RETURN (SCM_BOOL_F);
-              else
-                x = SCM_CDR (x);
-            }
-          PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
-          goto carloop;
-
-        case (ISYMNUM (SCM_IM_BEGIN)):
-          x = SCM_CDR (x);
-          if (scm_is_null (x))
-            RETURN (SCM_UNSPECIFIED);
-
-          PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
-
-        begin:
-          /* If we are on toplevel with a lookup closure, we need to sync
-             with the current module. */
-          if (scm_is_pair (env) && !scm_is_pair (SCM_CAR (env)))
-            {
-              UPDATE_TOPLEVEL_ENV (env);
-              while (!scm_is_null (SCM_CDR (x)))
-                {
-                  EVALCAR (x, env);
-                  UPDATE_TOPLEVEL_ENV (env);
-                  x = SCM_CDR (x);
-                }
-              goto carloop;
-            }
-          else
-            goto nontoplevel_begin;
-
-        nontoplevel_begin:
-          while (!scm_is_null (SCM_CDR (x)))
-            {
-              const SCM form = SCM_CAR (x);
-              if (SCM_IMP (form))
-                {
-                  if (SCM_ISYMP (form))
-                    {
-                     scm_dynwind_begin (0);
-                     scm_i_dynwind_pthread_mutex_lock (&source_mutex);
-                      /* check for race condition */
-                      if (SCM_ISYMP (SCM_CAR (x)))
-                        m_expand_body (x, env);
-                     scm_dynwind_end ();
-                      goto nontoplevel_begin;
-                    }
-                  else
-                    SCM_VALIDATE_NON_EMPTY_COMBINATION (form);
-                }
-              else
-                (void) EVAL (form, env);
-              x = SCM_CDR (x);
-            }
-
-        carloop:
-          {
-            /* scm_eval last form in list */
-            const SCM last_form = SCM_CAR (x);
-
-            if (scm_is_pair (last_form))
-              {
-                /* This is by far the most frequent case. */
-                x = last_form;
-                goto loop;             /* tail recurse */
-              }
-            else if (SCM_IMP (last_form))
-              RETURN (SCM_I_EVALIM (last_form, env));
-            else if (SCM_VARIABLEP (last_form))
-              RETURN (SCM_VARIABLE_REF (last_form));
-            else if (scm_is_symbol (last_form))
-             RETURN (*scm_lookupcar (x, env, 1));
-            else
-              RETURN (last_form);
-          }
-
-
-        case (ISYMNUM (SCM_IM_CASE)):
-          x = SCM_CDR (x);
-          {
-            const SCM key = EVALCAR (x, env);
-            x = SCM_CDR (x);
-            while (!scm_is_null (x))
-              {
-                const SCM clause = SCM_CAR (x);
-                SCM labels = SCM_CAR (clause);
-                if (scm_is_eq (labels, SCM_IM_ELSE))
-                  {
-                    x = SCM_CDR (clause);
-                    PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
-                    goto begin;
-                  }
-                while (!scm_is_null (labels))
-                  {
-                    const SCM label = SCM_CAR (labels);
-                    if (scm_is_eq (label, key)
-                        || scm_is_true (scm_eqv_p (label, key)))
-                      {
-                        x = SCM_CDR (clause);
-                        PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
-                        goto begin;
-                      }
-                    labels = SCM_CDR (labels);
-                  }
-                x = SCM_CDR (x);
-              }
-          }
-          RETURN (SCM_UNSPECIFIED);
-
-
-        case (ISYMNUM (SCM_IM_COND)):
-          x = SCM_CDR (x);
-          while (!scm_is_null (x))
-            {
-              const SCM clause = SCM_CAR (x);
-              if (scm_is_eq (SCM_CAR (clause), SCM_IM_ELSE))
-                {
-                  x = SCM_CDR (clause);
-                  PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
-                  goto begin;
-                }
-              else
-                {
-                  arg1 = EVALCAR (clause, env);
-                 /* SRFI 61 extended cond */
-                 if (!scm_is_null (SCM_CDR (clause))
-                     && !scm_is_null (SCM_CDDR (clause))
-                     && scm_is_eq (SCM_CADDR (clause), SCM_IM_ARROW))
-                   {
-                     SCM xx, guard_result;
-                     if (SCM_VALUESP (arg1))
-                       arg1 = scm_struct_ref (arg1, SCM_INUM0);
-                     else
-                       arg1 = scm_list_1 (arg1);
-                     xx = SCM_CDR (clause);
-                     proc = EVALCAR (xx, env);
-                     guard_result = SCM_APPLY (proc, arg1, SCM_EOL);
-                     if (scm_is_true_and_not_nil (guard_result))
-                       {
-                         proc = SCM_CDDR (xx);
-                         proc = EVALCAR (proc, env);
-                         PREP_APPLY (proc, arg1);
-                         goto apply_proc;
-                       }
-                   }
-                  else if (scm_is_true_and_not_nil (arg1))
-                    {
-                      x = SCM_CDR (clause);
-                      if (scm_is_null (x))
-                        RETURN (arg1);
-                      else if (!scm_is_eq (SCM_CAR (x), SCM_IM_ARROW))
-                        {
-                          PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
-                          goto begin;
-                        }
-                      else
-                        {
-                          proc = SCM_CDR (x);
-                          proc = EVALCAR (proc, env);
-                          PREP_APPLY (proc, scm_list_1 (arg1));
-                          ENTER_APPLY;
-                          goto evap1;
-                        }
-                    }
-                  x = SCM_CDR (x);
-                }
-            }
-          RETURN (SCM_UNSPECIFIED);
-
-
-        case (ISYMNUM (SCM_IM_DO)):
-          x = SCM_CDR (x);
-          {
-            /* Compute the initialization values and the initial environment.  
*/
-            SCM init_forms = SCM_CAR (x);
-            SCM init_values = SCM_EOL;
-            while (!scm_is_null (init_forms))
-              {
-                init_values = scm_cons (EVALCAR (init_forms, env), 
init_values);
-                init_forms = SCM_CDR (init_forms);
-              }
-            x = SCM_CDR (x);
-            env = SCM_EXTEND_ENV (SCM_CAR (x), init_values, env);
-          }
-          x = SCM_CDR (x);
-          {
-            SCM test_form = SCM_CAR (x);
-            SCM body_forms = SCM_CADR (x);
-            SCM step_forms = SCM_CDDR (x);
-
-            SCM test_result = EVALCAR (test_form, env);
-
-            while (scm_is_false_or_nil (test_result))
-              {
-                {
-                  /* Evaluate body forms.  */
-                  SCM temp_forms;
-                  for (temp_forms = body_forms;
-                       !scm_is_null (temp_forms);
-                       temp_forms = SCM_CDR (temp_forms))
-                    {
-                      SCM form = SCM_CAR (temp_forms);
-                      /* Dirk:FIXME: We only need to eval forms that may have
-                       * a side effect here.  This is only true for forms that
-                       * start with a pair.  All others are just constants.
-                       * Since with the current memoizer 'form' may hold a
-                       * constant, we call EVAL here to handle the constant
-                       * cases.  In the long run it would make sense to have
-                       * the macro transformer of 'do' eliminate all forms
-                       * that have no sideeffect.  Then instead of EVAL we
-                       * could call CEVAL directly here.  */
-                      (void) EVAL (form, env);
-                    }
-                }
-
-                {
-                  /* Evaluate the step expressions.  */
-                  SCM temp_forms;
-                  SCM step_values = SCM_EOL;
-                  for (temp_forms = step_forms;
-                       !scm_is_null (temp_forms);
-                       temp_forms = SCM_CDR (temp_forms))
-                    {
-                      const SCM value = EVALCAR (temp_forms, env);
-                      step_values = scm_cons (value, step_values);
-                    }
-                  env = SCM_EXTEND_ENV (SCM_CAAR (env),
-                                        step_values,
-                                        SCM_CDR (env));
-                }
-
-                test_result = EVALCAR (test_form, env);
-              }
-          }
-          x = SCM_CDAR (x);
-          if (scm_is_null (x))
-            RETURN (SCM_UNSPECIFIED);
-          PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
-          goto nontoplevel_begin;
-
-
-        case (ISYMNUM (SCM_IM_IF)):
-          x = SCM_CDR (x);
-          {
-            SCM test_result = EVALCAR (x, env);
-            x = SCM_CDR (x);  /* then expression */
-            if (scm_is_false_or_nil (test_result))
-              {
-                x = SCM_CDR (x);  /* else expression */
-                if (scm_is_null (x))
-                  RETURN (SCM_UNSPECIFIED);
-              }
-          }
-          PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
-          goto carloop;
-
-
-        case (ISYMNUM (SCM_IM_LET)):
-          x = SCM_CDR (x);
-          {
-            SCM init_forms = SCM_CADR (x);
-            SCM init_values = SCM_EOL;
-            do
-              {
-                init_values = scm_cons (EVALCAR (init_forms, env), 
init_values);
-                init_forms = SCM_CDR (init_forms);
-              }
-            while (!scm_is_null (init_forms));
-            env = SCM_EXTEND_ENV (SCM_CAR (x), init_values, env);
-          }
-          x = SCM_CDDR (x);
-          PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
-          goto nontoplevel_begin;
-
-
-        case (ISYMNUM (SCM_IM_LETREC)):
-          x = SCM_CDR (x);
-          env = SCM_EXTEND_ENV (SCM_CAR (x), undefineds, env);
-          x = SCM_CDR (x);
-          {
-            SCM init_forms = SCM_CAR (x);
-           SCM init_values = scm_list_1 (SCM_BOOL_T);
-           SCM *init_values_eol = SCM_CDRLOC (init_values);
-           ceval_letrec_inits (env, init_forms, &init_values_eol);
-            SCM_SETCDR (SCM_CAR (env), SCM_CDR (init_values));
-          }
-          x = SCM_CDR (x);
-          PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
-          goto nontoplevel_begin;
-
-
-        case (ISYMNUM (SCM_IM_LETSTAR)):
-          x = SCM_CDR (x);
-          {
-            SCM bindings = SCM_CAR (x);
-            if (!scm_is_null (bindings))
-              {
-                do
-                  {
-                    SCM name = SCM_CAR (bindings);
-                    SCM init = SCM_CDR (bindings);
-                    env = SCM_EXTEND_ENV (name, EVALCAR (init, env), env);
-                    bindings = SCM_CDR (init);
-                  }
-                while (!scm_is_null (bindings));
-              }
-          }
-          x = SCM_CDR (x);
-          PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
-          goto nontoplevel_begin;
-
-
-        case (ISYMNUM (SCM_IM_OR)):
-          x = SCM_CDR (x);
-          while (!scm_is_null (SCM_CDR (x)))
-            {
-              SCM val = EVALCAR (x, env);
-              if (scm_is_true_and_not_nil (val))
-                RETURN (val);
-              else
-                x = SCM_CDR (x);
-            }
-          PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
-          goto carloop;
-
-
-        case (ISYMNUM (SCM_IM_LAMBDA)):
-          RETURN (scm_closure (SCM_CDR (x), env));
-
-
-        case (ISYMNUM (SCM_IM_QUOTE)):
-          RETURN (SCM_CDR (x));
-
-
-        case (ISYMNUM (SCM_IM_SET_X)):
-          x = SCM_CDR (x);
-          {
-            SCM *location;
-            SCM variable = SCM_CAR (x);
-            if (SCM_ILOCP (variable))
-              location = scm_ilookup (variable, env);
-            else if (SCM_VARIABLEP (variable))
-              location = SCM_VARIABLE_LOC (variable);
-            else
-              {
-                /* (scm_is_symbol (variable)) is known to be true */
-                variable = lazy_memoize_variable (variable, env);
-                SCM_SETCAR (x, variable);
-                location = SCM_VARIABLE_LOC (variable);
-              }
-            x = SCM_CDR (x);
-            *location = EVALCAR (x, env);
-          }
-          RETURN (SCM_UNSPECIFIED);
-
-
-       case (ISYMNUM (SCM_IM_APPLY)):
-          /* Evaluate the procedure to be applied.  */
-         x = SCM_CDR (x);
-         proc = EVALCAR (x, env);
-          PREP_APPLY (proc, SCM_EOL);
-
-          /* Evaluate the argument holding the list of arguments */
-          x = SCM_CDR (x);
-          arg1 = EVALCAR (x, env);
-
-        apply_proc:
-          /* Go here to tail-apply a procedure.  PROC is the procedure and
-           * ARG1 is the list of arguments. PREP_APPLY must have been called
-           * before jumping to apply_proc.  */
-         if (SCM_CLOSUREP (proc))
-           {
-              SCM formals = SCM_CLOSURE_FORMALS (proc);
-#ifdef DEVAL
-              debug.info->a.args = arg1;
-#endif
-              if (SCM_UNLIKELY (scm_badargsp (formals, arg1)))
-                scm_wrong_num_args (proc);
-              ENTER_APPLY;
-              /* Copy argument list */
-              if (SCM_NULL_OR_NIL_P (arg1))
-                env = SCM_EXTEND_ENV (formals, SCM_EOL, SCM_ENV (proc));
-              else
-                {
-                  SCM args = scm_list_1 (SCM_CAR (arg1));
-                  SCM tail = args;
-                  arg1 = SCM_CDR (arg1);
-                  while (!SCM_NULL_OR_NIL_P (arg1))
-                    {
-                      SCM new_tail = scm_list_1 (SCM_CAR (arg1));
-                      SCM_SETCDR (tail, new_tail);
-                      tail = new_tail;
-                      arg1 = SCM_CDR (arg1);
-                    }
-                  env = SCM_EXTEND_ENV (formals, args, SCM_ENV (proc));
-                }
-
-              x = SCM_CLOSURE_BODY (proc);
-              goto nontoplevel_begin;
-           }
-         else
-           {
-              ENTER_APPLY;
-              RETURN (SCM_APPLY (proc, arg1, SCM_EOL));
-           }
-
-
-       case (ISYMNUM (SCM_IM_CONT)):
-         {
-           int first;
-           SCM val = scm_make_continuation (&first);
-
-           if (!first)
-             RETURN (val);
-           else
-             {
-               arg1 = val;
-               proc = SCM_CDR (x);
-               proc = EVALCAR (proc, env);
-               PREP_APPLY (proc, scm_list_1 (arg1));
-               ENTER_APPLY;
-               goto evap1;
-             }
-         }
-
-
-       case (ISYMNUM (SCM_IM_DELAY)):
-         RETURN (scm_make_promise (scm_closure (SCM_CDR (x), env)));
-
-       case (ISYMNUM (SCM_IM_SLOT_REF)):
-         x = SCM_CDR (x);
-         {
-           SCM instance = EVALCAR (x, env);
-           unsigned long int slot = SCM_I_INUM (SCM_CDR (x));
-           RETURN (SCM_PACK (SCM_STRUCT_DATA (instance) [slot]));
-         }
-
-
-       case (ISYMNUM (SCM_IM_SLOT_SET_X)):
-         x = SCM_CDR (x);
-         {
-           SCM instance = EVALCAR (x, env);
-           unsigned long int slot = SCM_I_INUM (SCM_CADR (x));
-           SCM value = EVALCAR (SCM_CDDR (x), env);
-           SCM_STRUCT_DATA (instance) [slot] = SCM_UNPACK (value);
-           RETURN (SCM_UNSPECIFIED);
-         }
-
-
-#if SCM_ENABLE_ELISP
-         
-       case (ISYMNUM (SCM_IM_NIL_COND)):
-         {
-           SCM test_form = SCM_CDR (x);
-           x = SCM_CDR (test_form);
-           while (!SCM_NULL_OR_NIL_P (x))
-             {
-               SCM test_result = EVALCAR (test_form, env);
-               if (!(scm_is_false (test_result)
-                     || SCM_NULL_OR_NIL_P (test_result)))
-                 {
-                   if (scm_is_eq (SCM_CAR (x), SCM_UNSPECIFIED))
-                     RETURN (test_result);
-                   PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
-                   goto carloop;
-                 }
-               else
-                 {
-                   test_form = SCM_CDR (x);
-                   x = SCM_CDR (test_form);
-                 }
-             }
-           x = test_form;
-           PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
-           goto carloop;
-         }
-
-#endif /* SCM_ENABLE_ELISP */
-
-       case (ISYMNUM (SCM_IM_BIND)):
-         {
-           SCM vars, exps, vals;
-
-           x = SCM_CDR (x);
-           vars = SCM_CAAR (x);
-           exps = SCM_CDAR (x);
-           vals = SCM_EOL;
-           while (!scm_is_null (exps))
-             {
-               vals = scm_cons (EVALCAR (exps, env), vals);
-               exps = SCM_CDR (exps);
-             }
-           
-           scm_swap_bindings (vars, vals);
-           scm_i_set_dynwinds (scm_acons (vars, vals, scm_i_dynwinds ()));
-
-           /* Ignore all but the last evaluation result.  */
-           for (x = SCM_CDR (x); !scm_is_null (SCM_CDR (x)); x = SCM_CDR (x))
-             {
-               if (scm_is_pair (SCM_CAR (x)))
-                 CEVAL (SCM_CAR (x), env);
-             }
-           proc = EVALCAR (x, env);
-         
-           scm_i_set_dynwinds (SCM_CDR (scm_i_dynwinds ()));
-           scm_swap_bindings (vars, vals);
-
-           RETURN (proc);
-         }
-
-
-       case (ISYMNUM (SCM_IM_CALL_WITH_VALUES)):
-         {
-            SCM producer;
-
-           x = SCM_CDR (x);
-           producer = EVALCAR (x, env);
-           x = SCM_CDR (x);
-           proc = EVALCAR (x, env);  /* proc is the consumer. */
-           arg1 = SCM_APPLY (producer, SCM_EOL, SCM_EOL);
-           if (SCM_VALUESP (arg1))
-              {
-                /* The list of arguments is not copied.  Rather, it is assumed
-                 * that this has been done by the 'values' procedure.  */
-                arg1 = scm_struct_ref (arg1, SCM_INUM0);
-              }
-           else
-              {
-                arg1 = scm_list_1 (arg1);
-              }
-            PREP_APPLY (proc, arg1);
-            goto apply_proc;
-         }
-
-
-       default:
-         break;
-       }
-    }
-  else
-    {
-      if (SCM_VARIABLEP (SCM_CAR (x)))
-        proc = SCM_VARIABLE_REF (SCM_CAR (x));
-      else if (SCM_ILOCP (SCM_CAR (x)))
-        proc = *scm_ilookup (SCM_CAR (x), env);
-      else if (scm_is_pair (SCM_CAR (x)))
-       proc = CEVAL (SCM_CAR (x), env);
-      else if (scm_is_symbol (SCM_CAR (x)))
-       {
-         SCM orig_sym = SCM_CAR (x);
-         {
-           SCM *location = scm_lookupcar1 (x, env, 1);
-           if (location == NULL)
-             {
-               /* we have lost the race, start again. */
-               goto dispatch;
-             }
-           proc = *location;
-#ifdef DEVAL
-           if (scm_check_memoize_p && SCM_TRAPS_P)
-             {
-               SCM arg1, retval;
-
-               SCM_CLEAR_TRACED_FRAME (debug);
-               arg1 = scm_make_debugobj (&debug);
-               retval = SCM_BOOL_T;
-               SCM_TRAPS_P = 0;
-               retval = scm_call_4 (SCM_MEMOIZE_HDLR,
-                                    scm_sym_memoize_symbol,
-                                    arg1, x, env);
-
-               /*
-                 do something with retval? 
-                */
-               SCM_TRAPS_P = 1;
-             }
-#endif
-         }
-
-         if (SCM_MACROP (proc))
-           {
-             SCM_SETCAR (x, orig_sym);  /* Undo memoizing effect of
-                                           lookupcar */
-           handle_a_macro: /* inputs: x, env, proc */
-#ifdef DEVAL
-             /* Set a flag during macro expansion so that macro
-                application frames can be deleted from the backtrace. */
-             SCM_SET_MACROEXP (debug);
-#endif
-             arg1 = SCM_APPLY (SCM_MACRO_CODE (proc), x,
-                                scm_cons (env, scm_listofnull));
-#ifdef DEVAL
-             SCM_CLEAR_MACROEXP (debug);
-#endif
-             switch (SCM_MACRO_TYPE (proc))
-               {
-               case 3:
-               case 2:
-                 if (!scm_is_pair (arg1))
-                   arg1 = scm_list_2 (SCM_IM_BEGIN, arg1);
-
-                  assert (!scm_is_eq (x, SCM_CAR (arg1))
-                          && !scm_is_eq (x, SCM_CDR (arg1)));
-
-#ifdef DEVAL
-                 if (!SCM_CLOSUREP (SCM_MACRO_CODE (proc)))
-                   {
-                     SCM_CRITICAL_SECTION_START;
-                     SCM_SETCAR (x, SCM_CAR (arg1));
-                     SCM_SETCDR (x, SCM_CDR (arg1));
-                     SCM_CRITICAL_SECTION_END;
-                     goto dispatch;
-                   }
-                 /* Prevent memoizing of debug info expression. */
-                 debug.info->e.exp = scm_cons_source (debug.info->e.exp,
-                                                      SCM_CAR (x),
-                                                      SCM_CDR (x));
-#endif
-                 SCM_CRITICAL_SECTION_START;
-                 SCM_SETCAR (x, SCM_CAR (arg1));
-                 SCM_SETCDR (x, SCM_CDR (arg1));
-                 SCM_CRITICAL_SECTION_END;
-                 PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
-                 goto loop;
-#if SCM_ENABLE_DEPRECATED == 1
-               case 1:
-                 x = arg1;
-                 if (SCM_NIMP (x))
-                   {
-                     PREP_APPLY (SCM_UNDEFINED, SCM_EOL);
-                     goto loop;
-                   }
-                 else
-                   RETURN (arg1);
-#endif
-               case 0:
-                 RETURN (arg1);
-               }
-           }
-       }
-      else
-       proc = SCM_CAR (x);
-
-      if (SCM_MACROP (proc))
-       goto handle_a_macro;
-    }
-
-
-  /* When reaching this part of the code, the following is granted: Variable x
-   * holds the first pair of an expression of the form (<function> arg ...).
-   * Variable proc holds the object that resulted from the evaluation of
-   * <function>.  In the following, the arguments (if any) will be evaluated,
-   * and proc will be applied to them.  If proc does not really hold a
-   * function object, this will be signalled as an error on the scheme
-   * level.  If the number of arguments does not match the number of arguments
-   * that are allowed to be passed to proc, also an error on the scheme level
-   * will be signalled.  */
-
-  PREP_APPLY (proc, SCM_EOL);
-  if (scm_is_null (SCM_CDR (x))) {
-    ENTER_APPLY;
-  evap0:
-    SCM_ASRTGO (!SCM_IMP (proc), badfun);
-    switch (SCM_TYP7 (proc))
-      {                                /* no arguments given */
-      case scm_tc7_subr_0:
-       RETURN (SCM_SUBRF (proc) ());
-      case scm_tc7_subr_1o:
-       RETURN (SCM_SUBRF (proc) (SCM_UNDEFINED));
-      case scm_tc7_lsubr:
-       RETURN (SCM_SUBRF (proc) (SCM_EOL));
-      case scm_tc7_rpsubr:
-       RETURN (SCM_BOOL_T);
-      case scm_tc7_asubr:
-       RETURN (SCM_SUBRF (proc) (SCM_UNDEFINED, SCM_UNDEFINED));
-      case scm_tc7_program:
-        RETURN (scm_c_vm_run (scm_the_vm (), proc, NULL, 0));
-      case scm_tc7_smob:
-       if (!SCM_SMOB_APPLICABLE_P (proc))
-         goto badfun;
-       RETURN (SCM_SMOB_APPLY_0 (proc));
-      case scm_tc7_gsubr:
-#ifdef DEVAL
-       debug.info->a.proc = proc;
-       debug.info->a.args = SCM_EOL;
-#endif
-       RETURN (scm_i_gsubr_apply (proc, SCM_UNDEFINED));
-      case scm_tc7_pws:
-       proc = SCM_PROCEDURE (proc);
-#ifdef DEVAL
-       debug.info->a.proc = proc;
-#endif
-       if (!SCM_CLOSUREP (proc))
-         goto evap0;
-        /* fallthrough */
-      case scm_tcs_closures:
-        {
-          const SCM formals = SCM_CLOSURE_FORMALS (proc);
-          if (SCM_UNLIKELY (scm_is_pair (formals)))
-            goto wrongnumargs;
-          x = SCM_CLOSURE_BODY (proc);
-          env = SCM_EXTEND_ENV (formals, SCM_EOL, SCM_ENV (proc));
-          goto nontoplevel_begin;
-        }
-      case scm_tcs_struct:
-       if (SCM_STRUCT_APPLICABLE_P (proc))
-          {
-            proc = SCM_STRUCT_PROCEDURE (proc);
-#ifdef DEVAL
-            debug.info->a.proc = proc;
-#endif
-            goto evap0;
-         }
-        else
-          goto badfun;
-      case scm_tc7_subr_1:
-      case scm_tc7_subr_2:
-      case scm_tc7_subr_2o:
-      case scm_tc7_dsubr:
-      case scm_tc7_cxr:
-      case scm_tc7_subr_3:
-      case scm_tc7_lsubr_2:
-      wrongnumargs:
-       scm_wrong_num_args (proc);
-      default:
-      badfun:
-        scm_misc_error (NULL, "Wrong type to apply: ~S", scm_list_1 (proc));
-      }
-  }
-
-  /* must handle macros by here */
-  x = SCM_CDR (x);
-  if (SCM_LIKELY (scm_is_pair (x)))
-    arg1 = EVALCAR (x, env);
-  else
-    scm_wrong_num_args (proc);
-#ifdef DEVAL
-  debug.info->a.args = scm_list_1 (arg1);
-#endif
-  x = SCM_CDR (x);
-  {
-    SCM arg2;
-    if (scm_is_null (x))
-      {
-       ENTER_APPLY;
-      evap1: /* inputs: proc, arg1 */
-        SCM_ASRTGO (!SCM_IMP (proc), badfun);
-       switch (SCM_TYP7 (proc))
-         {                             /* have one argument in arg1 */
-         case scm_tc7_subr_2o:
-           RETURN (SCM_SUBRF (proc) (arg1, SCM_UNDEFINED));
-         case scm_tc7_subr_1:
-         case scm_tc7_subr_1o:
-           RETURN (SCM_SUBRF (proc) (arg1));
-         case scm_tc7_dsubr:
-            if (SCM_I_INUMP (arg1))
-              {
-                RETURN (scm_from_double (SCM_DSUBRF (proc) ((double) 
SCM_I_INUM (arg1))));
-              }
-            else if (SCM_REALP (arg1))
-              {
-                RETURN (scm_from_double (SCM_DSUBRF (proc) (SCM_REAL_VALUE 
(arg1))));
-              }
-            else if (SCM_BIGP (arg1))
-              {
-                RETURN (scm_from_double (SCM_DSUBRF (proc) (scm_i_big2dbl 
(arg1))));
-              }
-           else if (SCM_FRACTIONP (arg1))
-             {
-                RETURN (scm_from_double (SCM_DSUBRF (proc) 
(scm_i_fraction2double (arg1))));
-             }
-           SCM_WTA_DISPATCH_1_SUBR (proc, arg1, SCM_ARG1);
-         case scm_tc7_cxr:
-           RETURN (scm_i_chase_pairs (arg1, (scm_t_bits) SCM_SUBRF (proc)));
-         case scm_tc7_rpsubr:
-           RETURN (SCM_BOOL_T);
-          case scm_tc7_program:
-            RETURN (scm_c_vm_run (scm_the_vm (), proc, &arg1, 1));
-         case scm_tc7_asubr:
-           RETURN (SCM_SUBRF (proc) (arg1, SCM_UNDEFINED));
-         case scm_tc7_lsubr:
-#ifdef DEVAL
-           RETURN (SCM_SUBRF (proc) (debug.info->a.args));
-#else
-           RETURN (SCM_SUBRF (proc) (scm_list_1 (arg1)));
-#endif
-         case scm_tc7_smob:
-           if (!SCM_SMOB_APPLICABLE_P (proc))
-             goto badfun;
-           RETURN (SCM_SMOB_APPLY_1 (proc, arg1));
-         case scm_tc7_gsubr:
-#ifdef DEVAL
-           debug.info->a.args = debug.info->a.args;
-           debug.info->a.proc = proc;
-#endif
-           RETURN (scm_i_gsubr_apply (proc, arg1, SCM_UNDEFINED));
-         case scm_tc7_pws:
-           proc = SCM_PROCEDURE (proc);
-#ifdef DEVAL
-           debug.info->a.proc = proc;
-#endif
-           if (!SCM_CLOSUREP (proc))
-             goto evap1;
-            /* fallthrough */
-         case scm_tcs_closures:
-            {
-              /* clos1: */
-              const SCM formals = SCM_CLOSURE_FORMALS (proc);
-              if (scm_is_null (formals)
-                  || (scm_is_pair (formals) && scm_is_pair (SCM_CDR 
(formals))))
-                goto wrongnumargs;
-              x = SCM_CLOSURE_BODY (proc);
-#ifdef DEVAL
-              env = SCM_EXTEND_ENV (formals,
-                                    debug.info->a.args,
-                                    SCM_ENV (proc));
-#else
-              env = SCM_EXTEND_ENV (formals,
-                                    scm_list_1 (arg1),
-                                    SCM_ENV (proc));
-#endif
-              goto nontoplevel_begin;
-            }
-         case scm_tcs_struct:
-           if (SCM_STRUCT_APPLICABLE_P (proc))
-             {
-               proc = SCM_STRUCT_PROCEDURE (proc);
-#ifdef DEVAL
-               debug.info->a.proc = proc;
-#endif
-                goto evap1;
-             }
-            else
-              goto badfun;
-         case scm_tc7_subr_2:
-         case scm_tc7_subr_0:
-         case scm_tc7_subr_3:
-         case scm_tc7_lsubr_2:
-           scm_wrong_num_args (proc);
-         default:
-           goto badfun;
-         }
-      }
-    if (SCM_LIKELY (scm_is_pair (x)))
-      arg2 = EVALCAR (x, env);
-    else
-      scm_wrong_num_args (proc);
-
-    {                          /* have two or more arguments */
-#ifdef DEVAL
-      debug.info->a.args = scm_list_2 (arg1, arg2);
-#endif
-      x = SCM_CDR (x);
-      if (scm_is_null (x)) {
-       ENTER_APPLY;
-      evap2:
-        SCM_ASRTGO (!SCM_IMP (proc), badfun);
-       switch (SCM_TYP7 (proc))
-         {                     /* have two arguments */
-         case scm_tc7_subr_2:
-         case scm_tc7_subr_2o:
-           RETURN (SCM_SUBRF (proc) (arg1, arg2));
-         case scm_tc7_lsubr:
-#ifdef DEVAL
-           RETURN (SCM_SUBRF (proc) (debug.info->a.args));
-#else
-           RETURN (SCM_SUBRF (proc) (scm_list_2 (arg1, arg2)));
-#endif
-         case scm_tc7_lsubr_2:
-           RETURN (SCM_SUBRF (proc) (arg1, arg2, SCM_EOL));
-         case scm_tc7_rpsubr:
-         case scm_tc7_asubr:
-           RETURN (SCM_SUBRF (proc) (arg1, arg2));
-          case scm_tc7_program:
-            { SCM args[2];
-              args[0] = arg1;
-              args[1] = arg2;
-              RETURN (scm_c_vm_run (scm_the_vm (), proc, args, 2));
-            }
-         case scm_tc7_smob:
-           if (!SCM_SMOB_APPLICABLE_P (proc))
-             goto badfun;
-           RETURN (SCM_SMOB_APPLY_2 (proc, arg1, arg2));
-         case scm_tc7_gsubr:
-#ifdef DEVAL
-           RETURN (scm_i_gsubr_apply_list (proc, debug.info->a.args));
-#else
-           RETURN (scm_i_gsubr_apply (proc, arg1, arg2, SCM_UNDEFINED));
-#endif
-         case scm_tcs_struct:
-           if (SCM_STRUCT_APPLICABLE_P (proc))
-             {
-             operatorn:
-#ifdef DEVAL
-               RETURN (SCM_APPLY (SCM_STRUCT_PROCEDURE (proc),
-                                  debug.info->a.args,
-                                  SCM_EOL));
-#else
-               RETURN (SCM_APPLY (SCM_STRUCT_PROCEDURE (proc),
-                                  scm_cons (arg1,
-                                             scm_cons (arg2,
-                                                       scm_ceval_args (x,
-                                                                      env,
-                                                                      proc))),
-                                  SCM_EOL));
-#endif
-             }
-            else
-              goto badfun;
-         case scm_tc7_subr_0:
-         case scm_tc7_dsubr:
-         case scm_tc7_cxr:
-         case scm_tc7_subr_1o:
-         case scm_tc7_subr_1:
-         case scm_tc7_subr_3:
-           scm_wrong_num_args (proc);
-         default:
-           goto badfun;
-         case scm_tc7_pws:
-           proc = SCM_PROCEDURE (proc);
-#ifdef DEVAL
-           debug.info->a.proc = proc;
-#endif
-           if (!SCM_CLOSUREP (proc))
-             goto evap2;
-            /* fallthrough */
-         case scm_tcs_closures:
-            {
-              /* clos2: */
-              const SCM formals = SCM_CLOSURE_FORMALS (proc);
-              if (scm_is_null (formals)
-                  || (scm_is_pair (formals)
-                      && (scm_is_null (SCM_CDR (formals))
-                          || (scm_is_pair (SCM_CDR (formals))
-                              && scm_is_pair (SCM_CDDR (formals))))))
-                goto wrongnumargs;
-#ifdef DEVAL
-              env = SCM_EXTEND_ENV (formals,
-                                    debug.info->a.args,
-                                    SCM_ENV (proc));
-#else
-              env = SCM_EXTEND_ENV (formals,
-                                    scm_list_2 (arg1, arg2),
-                                    SCM_ENV (proc));
-#endif
-              x = SCM_CLOSURE_BODY (proc);
-              goto nontoplevel_begin;
-            }
-         }
-      }
-      if (SCM_UNLIKELY (!scm_is_pair (x)))
-       scm_wrong_num_args (proc);
-#ifdef DEVAL
-      debug.info->a.args = scm_cons2 (arg1, arg2,
-                                     deval_args (x, env, proc,
-                                                 SCM_CDRLOC (SCM_CDR 
(debug.info->a.args))));
-#endif
-      ENTER_APPLY;
-    evap3:
-      SCM_ASRTGO (!SCM_IMP (proc), badfun);
-      switch (SCM_TYP7 (proc))
-       {                       /* have 3 or more arguments */
-#ifdef DEVAL
-       case scm_tc7_subr_3:
-         if (!scm_is_null (SCM_CDR (x)))
-           scm_wrong_num_args (proc);
-         else
-           RETURN (SCM_SUBRF (proc) (arg1, arg2,
-                                     SCM_CADDR (debug.info->a.args)));
-       case scm_tc7_asubr:
-         arg1 = SCM_SUBRF(proc)(arg1, arg2);
-         arg2 = SCM_CDDR (debug.info->a.args);
-         do
-           {
-             arg1 = SCM_SUBRF(proc)(arg1, SCM_CAR (arg2));
-             arg2 = SCM_CDR (arg2);
-           }
-         while (SCM_NIMP (arg2));
-         RETURN (arg1);
-       case scm_tc7_rpsubr:
-         if (scm_is_false (SCM_SUBRF (proc) (arg1, arg2)))
-           RETURN (SCM_BOOL_F);
-         arg1 = SCM_CDDR (debug.info->a.args);
-         do
-           {
-             if (scm_is_false (SCM_SUBRF (proc) (arg2, SCM_CAR (arg1))))
-               RETURN (SCM_BOOL_F);
-             arg2 = SCM_CAR (arg1);
-             arg1 = SCM_CDR (arg1);
-           }
-         while (SCM_NIMP (arg1));
-         RETURN (SCM_BOOL_T);
-       case scm_tc7_lsubr_2:
-         RETURN (SCM_SUBRF (proc) (arg1, arg2,
-                                   SCM_CDDR (debug.info->a.args)));
-       case scm_tc7_lsubr:
-         RETURN (SCM_SUBRF (proc) (debug.info->a.args));
-       case scm_tc7_smob:
-         if (!SCM_SMOB_APPLICABLE_P (proc))
-           goto badfun;
-         RETURN (SCM_SMOB_APPLY_3 (proc, arg1, arg2,
-                                   SCM_CDDR (debug.info->a.args)));
-       case scm_tc7_gsubr:
-         RETURN (scm_i_gsubr_apply_list (proc, debug.info->a.args));
-        case scm_tc7_program:
-          RETURN (scm_vm_apply (scm_the_vm (), proc, debug.info->a.args));
-       case scm_tc7_pws:
-         proc = SCM_PROCEDURE (proc);
-         debug.info->a.proc = proc;
-         if (!SCM_CLOSUREP (proc))
-           goto evap3;
-          /* fallthrough */
-       case scm_tcs_closures:
-          {
-            const SCM formals = SCM_CLOSURE_FORMALS (proc);
-            if (scm_is_null (formals)
-                || (scm_is_pair (formals)
-                    && (scm_is_null (SCM_CDR (formals))
-                        || (scm_is_pair (SCM_CDR (formals))
-                            && scm_badargsp (SCM_CDDR (formals), x)))))
-              goto wrongnumargs;
-            SCM_SET_ARGSREADY (debug);
-            env = SCM_EXTEND_ENV (formals,
-                                  debug.info->a.args,
-                                  SCM_ENV (proc));
-            x = SCM_CLOSURE_BODY (proc);
-            goto nontoplevel_begin;
-          }
-#else /* DEVAL */
-       case scm_tc7_subr_3:
-         if (SCM_UNLIKELY (!scm_is_null (SCM_CDR (x))))
-           scm_wrong_num_args (proc);
-         else
-           RETURN (SCM_SUBRF (proc) (arg1, arg2, EVALCAR (x, env)));
-       case scm_tc7_asubr:
-         arg1 = SCM_SUBRF (proc) (arg1, arg2);
-         do
-           {
-             arg1 = SCM_SUBRF(proc)(arg1, EVALCAR(x, env));
-             x = SCM_CDR(x);
-           }
-         while (!scm_is_null (x));
-         RETURN (arg1);
-       case scm_tc7_rpsubr:
-         if (scm_is_false (SCM_SUBRF (proc) (arg1, arg2)))
-           RETURN (SCM_BOOL_F);
-         do
-           {
-             arg1 = EVALCAR (x, env);
-             if (scm_is_false (SCM_SUBRF (proc) (arg2, arg1)))
-               RETURN (SCM_BOOL_F);
-             arg2 = arg1;
-             x = SCM_CDR (x);
-           }
-         while (!scm_is_null (x));
-         RETURN (SCM_BOOL_T);
-       case scm_tc7_lsubr_2:
-         RETURN (SCM_SUBRF (proc) (arg1, arg2, scm_ceval_args (x, env, proc)));
-       case scm_tc7_lsubr:
-         RETURN (SCM_SUBRF (proc) (scm_cons2 (arg1,
-                                              arg2,
-                                              scm_ceval_args (x, env, proc))));
-       case scm_tc7_smob:
-         if (!SCM_SMOB_APPLICABLE_P (proc))
-           goto badfun;
-         RETURN (SCM_SMOB_APPLY_3 (proc, arg1, arg2,
-                                   scm_ceval_args (x, env, proc)));
-       case scm_tc7_gsubr:
-         if (scm_is_null (SCM_CDR (x)))
-           /* 3 arguments */
-           RETURN (scm_i_gsubr_apply (proc, arg1, arg2, EVALCAR (x, env),
-                                      SCM_UNDEFINED));
-         else
-           RETURN (scm_i_gsubr_apply_list (proc,
-                                           scm_cons2 (arg1, arg2,
-                                                      scm_ceval_args (x, env,
-                                                                      proc))));
-        case scm_tc7_program:
-          RETURN (scm_vm_apply
-                  (scm_the_vm (), proc,
-                   scm_cons (arg1, scm_cons (arg2,
-                                             scm_ceval_args (x, env, proc)))));
-       case scm_tc7_pws:
-         proc = SCM_PROCEDURE (proc);
-         if (!SCM_CLOSUREP (proc))
-           goto evap3;
-          /* fallthrough */
-       case scm_tcs_closures:
-         {
-           const SCM formals = SCM_CLOSURE_FORMALS (proc);
-           if (scm_is_null (formals)
-               || (scm_is_pair (formals)
-                   && (scm_is_null (SCM_CDR (formals))
-                       || (scm_is_pair (SCM_CDR (formals))
-                           && scm_badargsp (SCM_CDDR (formals), x)))))
-             goto wrongnumargs;
-            env = SCM_EXTEND_ENV (formals,
-                                  scm_cons2 (arg1,
-                                             arg2,
-                                             scm_ceval_args (x, env, proc)),
-                                  SCM_ENV (proc));
-            x = SCM_CLOSURE_BODY (proc);
-            goto nontoplevel_begin;
-         }
-#endif /* DEVAL */
-       case scm_tcs_struct:
-         if (SCM_STRUCT_APPLICABLE_P (proc))
-           goto operatorn;
-         else
-           goto badfun;
-       case scm_tc7_subr_2:
-       case scm_tc7_subr_1o:
-       case scm_tc7_subr_2o:
-       case scm_tc7_subr_0:
-       case scm_tc7_dsubr:
-       case scm_tc7_cxr:
-       case scm_tc7_subr_1:
-         scm_wrong_num_args (proc);
-       default:
-         goto badfun;
-       }
-    }
-  }
-#ifdef DEVAL
-exit:
-  if (scm_check_exit_p && SCM_TRAPS_P)
-    if (SCM_EXIT_FRAME_P || (SCM_TRACE_P && SCM_TRACED_FRAME_P (debug)))
-      {
-       SCM_CLEAR_TRACED_FRAME (debug);
-       arg1 = scm_make_debugobj (&debug);
-       SCM_TRAPS_P = 0;
-       arg1 = scm_call_3 (SCM_EXIT_FRAME_HDLR, scm_sym_exit_frame, arg1, proc);
-       SCM_TRAPS_P = 1;
-       if (scm_is_pair (arg1) && scm_is_eq (SCM_CAR (arg1), sym_instead))
-         proc = SCM_CDR (arg1);
-      }
-  scm_i_set_last_debug_frame (debug.prev);
-  return proc;
-#endif
-}
-
-
-
-
-/* Apply a function to a list of arguments.
-
-   This function is exported to the Scheme level as taking two
-   required arguments and a tail argument, as if it were:
-       (lambda (proc arg1 . args) ...)
-   Thus, if you just have a list of arguments to pass to a procedure,
-   pass the list as ARG1, and '() for ARGS.  If you have some fixed
-   args, pass the first as ARG1, then cons any remaining fixed args
-   onto the front of your argument list, and pass that as ARGS.  */
-
-SCM 
-SCM_APPLY (SCM proc, SCM arg1, SCM args)
-{
-#ifdef DEVAL
-  scm_t_debug_frame debug;
-  scm_t_debug_info debug_vect_body;
-  debug.prev = scm_i_last_debug_frame ();
-  debug.status = SCM_APPLYFRAME;
-  debug.vect = &debug_vect_body;
-  debug.vect[0].a.proc = proc;
-  debug.vect[0].a.args = SCM_EOL;
-  scm_i_set_last_debug_frame (&debug);
-#else
-  if (scm_debug_mode_p)
-    return scm_dapply (proc, arg1, args);
-#endif
-
-  SCM_ASRTGO (SCM_NIMP (proc), badproc);
-
-  /* If ARGS is the empty list, then we're calling apply with only two
-     arguments --- ARG1 is the list of arguments for PROC.  Whatever
-     the case, futz with things so that ARG1 is the first argument to
-     give to PROC (or SCM_UNDEFINED if no args), and ARGS contains the
-     rest.
-
-     Setting the debug apply frame args this way is pretty messy.
-     Perhaps we should store arg1 and args directly in the frame as
-     received, and let scm_frame_arguments unpack them, because that's
-     a relatively rare operation.  This works for now; if the Guile
-     developer archives are still around, see Mikael's post of
-     11-Apr-97.  */
-  if (scm_is_null (args))
-    {
-      if (scm_is_null (arg1))
-       {
-         arg1 = SCM_UNDEFINED;
-#ifdef DEVAL
-         debug.vect[0].a.args = SCM_EOL;
-#endif
-       }
-      else
-       {
-#ifdef DEVAL
-         debug.vect[0].a.args = arg1;
-#endif
-         args = SCM_CDR (arg1);
-         arg1 = SCM_CAR (arg1);
-       }
-    }
-  else
-    {
-      args = scm_nconc2last (args);
-#ifdef DEVAL
-      debug.vect[0].a.args = scm_cons (arg1, args);
-#endif
-    }
-#ifdef DEVAL
-  if (SCM_ENTER_FRAME_P && SCM_TRAPS_P)
-    {
-      SCM tmp = scm_make_debugobj (&debug);
-      SCM_TRAPS_P = 0;
-      scm_call_2 (SCM_ENTER_FRAME_HDLR, scm_sym_enter_frame, tmp);
-      SCM_TRAPS_P = 1;
-    }
-  ENTER_APPLY;
-#endif
-tail:
-  switch (SCM_TYP7 (proc))
-    {
-    case scm_tc7_subr_2o:
-      if (SCM_UNLIKELY (SCM_UNBNDP (arg1)))
-       scm_wrong_num_args (proc);
-      if (scm_is_null (args))
-        args = SCM_UNDEFINED;
-      else
-        {
-          if (SCM_UNLIKELY (! scm_is_null (SCM_CDR (args))))
-            scm_wrong_num_args (proc);
-          args = SCM_CAR (args);
-        }
-      RETURN (SCM_SUBRF (proc) (arg1, args));
-    case scm_tc7_subr_2:
-      if (SCM_UNLIKELY (scm_is_null (args) ||
-                           !scm_is_null (SCM_CDR (args))))
-       scm_wrong_num_args (proc);
-      args = SCM_CAR (args);
-      RETURN (SCM_SUBRF (proc) (arg1, args));
-    case scm_tc7_subr_0:
-      if (SCM_UNLIKELY (!SCM_UNBNDP (arg1)))
-       scm_wrong_num_args (proc);
-      else
-       RETURN (SCM_SUBRF (proc) ());
-    case scm_tc7_subr_1:
-      if (SCM_UNLIKELY (SCM_UNBNDP (arg1)))
-       scm_wrong_num_args (proc);
-    case scm_tc7_subr_1o:
-      if (SCM_UNLIKELY (!scm_is_null (args)))
-       scm_wrong_num_args (proc);
-      else
-       RETURN (SCM_SUBRF (proc) (arg1));
-    case scm_tc7_dsubr:
-      if (SCM_UNLIKELY (SCM_UNBNDP (arg1) || !scm_is_null (args)))
-       scm_wrong_num_args (proc);
-      if (SCM_I_INUMP (arg1))
-        {
-          RETURN (scm_from_double (SCM_DSUBRF (proc) ((double) SCM_I_INUM 
(arg1))));
-        }
-      else if (SCM_REALP (arg1))
-        {
-          RETURN (scm_from_double (SCM_DSUBRF (proc) (SCM_REAL_VALUE (arg1))));
-        }
-      else if (SCM_BIGP (arg1))
-       {
-         RETURN (scm_from_double (SCM_DSUBRF (proc) (scm_i_big2dbl (arg1))));
-       }
-      else if (SCM_FRACTIONP (arg1))
-       {
-         RETURN (scm_from_double (SCM_DSUBRF (proc) (scm_i_fraction2double 
(arg1))));
-       }
-      SCM_WTA_DISPATCH_1_SUBR (proc, arg1, SCM_ARG1);
-    case scm_tc7_cxr:
-      if (SCM_UNLIKELY (SCM_UNBNDP (arg1) || !scm_is_null (args)))
-       scm_wrong_num_args (proc);
-      RETURN (scm_i_chase_pairs (arg1, (scm_t_bits) SCM_SUBRF (proc)));
-    case scm_tc7_subr_3:
-      if (SCM_UNLIKELY (scm_is_null (args)
-                           || scm_is_null (SCM_CDR (args))
-                           || !scm_is_null (SCM_CDDR (args))))
-       scm_wrong_num_args (proc);
-      else
-       RETURN (SCM_SUBRF (proc) (arg1, SCM_CAR (args), SCM_CADR (args)));
-    case scm_tc7_lsubr:
-#ifdef DEVAL
-      RETURN (SCM_SUBRF (proc) (SCM_UNBNDP (arg1) ? SCM_EOL : 
debug.vect[0].a.args));
-#else
-      RETURN (SCM_SUBRF (proc) (SCM_UNBNDP (arg1) ? SCM_EOL : scm_cons (arg1, 
args)));
-#endif
-    case scm_tc7_lsubr_2:
-      if (SCM_UNLIKELY (!scm_is_pair (args)))
-       scm_wrong_num_args (proc);
-      else
-       RETURN (SCM_SUBRF (proc) (arg1, SCM_CAR (args), SCM_CDR (args)));
-    case scm_tc7_asubr:
-      if (scm_is_null (args))
-       RETURN (SCM_SUBRF (proc) (arg1, SCM_UNDEFINED));
-      while (SCM_NIMP (args))
-       {
-         SCM_ASSERT (scm_is_pair (args), args, SCM_ARG2, "apply");
-         arg1 = SCM_SUBRF (proc) (arg1, SCM_CAR (args));
-         args = SCM_CDR (args);
-       }
-      RETURN (arg1);
-    case scm_tc7_program:
-      if (SCM_UNBNDP (arg1))
-        RETURN (scm_c_vm_run (scm_the_vm (), proc, NULL, 0));
-      else
-        RETURN (scm_vm_apply (scm_the_vm (), proc, scm_cons (arg1, args)));
-    case scm_tc7_rpsubr:
-      if (scm_is_null (args))
-       RETURN (SCM_BOOL_T);
-      while (SCM_NIMP (args))
-       {
-         SCM_ASSERT (scm_is_pair (args), args, SCM_ARG2, "apply");
-         if (scm_is_false (SCM_SUBRF (proc) (arg1, SCM_CAR (args))))
-           RETURN (SCM_BOOL_F);
-         arg1 = SCM_CAR (args);
-         args = SCM_CDR (args);
-       }
-      RETURN (SCM_BOOL_T);
-    case scm_tcs_closures:
-#ifdef DEVAL
-      arg1 = (SCM_UNBNDP (arg1) ? SCM_EOL : debug.vect[0].a.args);
-#else
-      arg1 = (SCM_UNBNDP (arg1) ? SCM_EOL : scm_cons (arg1, args));
-#endif
-      if (SCM_UNLIKELY (scm_badargsp (SCM_CLOSURE_FORMALS (proc), arg1)))
-       scm_wrong_num_args (proc);
-      
-      /* Copy argument list */
-      if (SCM_IMP (arg1))
-       args = arg1;
-      else
-       {
-         SCM tl = args = scm_cons (SCM_CAR (arg1), SCM_UNSPECIFIED);
-         for (arg1 = SCM_CDR (arg1); scm_is_pair (arg1); arg1 = SCM_CDR (arg1))
-           {
-             SCM_SETCDR (tl, scm_cons (SCM_CAR (arg1), SCM_UNSPECIFIED));
-             tl = SCM_CDR (tl);
-           }
-         SCM_SETCDR (tl, arg1);
-       }
-      
-      args = SCM_EXTEND_ENV (SCM_CLOSURE_FORMALS (proc),
-                             args,
-                             SCM_ENV (proc));
-      proc = SCM_CLOSURE_BODY (proc);
-    again:
-      arg1 = SCM_CDR (proc);
-      while (!scm_is_null (arg1))
-       {
-         if (SCM_IMP (SCM_CAR (proc)))
-           {
-             if (SCM_ISYMP (SCM_CAR (proc)))
-               {
-                 scm_dynwind_begin (0);
-                 scm_i_dynwind_pthread_mutex_lock (&source_mutex);
-                 /* check for race condition */
-                 if (SCM_ISYMP (SCM_CAR (proc)))
-                   m_expand_body (proc, args);
-                 scm_dynwind_end ();
-                 goto again;
-               }
-             else
-               SCM_VALIDATE_NON_EMPTY_COMBINATION (SCM_CAR (proc));
-           }
-         else
-           (void) EVAL (SCM_CAR (proc), args);
-         proc = arg1;
-          arg1 = SCM_CDR (proc);
-       }
-      RETURN (EVALCAR (proc, args));
-    case scm_tc7_smob:
-      if (!SCM_SMOB_APPLICABLE_P (proc))
-       goto badproc;
-      if (SCM_UNBNDP (arg1))
-       RETURN (SCM_SMOB_APPLY_0 (proc));
-      else if (scm_is_null (args))
-       RETURN (SCM_SMOB_APPLY_1 (proc, arg1));
-      else if (scm_is_null (SCM_CDR (args)))
-       RETURN (SCM_SMOB_APPLY_2 (proc, arg1, SCM_CAR (args)));
-      else
-       RETURN (SCM_SMOB_APPLY_3 (proc, arg1, SCM_CAR (args), SCM_CDR (args)));
-    case scm_tc7_gsubr:
-#ifdef DEVAL
-      args = (SCM_UNBNDP(arg1) ? SCM_EOL : debug.vect[0].a.args);
-      debug.vect[0].a.proc = proc;
-      debug.vect[0].a.args = args;
-#else
-      args = (SCM_UNBNDP(arg1) ? SCM_EOL : scm_cons (arg1, args));
-#endif
-      RETURN (scm_i_gsubr_apply_list (proc, args));
-    case scm_tc7_pws:
-      proc = SCM_PROCEDURE (proc);
-#ifdef DEVAL
-      debug.vect[0].a.proc = proc;
-#endif
-      goto tail;
-    case scm_tcs_struct:
-      if (SCM_STRUCT_APPLICABLE_P (proc))
-       {
-          proc = SCM_STRUCT_PROCEDURE (proc);
-#ifdef DEVAL
-          debug.vect[0].a.proc = proc;
-#endif
-         if (SCM_NIMP (proc))
-           goto tail;
-         else
-           goto badproc;
-       }
-      else if (SCM_OBJ_CLASS_FLAGS (proc) & SCM_CLASSF_PURE_GENERIC)
-       {
-#ifdef DEVAL
-         args = (SCM_UNBNDP(arg1) ? SCM_EOL : debug.vect[0].a.args);
-#else
-         args = (SCM_UNBNDP(arg1) ? SCM_EOL : scm_cons (arg1, args));
-#endif
-         RETURN (scm_apply_generic (proc, args));
-       }
-      else
-        goto badproc;
-    default:
-    badproc:
-      scm_wrong_type_arg ("apply", SCM_ARG1, proc);
-    }
-#ifdef DEVAL
-exit:
-  if (scm_check_exit_p && SCM_TRAPS_P)
-    if (SCM_EXIT_FRAME_P || (SCM_TRACE_P && SCM_TRACED_FRAME_P (debug)))
-      {
-       SCM_CLEAR_TRACED_FRAME (debug);
-       arg1 = scm_make_debugobj (&debug);
-       SCM_TRAPS_P = 0;
-       arg1 = scm_call_3 (SCM_EXIT_FRAME_HDLR, scm_sym_exit_frame, arg1, proc);
-       SCM_TRAPS_P = 1;
-       if (scm_is_pair (arg1) && scm_is_eq (SCM_CAR (arg1), sym_instead))
-         proc = SCM_CDR (arg1);
-      }
-  scm_i_set_last_debug_frame (debug.prev);
-  return proc;
-#endif
-}
-
diff --git a/libguile/gdbint.c b/libguile/gdbint.c
index 0d55e7d..351b7ba 100644
--- a/libguile/gdbint.c
+++ b/libguile/gdbint.c
@@ -1,5 +1,5 @@
 /* GDB interface for Guile
- * Copyright (C) 1996,1997,1999,2000,2001,2002,2004
+ * Copyright (C) 1996,1997,1999,2000,2001,2002,2004,2009
  * Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
@@ -190,8 +190,7 @@ gdb_eval (SCM exp)
     }
   SCM_BEGIN_FOREIGN_BLOCK;
   {
-    SCM env = scm_top_level_env (SCM_TOP_LEVEL_LOOKUP_CLOSURE);
-    gdb_result = scm_permanent_object (scm_i_eval_x (exp, env));
+    gdb_result = scm_permanent_object (scm_primitive_eval (exp));
   }
   SCM_END_FOREIGN_BLOCK;
   return 0;
diff --git a/libguile/goops.c b/libguile/goops.c
index 89047cf..dcb1b7d 100644
--- a/libguile/goops.c
+++ b/libguile/goops.c
@@ -465,11 +465,10 @@ compute_getters_n_setters (SCM slots)
          init = scm_get_keyword (k_init_value, options, 0);
          if (init)
             {
-              init = scm_i_eval_x (scm_list_3 (scm_sym_lambda,
-                                               SCM_EOL,
-                                               scm_list_2 (scm_sym_quote,
-                                                           init)),
-                                   SCM_EOL);
+              init = scm_primitive_eval (scm_list_3 (scm_sym_lambda,
+                                                     SCM_EOL,
+                                                     scm_list_2 (scm_sym_quote,
+                                                                 init)));
             }
          else
            init = scm_get_keyword (k_init_thunk, options, SCM_BOOL_F);
@@ -785,8 +784,6 @@ scm_basic_basic_make_class (SCM class, SCM name, SCM 
dsupers, SCM dslots)
   SCM_SET_SLOT (z, scm_si_nfields, nfields);
   SCM_SET_SLOT (z, scm_si_getters_n_setters, g_n_s);
   SCM_SET_SLOT (z, scm_si_redefined, SCM_BOOL_F);
-  SCM_SET_SLOT (z, scm_si_environment,
-               scm_top_level_env (SCM_TOP_LEVEL_LOOKUP_CLOSURE));
 
   /* Add this class in the direct-subclasses slot of dsupers */
   {
@@ -840,7 +837,6 @@ SCM_SYMBOL (sym_slots, "slots");
 SCM_SYMBOL (sym_getters_n_setters, "getters-n-setters");
 SCM_SYMBOL (sym_keyword_access, "keyword-access");
 SCM_SYMBOL (sym_nfields, "nfields");
-SCM_SYMBOL (sym_environment, "environment");
 
 
 static SCM
@@ -876,7 +872,6 @@ build_class_class_slots ()
     scm_list_1 (sym_getters_n_setters),
     scm_list_1 (sym_keyword_access),
     scm_list_1 (sym_nfields),
-    scm_list_1 (sym_environment),
     SCM_UNDEFINED);
 }
 
@@ -905,8 +900,6 @@ create_basic_classes (void)
   /* SCM_SET_SLOT (scm_class_class, scm_si_getters_n_setters,
                    compute_getters_n_setters (slots_of_class)); */
   SCM_SET_SLOT (scm_class_class, scm_si_redefined, SCM_BOOL_F);
-  SCM_SET_SLOT (scm_class_class, scm_si_environment,
-               scm_top_level_env (SCM_TOP_LEVEL_LOOKUP_CLOSURE));
 
   prep_hashsets (scm_class_class);
 
@@ -1024,17 +1017,6 @@ SCM_DEFINE (scm_class_slots, "class-slots", 1, 0, 0,
 }
 #undef FUNC_NAME
 
-SCM_DEFINE (scm_class_environment, "class-environment", 1, 0, 0,
-           (SCM obj),
-           "Return the environment of the class @var{obj}.")
-#define FUNC_NAME s_scm_class_environment
-{
-  SCM_VALIDATE_CLASS (1, obj);
-  return scm_slot_ref(obj, sym_environment);
-}
-#undef FUNC_NAME
-
-
 SCM_DEFINE (scm_generic_function_name, "generic-function-name", 1, 0, 0,
            (SCM obj),
            "Return the name of the generic function @var{obj}.")
@@ -1245,20 +1227,7 @@ get_slot_value (SCM class SCM_UNUSED, SCM obj, SCM 
slotdef)
        access bits for us. */
     return scm_struct_ref (obj, access);
   else
-    {
-      /* We must evaluate (apply (car access) (list obj))
-       * where (car access) is known to be a closure of arity 1  */
-      register SCM code, env;
-
-      code = SCM_CAR (access);
-      if (!SCM_CLOSUREP (code))
-       return scm_call_1 (code, obj);
-      env  = SCM_EXTEND_ENV (SCM_CLOSURE_FORMALS (code),
-                            scm_list_1 (obj),
-                            SCM_ENV (code));
-      /* Evaluate the closure body */
-      return scm_eval_body (SCM_CLOSURE_BODY (code), env);
-    }
+    return scm_call_1 (SCM_CAR (access), obj);
 }
 #undef FUNC_NAME
 
@@ -1288,23 +1257,8 @@ set_slot_value (SCM class SCM_UNUSED, SCM obj, SCM 
slotdef, SCM value)
     /* obey permissions bits via going through struct-set! */
     scm_struct_set_x (obj, access, value);
   else
-    {
-      /* We must evaluate (apply (cadr l) (list obj value))
-       * where (cadr l) is known to be a closure of arity 2  */
-      register SCM code, env;
-
-      code = SCM_CADR (access);
-      if (!SCM_CLOSUREP (code))
-       scm_call_2 (code, obj, value);
-      else
-       {
-         env  = SCM_EXTEND_ENV (SCM_CLOSURE_FORMALS (code),
-                                scm_list_2 (obj, value),
-                                SCM_ENV (code));
-         /* Evaluate the closure body */
-         scm_eval_body (SCM_CLOSURE_BODY (code), env);
-       }
-    }
+    /* ((cadr l) obj value) */
+    scm_call_2 (SCM_CADR (access), obj, value);
   return SCM_UNSPECIFIED;
 }
 #undef FUNC_NAME
diff --git a/libguile/goops.h b/libguile/goops.h
index 382422d..914ab3c 100644
--- a/libguile/goops.h
+++ b/libguile/goops.h
@@ -80,8 +80,7 @@
   "pw" /* slots */                              \
   "pw" /* getters-n-setters */                  \
   "pw" /* keyword access */                     \
-  "pw" /* nfields */                            \
-  "pw" /* environment */
+  "pw" /* nfields */
 
 #define scm_si_redefined         (scm_vtable_offset_user + 0)
 #define scm_si_h0                (scm_vtable_offset_user + 1)
@@ -104,8 +103,7 @@
 #define scm_si_getters_n_setters scm_si_name_access
 #define scm_si_keyword_access   (scm_vtable_offset_user + 17)
 #define scm_si_nfields          (scm_vtable_offset_user + 18) /* an integer */
-#define scm_si_environment      (scm_vtable_offset_user + 19) /* The 
environment in which class is built  */
-#define SCM_N_CLASS_SLOTS       (scm_vtable_offset_user + 20)
+#define SCM_N_CLASS_SLOTS       (scm_vtable_offset_user + 19)
 
 typedef struct scm_t_method {
   SCM generic_function;
@@ -275,13 +273,11 @@ SCM_API SCM scm_class_direct_subclasses (SCM obj);
 SCM_API SCM scm_class_direct_methods (SCM obj);
 SCM_API SCM scm_class_precedence_list (SCM obj);
 SCM_API SCM scm_class_slots (SCM obj);
-SCM_API SCM scm_class_environment (SCM obj);
 SCM_API SCM scm_generic_function_name (SCM obj);
 SCM_API SCM scm_generic_function_methods (SCM obj);
 SCM_API SCM scm_method_generic_function (SCM obj);
 SCM_API SCM scm_method_specializers (SCM obj);
 SCM_API SCM scm_method_procedure (SCM obj);
-SCM_API SCM scm_sys_tag_body (SCM body);
 SCM_API SCM scm_sys_fast_slot_ref (SCM obj, SCM index);
 SCM_API SCM scm_sys_fast_slot_set_x (SCM obj, SCM index, SCM value);
 SCM_API SCM scm_slot_ref_using_class (SCM cls, SCM obj, SCM slot_name);
diff --git a/libguile/gsubr.c b/libguile/gsubr.c
index 3b73155..6123a0b 100644
--- a/libguile/gsubr.c
+++ b/libguile/gsubr.c
@@ -317,6 +317,45 @@ scm_i_gsubr_apply_list (SCM self, SCM args)
 }
 #undef FUNC_NAME
 
+/* Apply SELF, a gsubr, to the arguments in ARGS.  Missing optional
+   arguments are added, and rest arguments are consed into a list.  */
+SCM
+scm_i_gsubr_apply_array (SCM self, SCM *args, int nargs, int headroom)
+#define FUNC_NAME "scm_i_gsubr_apply"
+{
+  unsigned int typ = SCM_GSUBR_TYPE (self);
+  long i, n = SCM_GSUBR_REQ (typ) + SCM_GSUBR_OPT (typ) + SCM_GSUBR_REST (typ);
+
+  if (SCM_UNLIKELY (nargs < SCM_GSUBR_REQ (typ)))
+    scm_wrong_num_args (SCM_SUBR_NAME (self));
+
+  if (SCM_UNLIKELY (headroom < n - nargs))
+    {
+      /* fallback on apply-list */
+      SCM arglist = SCM_EOL;
+      while (nargs--)
+        arglist = scm_cons (args[nargs], arglist);
+      return scm_i_gsubr_apply_list (self, arglist);
+    }
+
+  for (i = nargs; i < SCM_GSUBR_REQ (typ) + SCM_GSUBR_OPT (typ); i++)
+    args[i] = SCM_UNDEFINED;
+
+  if (SCM_GSUBR_REST(typ))
+    {
+      SCM rest = SCM_EOL;
+      /* fallback on apply-list */
+      while (nargs-- >= n)
+        rest = scm_cons (args[nargs], rest);
+      args[n - 1] = rest;
+    }
+  else if (nargs > n)
+    scm_wrong_num_args (SCM_SUBR_NAME (self));
+
+  return gsubr_apply_raw (self, n, args);
+}
+#undef FUNC_NAME
+
 
 #ifdef GSUBR_TEST
 /* A silly example, taking 2 required args, 1 optional, and
diff --git a/libguile/gsubr.h b/libguile/gsubr.h
index 298181b..e75658d 100644
--- a/libguile/gsubr.h
+++ b/libguile/gsubr.h
@@ -51,6 +51,8 @@ SCM_API SCM scm_c_define_gsubr_with_generic (const char *name,
 
 SCM_INTERNAL SCM scm_i_gsubr_apply (SCM proc, SCM arg, ...);
 SCM_INTERNAL SCM scm_i_gsubr_apply_list (SCM proc, SCM args);
+SCM_INTERNAL SCM scm_i_gsubr_apply_array (SCM proc, SCM *args, int nargs,
+                                          int headroom);
 SCM_INTERNAL void scm_init_gsubr (void);
 
 #endif  /* SCM_GSUBR_H */
diff --git a/libguile/hashtab.c b/libguile/hashtab.c
index b76d3af..f3b3548 100644
--- a/libguile/hashtab.c
+++ b/libguile/hashtab.c
@@ -1220,12 +1220,11 @@ SCM_DEFINE (scm_hash_for_each_handle, 
"hash-for-each-handle", 2, 0, 0,
             "Applies PROC successively on all hash table handles.")
 #define FUNC_NAME s_scm_hash_for_each_handle
 {
-  scm_t_trampoline_1 call = scm_trampoline_1 (proc);
-  SCM_ASSERT (call, proc, 1, FUNC_NAME);
+  SCM_ASSERT (scm_is_true (scm_procedure_p (proc)), proc, 1, FUNC_NAME);
   if (!SCM_HASHTABLE_P (table))
     SCM_VALIDATE_VECTOR (2, table);
   
-  scm_internal_hash_for_each_handle ((scm_t_hash_handle_fn) call,
+  scm_internal_hash_for_each_handle ((scm_t_hash_handle_fn) scm_call_1,
                                     (void *) SCM_UNPACK (proc),
                                     table);
   return SCM_UNSPECIFIED;
diff --git a/libguile/init.c b/libguile/init.c
index 82c73f7..3712a9a 100644
--- a/libguile/init.c
+++ b/libguile/init.c
@@ -79,6 +79,7 @@
 #include "libguile/load.h"
 #include "libguile/macros.h"
 #include "libguile/mallocs.h"
+#include "libguile/memoize.h"
 #include "libguile/modules.h"
 #include "libguile/net_db.h"
 #include "libguile/numbers.h"
@@ -93,6 +94,7 @@
 #include "libguile/print.h"
 #include "libguile/procprop.h"
 #include "libguile/procs.h"
+#include "libguile/promises.h"
 #include "libguile/properties.h"
 #include "libguile/array-map.h"
 #include "libguile/random.h"
@@ -118,6 +120,7 @@
 #include "libguile/symbols.h"
 #include "libguile/throw.h"
 #include "libguile/arrays.h"
+#include "libguile/trees.h"
 #include "libguile/values.h"
 #include "libguile/variable.h"
 #include "libguile/vectors.h"
@@ -488,6 +491,7 @@ scm_i_init_guile (SCM_STACKITEM *base)
   scm_init_hashtab ();
   scm_init_deprecation ();      /* Requires hashtabs */
   scm_init_objprop ();
+  scm_init_promises ();
   scm_init_properties ();
   scm_init_hooks ();            /* Requires smob_prehistory */
   scm_init_gc ();              /* Requires hooks, async */
@@ -542,17 +546,21 @@ scm_i_init_guile (SCM_STACKITEM *base)
   scm_init_srfi_13 ();
   scm_init_srfi_14 ();
   scm_init_throw ();
+  scm_init_trees ();
   scm_init_version ();
   scm_init_weaks ();
   scm_init_guardians ();
   scm_init_vports ();
+  scm_init_standard_ports ();  /* Requires fports */
+  scm_bootstrap_vm ();
+  scm_init_memoize ();
   scm_init_eval ();
+  scm_init_load_path ();
+  scm_init_eval_in_scheme ();
   scm_init_evalext ();
   scm_init_debug ();   /* Requires macro smobs */
   scm_init_random ();
   scm_init_simpos ();
-  scm_init_load_path ();
-  scm_init_standard_ports ();  /* Requires fports */
   scm_init_dynamic_linking ();
   scm_bootstrap_i18n ();
 #if SCM_ENABLE_ELISP
@@ -582,8 +590,6 @@ scm_i_init_guile (SCM_STACKITEM *base)
   scm_init_rw ();
   scm_init_extensions ();
 
-  scm_bootstrap_vm ();
-
   atexit (cleanup_for_exit);
   scm_load_startup_files ();
 }
diff --git a/libguile/list.c b/libguile/list.c
index 70f5277..ba4b249 100644
--- a/libguile/list.c
+++ b/libguile/list.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,2000,2001,2003,2004,2008
+/* Copyright (C) 1995,1996,1997,2000,2001,2003,2004,2008,2009
  * Free Software Foundation, Inc.
  * 
  * This library is free software; you can redistribute it and/or
@@ -885,18 +885,17 @@ SCM_DEFINE (scm_filter, "filter", 2, 0, 0,
            "@end lisp")
 #define FUNC_NAME s_scm_filter
 {
-  scm_t_trampoline_1 call = scm_trampoline_1 (pred);
   SCM walk;
   SCM *prev;
   SCM res = SCM_EOL;
-  SCM_ASSERT (call, pred, 1, FUNC_NAME);
+  SCM_ASSERT (scm_is_true (scm_procedure_p (pred)), pred, 1, FUNC_NAME);
   SCM_VALIDATE_LIST (2, list);
   
   for (prev = &res, walk = list;
        scm_is_pair (walk);
        walk = SCM_CDR (walk))
     {
-      if (scm_is_true (call (pred, SCM_CAR (walk))))
+      if (scm_is_true (scm_call_1 (pred, SCM_CAR (walk))))
        {
          *prev = scm_cons (SCM_CAR (walk), SCM_EOL);
          prev = SCM_CDRLOC (*prev);
@@ -912,17 +911,16 @@ SCM_DEFINE (scm_filter_x, "filter!", 2, 0, 0,
            "Linear-update variant of @code{filter}.")
 #define FUNC_NAME s_scm_filter_x
 {
-  scm_t_trampoline_1 call = scm_trampoline_1 (pred);
   SCM walk;
   SCM *prev;
-  SCM_ASSERT (call, pred, 1, FUNC_NAME);
+  SCM_ASSERT (scm_is_true (scm_procedure_p (pred)), pred, 1, FUNC_NAME);
   SCM_VALIDATE_LIST (2, list);
   
   for (prev = &list, walk = list;
        scm_is_pair (walk);
        walk = SCM_CDR (walk))
     {
-      if (scm_is_true (call (pred, SCM_CAR (walk))))
+      if (scm_is_true (scm_call_1 (pred, SCM_CAR (walk))))
        prev = SCM_CDRLOC (walk);
       else
        *prev = SCM_CDR (walk);
diff --git a/libguile/list.h b/libguile/list.h
index 427dcb8..238926e 100644
--- a/libguile/list.h
+++ b/libguile/list.h
@@ -3,7 +3,7 @@
 #ifndef SCM_LIST_H
 #define SCM_LIST_H
 
-/* Copyright (C) 1995,1996,1997,2000,2001,2003,2004,2005,2006,2008
+/* Copyright (C) 1995,1996,1997,2000,2001,2003,2004,2005,2006,2008,2009
  * Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
@@ -67,6 +67,7 @@ SCM_API SCM scm_delv1_x (SCM item, SCM lst);
 SCM_API SCM scm_delete1_x (SCM item, SCM lst);
 SCM_API SCM scm_filter (SCM pred, SCM list);
 SCM_API SCM scm_filter_x (SCM pred, SCM list);
+SCM_API SCM scm_copy_tree (SCM obj);
 
 
 
diff --git a/libguile/load.c b/libguile/load.c
index 5c0c61e..fd3626f 100644
--- a/libguile/load.c
+++ b/libguile/load.c
@@ -837,6 +837,22 @@ scm_c_primitive_load_path (const char *filename)
   return scm_primitive_load_path (scm_from_locale_string (filename));
 }
 
+void
+scm_init_eval_in_scheme (void)
+{
+  SCM eval_scm, eval_go;
+  eval_scm = scm_search_path (*scm_loc_load_path,
+                              scm_from_locale_string ("ice-9/eval.scm"),
+                              SCM_EOL);
+  eval_go = scm_search_path (*scm_loc_load_compiled_path,
+                             scm_from_locale_string ("ice-9/eval.go"),
+                             SCM_EOL);
+  
+  if (scm_is_true (eval_scm) && scm_is_true (eval_go)
+      && compiled_is_fresh (eval_scm, eval_go))
+    scm_load_compiled_with_vm (eval_go);
+}
+
 
 /* Information about the build environment.  */
 
diff --git a/libguile/load.h b/libguile/load.h
index 81fbfba..0feabad 100644
--- a/libguile/load.h
+++ b/libguile/load.h
@@ -39,6 +39,7 @@ SCM_API SCM scm_c_primitive_load_path (const char *filename);
 SCM_INTERNAL SCM scm_sys_warn_autocompilation_enabled (void);
 SCM_INTERNAL void scm_init_load_path (void);
 SCM_INTERNAL void scm_init_load (void);
+SCM_INTERNAL void scm_init_eval_in_scheme (void);
 
 #endif  /* SCM_LOAD_H */
 
diff --git a/libguile/macros.c b/libguile/macros.c
index 7d60a8e..970a41d 100644
--- a/libguile/macros.c
+++ b/libguile/macros.c
@@ -75,16 +75,6 @@ macro_print (SCM macro, SCM port, scm_print_state *pstate)
       scm_putc (' ', port);
       scm_iprin1 (scm_macro_name (macro), port, pstate);
 
-      if (SCM_CLOSUREP (code) && SCM_PRINT_SOURCE_P)
-       {
-         SCM formals = SCM_CLOSURE_FORMALS (code);
-         SCM env = SCM_ENV (code);
-         SCM xenv = SCM_EXTEND_ENV (formals, SCM_EOL, env);
-         SCM src = scm_i_unmemocopy_body (SCM_CODE (code), xenv);
-         scm_putc (' ', port);
-         scm_iprin1 (src, port, pstate);
-       }
-
       if (SCM_MACRO_IS_EXTENDED (macro))
         {
           scm_putc (' ', port);
diff --git a/libguile/memoize.c b/libguile/memoize.c
new file mode 100644
index 0000000..0574e11
--- /dev/null
+++ b/libguile/memoize.c
@@ -0,0 +1,1261 @@
+/* Copyright (C) 
1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009
+ * Free Software Foundation, Inc.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <alloca.h>
+
+#include "libguile/__scm.h"
+
+#include <assert.h>
+#include "libguile/_scm.h"
+#include "libguile/continuations.h"
+#include "libguile/eq.h"
+#include "libguile/list.h"
+#include "libguile/macros.h"
+#include "libguile/memoize.h"
+#include "libguile/modules.h"
+#include "libguile/srcprop.h"
+#include "libguile/ports.h"
+#include "libguile/print.h"
+#include "libguile/strings.h"
+#include "libguile/throw.h"
+#include "libguile/validate.h"
+
+
+
+
+
+#if 0
+#define CAR(x)   SCM_CAR(x)
+#define CDR(x)   SCM_CDR(x)
+#define CAAR(x)  SCM_CAAR(x)
+#define CADR(x)  SCM_CADR(x)
+#define CDAR(x)  SCM_CDAR(x)
+#define CDDR(x)  SCM_CDDR(x)
+#define CADDR(x) SCM_CADDR(x)
+#define CDDDR(x) SCM_CDDDR(x)
+#define CADDDR(x) SCM_CDDDR(x)
+#else
+#define CAR(x)   scm_car(x)
+#define CDR(x)   scm_cdr(x)
+#define CAAR(x)  scm_caar(x)
+#define CADR(x)  scm_cadr(x)
+#define CDAR(x)  scm_cdar(x)
+#define CDDR(x)  scm_cddr(x)
+#define CADDR(x) scm_caddr(x)
+#define CDDDR(x) scm_cdddr(x)
+#define CADDDR(x) scm_cadddr(x)
+#endif
+
+
+static const char s_bad_expression[] = "Bad expression";
+static const char s_expression[] = "Missing or extra expression in";
+static const char s_missing_expression[] = "Missing expression in";
+static const char s_extra_expression[] = "Extra expression in";
+static const char s_empty_combination[] = "Illegal empty combination";
+static const char s_missing_body_expression[] = "Missing body expression in";
+static const char s_mixed_body_forms[] = "Mixed definitions and expressions 
in";
+static const char s_bad_define[] = "Bad define placement";
+static const char s_missing_clauses[] = "Missing clauses";
+static const char s_misplaced_else_clause[] = "Misplaced else clause";
+static const char s_bad_case_clause[] = "Bad case clause";
+static const char s_bad_case_labels[] = "Bad case labels";
+static const char s_duplicate_case_label[] = "Duplicate case label";
+static const char s_bad_cond_clause[] = "Bad cond clause";
+static const char s_missing_recipient[] = "Missing recipient in";
+static const char s_bad_variable[] = "Bad variable";
+static const char s_bad_bindings[] = "Bad bindings";
+static const char s_bad_binding[] = "Bad binding";
+static const char s_duplicate_binding[] = "Duplicate binding";
+static const char s_bad_exit_clause[] = "Bad exit clause";
+static const char s_bad_formals[] = "Bad formals";
+static const char s_bad_formal[] = "Bad formal";
+static const char s_duplicate_formal[] = "Duplicate formal";
+static const char s_splicing[] = "Non-list result for unquote-splicing";
+static const char s_bad_slot_number[] = "Bad slot number";
+
+
+/* Signal a syntax error.  We distinguish between the form that caused the
+ * error and the enclosing expression.  The error message will print out as
+ * shown in the following pattern.  The file name and line number are only
+ * given when they can be determined from the erroneous form or from the
+ * enclosing expression.
+ *
+ * <filename>: In procedure memoization:
+ * <filename>: In file <name>, line <nr>: <error-message> in <expression>.  */
+
+SCM_SYMBOL (syntax_error_key, "syntax-error");
+
+/* The prototype is needed to indicate that the function does not return.  */
+static void
+syntax_error (const char* const, const SCM, const SCM) SCM_NORETURN;
+
+static void 
+syntax_error (const char* const msg, const SCM form, const SCM expr)
+{
+  SCM msg_string = scm_from_locale_string (msg);
+  SCM filename = SCM_BOOL_F;
+  SCM linenr = SCM_BOOL_F;
+  const char *format;
+  SCM args;
+
+  if (scm_is_pair (form))
+    {
+      filename = scm_source_property (form, scm_sym_filename);
+      linenr = scm_source_property (form, scm_sym_line);
+    }
+
+  if (scm_is_false (filename) && scm_is_false (linenr) && scm_is_pair (expr))
+    {
+      filename = scm_source_property (expr, scm_sym_filename);
+      linenr = scm_source_property (expr, scm_sym_line);
+    }
+
+  if (!SCM_UNBNDP (expr))
+    {
+      if (scm_is_true (filename))
+       {
+         format = "In file ~S, line ~S: ~A ~S in expression ~S.";
+         args = scm_list_5 (filename, linenr, msg_string, form, expr);
+       }
+      else if (scm_is_true (linenr))
+       {
+         format = "In line ~S: ~A ~S in expression ~S.";
+         args = scm_list_4 (linenr, msg_string, form, expr);
+       }
+      else
+       {
+         format = "~A ~S in expression ~S.";
+         args = scm_list_3 (msg_string, form, expr);
+       }
+    }
+  else
+    {
+      if (scm_is_true (filename))
+       {
+         format = "In file ~S, line ~S: ~A ~S.";
+         args = scm_list_4 (filename, linenr, msg_string, form);
+       }
+      else if (scm_is_true (linenr))
+       {
+         format = "In line ~S: ~A ~S.";
+         args = scm_list_3 (linenr, msg_string, form);
+       }
+      else
+       {
+         format = "~A ~S.";
+         args = scm_list_2 (msg_string, form);
+       }
+    }
+
+  scm_error (syntax_error_key, "memoization", format, args, SCM_BOOL_F);
+}
+
+
+/* Shortcut macros to simplify syntax error handling. */
+#define ASSERT_SYNTAX(cond, message, form)             \
+  { if (SCM_UNLIKELY (!(cond)))                        \
+      syntax_error (message, form, SCM_UNDEFINED); }
+#define ASSERT_SYNTAX_2(cond, message, form, expr)     \
+  { if (SCM_UNLIKELY (!(cond)))                        \
+      syntax_error (message, form, expr); }
+
+
+
+
+/* {Evaluator memoized expressions}
+ */
+
+scm_t_bits scm_tc16_memoized;
+
+#define MAKMEMO(n, args)       (scm_cell (scm_tc16_memoized | ((n) << 16), 
(scm_t_bits)(args)))
+
+#define MAKMEMO_BEGIN(exps) \
+  MAKMEMO (SCM_M_BEGIN, exps)
+#define MAKMEMO_IF(test, then, else_) \
+  MAKMEMO (SCM_M_IF, scm_cons (test, scm_cons (then, else_)))
+#define MAKMEMO_LAMBDA(nreq, rest, body) \
+  MAKMEMO (SCM_M_LAMBDA, scm_cons (SCM_I_MAKINUM (nreq), scm_cons (rest, 
body)))
+#define MAKMEMO_LET(inits, body) \
+  MAKMEMO (SCM_M_LET, scm_cons (inits, body))
+#define MAKMEMO_QUOTE(exp) \
+  MAKMEMO (SCM_M_QUOTE, exp)
+#define MAKMEMO_DEFINE(var, val) \
+  MAKMEMO (SCM_M_DEFINE, scm_cons (var, val))
+#define MAKMEMO_APPLY(exp) \
+  MAKMEMO (SCM_M_APPLY, exp)
+#define MAKMEMO_CONT(proc) \
+  MAKMEMO (SCM_M_CONT, proc)
+#define MAKMEMO_CALL_WITH_VALUES(prod, cons) \
+  MAKMEMO (SCM_M_CALL_WITH_VALUES, scm_cons (prod, cons))
+#define MAKMEMO_CALL(proc, args) \
+  MAKMEMO (SCM_M_CALL, scm_cons (proc, args))
+#define MAKMEMO_LEX_REF(n) \
+  MAKMEMO (SCM_M_LEXICAL_REF, SCM_I_MAKINUM (n))
+#define MAKMEMO_LEX_SET(n, val) \
+  MAKMEMO (SCM_M_LEXICAL_SET, scm_cons (SCM_I_MAKINUM (n), val))
+#define MAKMEMO_TOP_REF(var) \
+  MAKMEMO (SCM_M_TOPLEVEL_REF, var)
+#define MAKMEMO_TOP_SET(var, val) \
+  MAKMEMO (SCM_M_TOPLEVEL_SET, scm_cons (var, val))
+#define MAKMEMO_MOD_REF(mod, var, public) \
+  MAKMEMO (SCM_M_MODULE_REF, scm_cons (mod, scm_cons (var, public)))
+#define MAKMEMO_MOD_SET(val, mod, var, public) \
+  MAKMEMO (SCM_M_MODULE_SET, scm_cons (val, scm_cons (mod, scm_cons (var, 
public))))
+
+
+
+/* This table must agree with the list of M_ constants in memoize.h */
+static const char *const memoized_tags[] =
+{
+  "begin",
+  "if",
+  "lambda",
+  "let",
+  "quote",
+  "define",
+  "apply",
+  "call/cc",
+  "call-with-values",
+  "call",
+  "lexical-ref",
+  "lexical-set!",
+  "toplevel-ref",
+  "toplevel-set!",
+  "module-ref",
+  "module-set!",
+};
+
+static int
+scm_print_memoized (SCM memoized, SCM port, scm_print_state *pstate)
+{
+  scm_puts ("#<memoized ", port);
+  scm_write (scm_unmemoize_expression (memoized), port);
+  scm_puts (">", port);
+  return 1;
+}
+
+static SCM scm_m_at (SCM xorig, SCM env);
+static SCM scm_m_atat (SCM xorig, SCM env);
+static SCM scm_m_and (SCM xorig, SCM env);
+static SCM scm_m_apply (SCM xorig, SCM env);
+static SCM scm_m_begin (SCM xorig, SCM env);
+static SCM scm_m_cont (SCM xorig, SCM env);
+static SCM scm_m_at_call_with_values (SCM xorig, SCM env);
+static SCM scm_m_cond (SCM xorig, SCM env);
+static SCM scm_m_define (SCM x, SCM env);
+static SCM scm_m_eval_when (SCM xorig, SCM env);
+static SCM scm_m_if (SCM xorig, SCM env);
+static SCM scm_m_lambda (SCM xorig, SCM env);
+static SCM scm_m_let (SCM xorig, SCM env);
+static SCM scm_m_letrec (SCM xorig, SCM env);
+static SCM scm_m_letstar (SCM xorig, SCM env);
+static SCM scm_m_or (SCM xorig, SCM env);
+static SCM scm_m_quote (SCM xorig, SCM env);
+static SCM scm_m_set_x (SCM xorig, SCM env);
+
+
+
+
+
+typedef SCM (*t_syntax_transformer) (SCM, SCM);
+
+static t_syntax_transformer
+memoize_env_ref_transformer (SCM env, SCM x)
+{
+  SCM var;
+  for (; scm_is_pair (env); env = CDR (env))
+    if (scm_is_eq (x, CAR (env)))
+      return NULL; /* lexical */
+
+  var = scm_module_variable (env, x);
+  if (scm_is_true (var) && scm_is_true (scm_variable_bound_p (var))
+      && SCM_MACROP (scm_variable_ref (var)))
+    { 
+      SCM mac = scm_variable_ref (var);
+      if (SCM_IMP (SCM_MACRO_CODE (mac))
+          || SCM_TYP7 (SCM_MACRO_CODE (mac)) != scm_tc7_subr_2)
+        syntax_error ("bad macro", x, SCM_UNDEFINED);
+      else
+        return (t_syntax_transformer)SCM_SUBRF (SCM_MACRO_CODE (mac)); /* 
global macro */
+    }
+  else
+    return NULL; /* anything else */
+}
+
+static int
+memoize_env_var_is_free (SCM env, SCM x)
+{
+  for (; scm_is_pair (env); env = CDR (env))
+    if (scm_is_eq (x, CAR (env)))
+      return 0; /* bound */
+  return 1; /* free */
+}
+
+static int
+memoize_env_lexical_index (SCM env, SCM x)
+{
+  int i = 0;
+  for (; scm_is_pair (env); env = CDR (env), i++)
+    if (scm_is_eq (x, CAR (env)))
+      return i; /* bound */
+  return -1; /* free */
+}
+
+static SCM
+memoize_env_extend (SCM env, SCM vars)
+{
+  return scm_append (scm_list_2 (vars, env));
+}
+
+static SCM
+memoize (SCM exp, SCM env)
+{
+  if (scm_is_pair (exp))
+    {
+      SCM CAR;
+      t_syntax_transformer trans;
+      
+      CAR = CAR (exp);
+      if (scm_is_symbol (CAR))
+        trans = memoize_env_ref_transformer (env, CAR);
+      else
+        trans = NULL;
+      
+      if (trans)
+        return trans (exp, env);
+      else
+        {
+          SCM args = SCM_EOL;
+          for (; scm_is_pair (exp); exp = CDR (exp))
+            args = scm_cons (memoize (CAR (exp), env), args);
+          if (scm_is_null (exp))
+            return MAKMEMO (SCM_M_CALL, scm_reverse_x (args, SCM_UNDEFINED));
+          else
+            syntax_error ("expected a proper list", exp, SCM_UNDEFINED);
+        }
+    }
+  else if (scm_is_symbol (exp))
+    {
+      int i = memoize_env_lexical_index (env, exp);
+      if (i < 0)
+        return MAKMEMO_TOP_REF (exp);
+      else
+        return MAKMEMO_LEX_REF (i);
+    }
+  else
+    return MAKMEMO_QUOTE (exp);
+}
+
+static SCM
+memoize_exprs (SCM forms, const SCM env)
+{
+  SCM ret = SCM_EOL;
+
+  for (; !scm_is_null (forms); forms = CDR (forms))
+    ret = scm_cons (memoize (CAR (forms), env), ret);
+  return scm_reverse_x (ret, SCM_UNDEFINED);
+}
+
+static SCM
+memoize_sequence (const SCM forms, const SCM env)
+{
+  ASSERT_SYNTAX (scm_ilength (forms) >= 1, s_bad_expression,
+                 scm_cons (scm_sym_begin, forms));
+  return MAKMEMO_BEGIN (memoize_exprs (forms, env));
+}
+
+
+
+/* Memoization.  */
+
+/* bimacros (built-in macros) have isym codes.
+   mmacros don't exist at runtime, they just expand out to more primitive
+   forms. */
+SCM_SYNTAX (s_at, "@", scm_i_makbimacro, scm_m_at);
+SCM_SYNTAX (s_atat, "@@", scm_i_makbimacro, scm_m_atat);
+SCM_SYNTAX (s_and, "and", scm_makmmacro, scm_m_and);
+SCM_SYNTAX (s_begin, "begin", scm_i_makbimacro, scm_m_begin);
+SCM_SYNTAX (s_atcall_cc, "@call-with-current-continuation", scm_i_makbimacro, 
scm_m_cont);
+SCM_SYNTAX (s_at_call_with_values, "@call-with-values", scm_i_makbimacro, 
scm_m_at_call_with_values);
+SCM_SYNTAX (s_cond, "cond", scm_makmmacro, scm_m_cond);
+SCM_SYNTAX (s_define, "define", scm_i_makbimacro, scm_m_define);
+SCM_SYNTAX (s_eval_when, "eval-when", scm_makmmacro, scm_m_eval_when);
+SCM_SYNTAX (s_if, "if", scm_i_makbimacro, scm_m_if);
+SCM_SYNTAX (s_lambda, "lambda", scm_i_makbimacro, scm_m_lambda);
+SCM_SYNTAX (s_let, "let", scm_i_makbimacro, scm_m_let);
+SCM_SYNTAX (s_letrec, "letrec", scm_makmmacro, scm_m_letrec);
+SCM_SYNTAX (s_letstar, "let*", scm_makmmacro, scm_m_letstar);
+SCM_SYNTAX (s_or, "or", scm_makmmacro, scm_m_or);
+SCM_SYNTAX (s_quote, "quote", scm_i_makbimacro, scm_m_quote);
+SCM_SYNTAX (s_set_x, "set!", scm_i_makbimacro, scm_m_set_x);
+SCM_SYNTAX (s_atapply, "@apply", scm_i_makbimacro, scm_m_apply);
+
+
+SCM_GLOBAL_SYMBOL (scm_sym_apply, "apply");
+SCM_GLOBAL_SYMBOL (scm_sym_arrow, "=>");
+SCM_GLOBAL_SYMBOL (scm_sym_at, "@");
+SCM_GLOBAL_SYMBOL (scm_sym_atat, "@@");
+SCM_GLOBAL_SYMBOL (scm_sym_at_call_with_values, "@call-with-values");
+SCM_GLOBAL_SYMBOL (scm_sym_atapply, "@apply");
+SCM_GLOBAL_SYMBOL (scm_sym_atcall_cc, "@call-with-current-continuation");
+SCM_GLOBAL_SYMBOL (scm_sym_begin, "begin");
+SCM_GLOBAL_SYMBOL (scm_sym_case, "case");
+SCM_GLOBAL_SYMBOL (scm_sym_cond, "cond");
+SCM_GLOBAL_SYMBOL (scm_sym_define, "define");
+SCM_GLOBAL_SYMBOL (scm_sym_else, "else");
+SCM_GLOBAL_SYMBOL (scm_sym_eval_when, "eval-when");
+SCM_GLOBAL_SYMBOL (scm_sym_if, "if");
+SCM_GLOBAL_SYMBOL (scm_sym_lambda, "lambda");
+SCM_GLOBAL_SYMBOL (scm_sym_let, "let");
+SCM_GLOBAL_SYMBOL (scm_sym_letrec, "letrec");
+SCM_GLOBAL_SYMBOL (scm_sym_letstar, "let*");
+SCM_GLOBAL_SYMBOL (scm_sym_or, "or");
+SCM_GLOBAL_SYMBOL (scm_sym_quote, "quote");
+SCM_GLOBAL_SYMBOL (scm_sym_set_x, "set!");
+SCM_SYMBOL (sym_eval, "eval");
+SCM_SYMBOL (sym_load, "load");
+
+SCM_GLOBAL_SYMBOL (scm_sym_unquote, "unquote");
+SCM_GLOBAL_SYMBOL (scm_sym_quasiquote, "quasiquote");
+SCM_GLOBAL_SYMBOL (scm_sym_uq_splicing, "unquote-splicing");
+
+
+static SCM
+scm_m_at (SCM expr, SCM env SCM_UNUSED)
+{
+  ASSERT_SYNTAX (scm_ilength (expr) == 3, s_bad_expression, expr);
+  ASSERT_SYNTAX (scm_ilength (CADR (expr)) > 0, s_bad_expression, expr);
+  ASSERT_SYNTAX (scm_is_symbol (CADDR (expr)), s_bad_expression, expr);
+
+  return MAKMEMO_MOD_REF (CADR (expr), CADDR (expr), SCM_BOOL_T);
+}
+
+static SCM
+scm_m_atat (SCM expr, SCM env SCM_UNUSED)
+{
+  ASSERT_SYNTAX (scm_ilength (expr) == 3, s_bad_expression, expr);
+  ASSERT_SYNTAX (scm_ilength (CADR (expr)) > 0, s_bad_expression, expr);
+  ASSERT_SYNTAX (scm_is_symbol (CADDR (expr)), s_bad_expression, expr);
+
+  return MAKMEMO_MOD_REF (CADR (expr), CADDR (expr), SCM_BOOL_F);
+}
+
+static SCM
+scm_m_and (SCM expr, SCM env)
+{
+  const SCM cdr_expr = CDR (expr);
+
+  if (scm_is_null (cdr_expr))
+    return MAKMEMO_QUOTE (SCM_BOOL_T);
+  ASSERT_SYNTAX (scm_is_pair (cdr_expr), s_bad_expression, expr);
+
+  if (scm_is_null (CDR (cdr_expr)))
+    return memoize (CAR (cdr_expr), env);
+  else
+    return MAKMEMO_IF (memoize (CAR (cdr_expr), env),
+                       scm_m_and (cdr_expr, env),
+                       MAKMEMO_QUOTE (SCM_BOOL_F));
+}
+
+static SCM
+scm_m_apply (SCM expr, SCM env)
+{
+  const SCM cdr_expr = CDR (expr);
+  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
+  ASSERT_SYNTAX (scm_ilength (cdr_expr) == 2, s_missing_expression, expr);
+
+  return MAKMEMO_APPLY (memoize_exprs (cdr_expr, env));
+}
+
+static SCM
+scm_m_begin (SCM expr, SCM env)
+{
+  const SCM cdr_expr = CDR (expr);
+  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 1, s_bad_expression, expr);
+  return MAKMEMO_BEGIN (memoize_exprs (cdr_expr, env));
+}
+
+static SCM
+scm_m_cont (SCM expr, SCM env)
+{
+  const SCM cdr_expr = CDR (expr);
+  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
+  ASSERT_SYNTAX (scm_ilength (cdr_expr) == 1, s_expression, expr);
+
+  return MAKMEMO_CONT (memoize (CADR (expr), env));
+}
+
+static SCM
+scm_m_at_call_with_values (SCM expr, SCM env)
+{
+  const SCM cdr_expr = CDR (expr);
+  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
+  ASSERT_SYNTAX (scm_ilength (cdr_expr) == 2, s_expression, expr);
+
+  return MAKMEMO_CALL_WITH_VALUES (memoize (CADR (expr), env),
+                                   memoize (CADDR (expr), env));
+}
+
+static SCM
+scm_m_cond (SCM expr, SCM env)
+{
+  /* Check, whether 'else or '=> is a literal, i. e. not bound to a value. */
+  const int else_literal_p = memoize_env_var_is_free (env, scm_sym_else);
+  const int arrow_literal_p = memoize_env_var_is_free (env, scm_sym_arrow);
+
+  const SCM clauses = CDR (expr);
+  SCM clause_idx;
+  SCM ret, loc;
+
+  ASSERT_SYNTAX (scm_ilength (clauses) >= 0, s_bad_expression, expr);
+  ASSERT_SYNTAX (scm_ilength (clauses) >= 1, s_missing_clauses, expr);
+
+  ret = scm_cons (SCM_UNDEFINED, MAKMEMO_QUOTE (SCM_UNSPECIFIED));
+  loc = ret;
+
+  for (clause_idx = clauses;
+       !scm_is_null (clause_idx);
+       clause_idx = CDR (clause_idx))
+    {
+      SCM test;
+
+      const SCM clause = CAR (clause_idx);
+      const long length = scm_ilength (clause);
+      ASSERT_SYNTAX_2 (length >= 1, s_bad_cond_clause, clause, expr);
+
+      test = CAR (clause);
+      if (scm_is_eq (test, scm_sym_else) && else_literal_p)
+       {
+         const int last_clause_p = scm_is_null (CDR (clause_idx));
+          ASSERT_SYNTAX_2 (length >= 2,
+                           s_bad_cond_clause, clause, expr);
+          ASSERT_SYNTAX_2 (last_clause_p,
+                           s_misplaced_else_clause, clause, expr);
+          SCM_SETCDR (loc,
+                      memoize (scm_cons (scm_sym_begin, CDR (clause)), env));
+       }
+      else if (length >= 2
+               && scm_is_eq (CADR (clause), scm_sym_arrow)
+               && arrow_literal_p)
+        {
+          SCM tmp = scm_gensym (scm_from_locale_string ("cond "));
+          SCM i;
+          SCM new_env = scm_cons (tmp, env);
+          ASSERT_SYNTAX_2 (length > 2, s_missing_recipient, clause, expr);
+          ASSERT_SYNTAX_2 (length == 3, s_extra_expression, clause, expr);
+          i = MAKMEMO_IF (MAKMEMO_LEX_REF (0),
+                          MAKMEMO_CALL (memoize (CADDR (clause),
+                                                 scm_cons (tmp, new_env)),
+                                        scm_list_1 (MAKMEMO_LEX_REF (0))),
+                          MAKMEMO_QUOTE (SCM_UNSPECIFIED));
+          SCM_SETCDR (loc, 
+                      MAKMEMO_LET (scm_list_1 (memoize (CAR (clause), env)),
+                                   i));
+          env = new_env;
+          loc = scm_last_pair (SCM_MEMOIZED_ARGS (i));
+       }
+      /* FIXME length == 1 case */
+      else
+        {
+          SCM i = MAKMEMO_IF (memoize (CAR (clause), env),
+                              memoize (scm_cons (scm_sym_begin, CDR (clause)), 
env),
+                              MAKMEMO_QUOTE (SCM_UNSPECIFIED));
+          SCM_SETCDR (loc, i);
+          loc = scm_last_pair (SCM_MEMOIZED_ARGS (i));
+        }
+    }
+
+  return CDR (ret);
+}
+
+/* According to Section 5.2.1 of R5RS we first have to make sure that the
+   variable is bound, and then perform the `(set! variable expression)'
+   operation.  However, EXPRESSION _can_ be evaluated before VARIABLE is
+   bound.  This means that EXPRESSION won't necessarily be able to assign
+   values to VARIABLE as in `(define foo (begin (set! foo 1) (+ foo 1)))'.  */
+static SCM
+scm_m_define (SCM expr, SCM env)
+{
+  const SCM cdr_expr = CDR (expr);
+  SCM body;
+  SCM variable;
+
+  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
+  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 2, s_missing_expression, expr);
+  ASSERT_SYNTAX (!scm_is_pair (env), s_bad_define, expr);
+
+  body = CDR (cdr_expr);
+  variable = CAR (cdr_expr);
+
+  if (scm_is_pair (variable))
+    {
+      ASSERT_SYNTAX_2 (scm_is_symbol (CAR (variable)), s_bad_variable, 
variable, expr);
+      return MAKMEMO_DEFINE (CAR (variable),
+                             memoize (scm_cons (scm_sym_lambda,
+                                                scm_cons (CDR (variable), 
body)),
+                                      env));
+    }
+  ASSERT_SYNTAX_2 (scm_is_symbol (variable), s_bad_variable, variable, expr);
+  ASSERT_SYNTAX (scm_ilength (body) == 1, s_expression, expr);
+  return MAKMEMO_DEFINE (variable, memoize (CAR (body), env));
+}
+
+static SCM
+scm_m_eval_when (SCM expr, SCM env)
+{
+  ASSERT_SYNTAX (scm_ilength (expr) >= 3, s_bad_expression, expr);
+  ASSERT_SYNTAX (scm_ilength (CADR (expr)) > 0, s_bad_expression, expr);
+
+  if (scm_is_true (scm_memq (sym_eval, CADR (expr)))
+      || scm_is_true (scm_memq (sym_load, CADR (expr))))
+    return MAKMEMO_BEGIN (memoize_exprs (CDDR (expr), env));
+  else
+    return MAKMEMO_QUOTE (SCM_UNSPECIFIED);
+}
+
+static SCM
+scm_m_if (SCM expr, SCM env SCM_UNUSED)
+{
+  const SCM cdr_expr = CDR (expr);
+  const long length = scm_ilength (cdr_expr);
+  ASSERT_SYNTAX (length == 2 || length == 3, s_expression, expr);
+  return MAKMEMO_IF (memoize (CADR (expr), env),
+                     memoize (CADDR (expr), env),
+                     ((length == 3)
+                      ? memoize (CADDDR (expr), env)
+                      : MAKMEMO_QUOTE (SCM_UNSPECIFIED)));
+}
+
+/* A helper function for memoize_lambda to support checking for duplicate
+ * formal arguments: Return true if OBJ is `eq?' to one of the elements of
+ * LIST or to the CDR of the last cons.  Therefore, LIST may have any of the
+ * forms that a formal argument can have:
+ *   <rest>, (<arg1> ...), (<arg1> ...  .  <rest>) */
+static int
+c_improper_memq (SCM obj, SCM list)
+{
+  for (; scm_is_pair (list); list = CDR (list))
+    {
+      if (scm_is_eq (CAR (list), obj))
+        return 1;
+    }
+  return scm_is_eq (list, obj);
+}
+
+static SCM
+scm_m_lambda (SCM expr, SCM env SCM_UNUSED)
+{
+  SCM formals;
+  SCM formals_idx;
+  SCM formal_vars = SCM_EOL;
+  int nreq = 0;
+
+  const SCM cdr_expr = CDR (expr);
+  const long length = scm_ilength (cdr_expr);
+  ASSERT_SYNTAX (length >= 0, s_bad_expression, expr);
+  ASSERT_SYNTAX (length >= 2, s_missing_expression, expr);
+
+  /* Before iterating the list of formal arguments, make sure the formals
+   * actually are given as either a symbol or a non-cyclic list.  */
+  formals = CAR (cdr_expr);
+  if (scm_is_pair (formals))
+    {
+      /* Dirk:FIXME:: We should check for a cyclic list of formals, and if
+       * detected, report a 'Bad formals' error.  */
+    }
+  else
+    {
+      ASSERT_SYNTAX_2 (scm_is_symbol (formals) || scm_is_null (formals),
+                       s_bad_formals, formals, expr);
+    }
+
+  /* Now iterate the list of formal arguments to check if all formals are
+   * symbols, and that there are no duplicates.  */
+  formals_idx = formals;
+  while (scm_is_pair (formals_idx))
+    {
+      const SCM formal = CAR (formals_idx);
+      const SCM next_idx = CDR (formals_idx);
+      ASSERT_SYNTAX_2 (scm_is_symbol (formal), s_bad_formal, formal, expr);
+      ASSERT_SYNTAX_2 (!c_improper_memq (formal, next_idx),
+                       s_duplicate_formal, formal, expr);
+      nreq++;
+      formal_vars = scm_cons (formal, formal_vars);
+      formals_idx = next_idx;
+    }
+  ASSERT_SYNTAX_2 (scm_is_null (formals_idx) || scm_is_symbol (formals_idx),
+                   s_bad_formal, formals_idx, expr);
+  if (scm_is_symbol (formals_idx))
+    formal_vars = scm_cons (formals_idx, formal_vars);
+  return MAKMEMO_LAMBDA (nreq, scm_symbol_p (formals_idx),
+                         memoize_sequence (CDDR (expr),
+                                           memoize_env_extend (env, 
formal_vars)));
+}
+
+/* Check if the format of the bindings is ((<symbol> <init-form>) ...).  */
+static void
+check_bindings (const SCM bindings, const SCM expr)
+{
+  SCM binding_idx;
+
+  ASSERT_SYNTAX_2 (scm_ilength (bindings) >= 0,
+                   s_bad_bindings, bindings, expr);
+
+  binding_idx = bindings;
+  for (; !scm_is_null (binding_idx); binding_idx = CDR (binding_idx))
+    {
+      SCM name;         /* const */
+
+      const SCM binding = CAR (binding_idx);
+      ASSERT_SYNTAX_2 (scm_ilength (binding) == 2,
+                       s_bad_binding, binding, expr);
+
+      name = CAR (binding);
+      ASSERT_SYNTAX_2 (scm_is_symbol (name), s_bad_variable, name, expr);
+    }
+}
+
+/* The bindings, which must have the format ((v1 i1) (v2 i2) ... (vn in)), are
+ * transformed to the lists (vn .. v2 v1) and (i1 i2 ... in). If a duplicate
+ * variable name is detected, an error is signalled. */
+static int
+transform_bindings (const SCM bindings, const SCM expr,
+                    SCM *const rvarptr, SCM *const initptr)
+{
+  SCM rvariables = SCM_EOL;
+  SCM rinits = SCM_EOL;
+  SCM binding_idx = bindings;
+  int n = 0;
+  for (; !scm_is_null (binding_idx); binding_idx = CDR (binding_idx))
+    {
+      const SCM binding = CAR (binding_idx);
+      const SCM CDR_binding = CDR (binding);
+      const SCM name = CAR (binding);
+      ASSERT_SYNTAX_2 (scm_is_false (scm_c_memq (name, rvariables)),
+                       s_duplicate_binding, name, expr);
+      rvariables = scm_cons (name, rvariables);
+      rinits = scm_cons (CAR (CDR_binding), rinits);
+      n++;
+    }
+  *rvarptr = rvariables;
+  *initptr = scm_reverse_x (rinits, SCM_UNDEFINED);
+  return n;
+}
+
+/* This function is a helper function for memoize_let.  It transforms
+ * (let name ((var init) ...) body ...) into
+ * ((letrec ((name (lambda (var ...) body ...))) name) init ...)
+ * and memoizes the expression.  It is assumed that the caller has checked
+ * that name is a symbol and that there are bindings and a body.  */
+static SCM
+memoize_named_let (const SCM expr, SCM env)
+{
+  SCM rvariables;
+  SCM inits;
+  int nreq;
+
+  const SCM cdr_expr = CDR (expr);
+  const SCM name = CAR (cdr_expr);
+  const SCM cddr_expr = CDR (cdr_expr);
+  const SCM bindings = CAR (cddr_expr);
+  check_bindings (bindings, expr);
+
+  nreq = transform_bindings (bindings, expr, &rvariables, &inits);
+
+  env = scm_cons (name, env);
+  return MAKMEMO_LET
+    (scm_list_1 (MAKMEMO_QUOTE (SCM_UNDEFINED)),
+     MAKMEMO_BEGIN
+     (scm_list_2 (MAKMEMO_LEX_SET
+                  (0,
+                   MAKMEMO_LAMBDA
+                   (nreq, SCM_BOOL_F,
+                    memoize_sequence (CDDDR (expr),
+                                      memoize_env_extend (env, rvariables)))),
+                  MAKMEMO_CALL (MAKMEMO_LEX_REF (0),
+                                memoize_exprs (inits, env)))));
+}
+
+/* (let ((v1 i1) (v2 i2) ...) body) with variables v1 .. vn and initializers
+ * i1 .. in is transformed to (address@hidden (vn ... v2 v1) (i1 i2 ...) 
body).  */
+static SCM
+scm_m_let (SCM expr, SCM env)
+{
+  SCM bindings;
+
+  const SCM cdr_expr = CDR (expr);
+  const long length = scm_ilength (cdr_expr);
+  ASSERT_SYNTAX (length >= 0, s_bad_expression, expr);
+  ASSERT_SYNTAX (length >= 2, s_missing_expression, expr);
+
+  bindings = CAR (cdr_expr);
+  if (scm_is_symbol (bindings))
+    {
+      ASSERT_SYNTAX (length >= 3, s_missing_expression, expr);
+      return memoize_named_let (expr, env);
+    }
+
+  check_bindings (bindings, expr);
+  if (scm_is_null (bindings))
+    return memoize_sequence (CDDR (expr), env);
+  else
+    {
+      SCM rvariables;
+      SCM inits;
+      transform_bindings (bindings, expr, &rvariables, &inits);
+      return MAKMEMO_LET (memoize_exprs (inits, env),
+                          memoize_sequence (CDDR (expr),
+                                            memoize_env_extend (env, 
rvariables)));
+    }
+}
+
+static SCM
+scm_m_letrec (SCM expr, SCM env)
+{
+  SCM bindings;
+
+  const SCM cdr_expr = CDR (expr);
+  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
+  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 2, s_missing_expression, expr);
+
+  bindings = CAR (cdr_expr);
+  if (scm_is_null (bindings))
+    return memoize_sequence (CDDR (expr), env);
+  else
+    {
+      SCM rvariables;
+      SCM inits;
+      SCM v, i;
+      SCM undefs = SCM_EOL;
+      SCM vals = SCM_EOL;
+      SCM sets = SCM_EOL;
+      SCM new_env;
+      int offset;
+      int n = transform_bindings (bindings, expr, &rvariables, &inits);
+      offset = n;
+      new_env = memoize_env_extend (env, rvariables);
+      for (v = scm_reverse (rvariables), i = inits; scm_is_pair (v);
+           v = CDR (v), i = CDR (i), n--)
+        {
+          undefs = scm_cons (MAKMEMO_QUOTE (SCM_UNDEFINED), undefs);
+          vals = scm_cons (memoize (CAR (i), new_env), vals);
+          sets = scm_cons (MAKMEMO_LEX_SET ((n-1) + offset,
+                                            MAKMEMO_LEX_REF (n-1)),
+                           sets);
+        }
+      return MAKMEMO_LET
+        (undefs,
+         MAKMEMO_BEGIN (scm_list_2 (MAKMEMO_LET (scm_reverse (vals),
+                                                 MAKMEMO_BEGIN (sets)),
+                                    memoize_sequence (CDDR (expr),
+                                                      new_env))));
+    }
+}
+
+static SCM
+scm_m_letstar (SCM expr, SCM env SCM_UNUSED)
+{
+  SCM bindings;
+
+  const SCM cdr_expr = CDR (expr);
+  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
+  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 2, s_missing_expression, expr);
+
+  bindings = CAR (cdr_expr);
+  if (scm_is_null (bindings))
+    return memoize_sequence (CDDR (expr), env);
+  else
+    {
+      SCM rvariables;
+      SCM variables;
+      SCM inits;
+      SCM ret, loc;
+      transform_bindings (bindings, expr, &rvariables, &inits);
+      variables = scm_reverse (rvariables);
+      ret = scm_cons (SCM_UNDEFINED, SCM_UNSPECIFIED);
+      loc = ret;
+      for (; scm_is_pair (variables);
+           variables = CDR (variables), inits = CDR (inits))
+        { SCM x = MAKMEMO_LET (scm_list_1 (memoize (CAR (inits), env)),
+                               MAKMEMO_QUOTE (SCM_UNSPECIFIED));
+          SCM_SETCDR (loc, x);
+          loc = scm_last_pair (SCM_MEMOIZED_ARGS (x));
+          env = scm_cons (CAR (variables), env);
+        }
+      SCM_SETCDR (loc, memoize_sequence (CDDR (expr), env));
+      return CDR (ret);
+    }
+}
+
+static SCM
+scm_m_or (SCM expr, SCM env SCM_UNUSED)
+{
+  SCM tail = CDR (expr);
+  SCM ret, loc;
+  const long length = scm_ilength (tail);
+
+  ASSERT_SYNTAX (length >= 0, s_bad_expression, expr);
+
+  ret = scm_cons (SCM_UNDEFINED, SCM_UNSPECIFIED);
+  loc = ret;
+  for (; scm_is_pair (tail); tail = CDR (tail))
+    {
+      SCM tmp = scm_gensym (scm_from_locale_string ("cond "));
+      SCM x = MAKMEMO_IF (MAKMEMO_LEX_REF (0),
+                          MAKMEMO_LEX_REF (0),
+                          MAKMEMO_QUOTE (SCM_UNSPECIFIED));
+      SCM new_env = scm_cons (tmp, env);
+      SCM_SETCDR (loc, MAKMEMO_LET (scm_list_1 (memoize (CAR (tail),
+                                                         env)),
+                                    x));
+      env = new_env;
+      loc = scm_last_pair (SCM_MEMOIZED_ARGS (x));
+    }
+  SCM_SETCDR (loc, MAKMEMO_QUOTE (SCM_BOOL_F));
+  return CDR (ret);
+}
+
+static SCM
+scm_m_quote (SCM expr, SCM env SCM_UNUSED)
+{
+  SCM quotee;
+
+  const SCM cdr_expr = CDR (expr);
+  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
+  ASSERT_SYNTAX (scm_ilength (cdr_expr) == 1, s_expression, expr);
+  quotee = CAR (cdr_expr);
+  return MAKMEMO_QUOTE (quotee);
+}
+
+static SCM
+scm_m_set_x (SCM expr, SCM env)
+{
+  SCM variable;
+  SCM vmem;
+
+  const SCM cdr_expr = CDR (expr);
+  ASSERT_SYNTAX (scm_ilength (cdr_expr) >= 0, s_bad_expression, expr);
+  ASSERT_SYNTAX (scm_ilength (cdr_expr) == 2, s_expression, expr);
+  variable = CAR (cdr_expr);
+  vmem = memoize (variable, env);
+  
+  switch (SCM_MEMOIZED_TAG (vmem))
+    {
+    case SCM_M_LEXICAL_REF:
+      return MAKMEMO_LEX_SET (SCM_I_INUM (SCM_MEMOIZED_ARGS (vmem)),
+                              memoize (CADDR (expr), env));
+    case SCM_M_TOPLEVEL_REF:
+      return MAKMEMO_TOP_SET (variable,
+                              memoize (CADDR (expr), env));
+    case SCM_M_MODULE_REF:
+      return MAKMEMO_MOD_SET (memoize (CADDR (expr), env),
+                              CAR (SCM_MEMOIZED_ARGS (vmem)),
+                              CADR (SCM_MEMOIZED_ARGS (vmem)),
+                              CDDR (SCM_MEMOIZED_ARGS (vmem)));
+    default:
+      syntax_error (s_bad_variable, variable, expr);
+    }
+}
+
+
+
+
+SCM_DEFINE (scm_memoize_expression, "memoize-expression", 1, 0, 0, 
+            (SCM exp),
+           "Memoize the expression @var{exp}.")
+#define FUNC_NAME s_scm_memoize_expression
+{
+  return memoize (exp, scm_current_module ());
+}
+#undef FUNC_NAME
+
+
+
+
+SCM_SYMBOL (sym_placeholder, "_");
+
+static SCM unmemoize (SCM expr);
+
+static SCM
+unmemoize_exprs (SCM exprs)
+{
+  SCM ret, tail;
+  if (scm_is_null (exprs))
+    return SCM_EOL;
+  ret = scm_list_1 (unmemoize (CAR (exprs)));
+  tail = ret;
+  for (exprs = CDR (exprs); !scm_is_null (exprs); exprs = CDR (exprs))
+    {
+      SCM_SETCDR (tail, scm_list_1 (unmemoize (CAR (exprs))));
+      tail = CDR (tail);
+    }
+  return ret;
+}
+
+static SCM
+unmemoize_bindings (SCM inits)
+{
+  SCM ret, tail;
+  if (scm_is_null (inits))
+    return SCM_EOL;
+  ret = scm_list_1 (scm_list_2 (sym_placeholder, unmemoize (CAR (inits))));
+  tail = ret;
+  for (inits = CDR (inits); !scm_is_null (inits); inits = CDR (inits))
+    {
+      SCM_SETCDR (tail, scm_list_1 (scm_list_2 (sym_placeholder,
+                                                unmemoize (CAR (inits)))));
+      tail = CDR (tail);
+    }
+  return ret;
+}
+
+static SCM
+unmemoize_lexical (SCM n)
+{
+  char buf[16];
+  buf[15] = 0;
+  snprintf (buf, 15, "<%u>", scm_to_uint32 (n));
+  return scm_from_locale_symbol (buf);
+}
+
+static SCM
+unmemoize (const SCM expr)
+{
+  SCM args;
+  
+  if (!SCM_MEMOIZED_P (expr))
+    abort ();
+
+  args = SCM_MEMOIZED_ARGS (expr);
+  switch (SCM_MEMOIZED_TAG (expr))
+    {
+    case SCM_M_APPLY:
+      return scm_cons (scm_sym_atapply, unmemoize_exprs (args));
+    case SCM_M_BEGIN:
+      return scm_cons (scm_sym_begin, unmemoize_exprs (args));
+    case SCM_M_CALL:
+      return unmemoize_exprs (args);
+    case SCM_M_CONT:
+      return scm_list_2 (scm_sym_atcall_cc, unmemoize (args));
+    case SCM_M_CALL_WITH_VALUES:
+      return scm_list_3 (scm_sym_at_call_with_values,
+                         unmemoize (CAR (args)), unmemoize (CDR (args)));
+    case SCM_M_DEFINE:
+      return scm_list_3 (scm_sym_define, CAR (args), unmemoize (CDR (args)));
+    case SCM_M_IF:
+      return scm_list_4 (scm_sym_if, unmemoize (scm_car (args)),
+                         unmemoize (scm_cadr (args)), unmemoize (scm_cddr 
(args)));
+    case SCM_M_LAMBDA:
+      return scm_list_3 (scm_sym_lambda,
+                         scm_make_list (CAR (args), sym_placeholder),
+                         unmemoize (CDDR (args)));
+    case SCM_M_LET:
+      return scm_list_3 (scm_sym_let,
+                         unmemoize_bindings (CAR (args)),
+                         unmemoize (CDR (args)));
+    case SCM_M_QUOTE:
+      return scm_list_2 (scm_sym_quote, args);
+    case SCM_M_LEXICAL_REF:
+      return unmemoize_lexical (args);
+    case SCM_M_LEXICAL_SET:
+      return scm_list_3 (scm_sym_set_x, unmemoize_lexical (CAR (args)),
+                         unmemoize (CDR (args)));
+    case SCM_M_TOPLEVEL_REF:
+      return args;
+    case SCM_M_TOPLEVEL_SET:
+      return scm_list_3 (scm_sym_set_x, CAR (args), unmemoize (CDR (args)));
+    case SCM_M_MODULE_REF:
+      return scm_list_3 (scm_is_true (CDDR (args)) ? scm_sym_at : scm_sym_atat,
+                         scm_i_finite_list_copy (CAR (args)),
+                         CADR (args));
+    case SCM_M_MODULE_SET:
+      return scm_list_3 (scm_sym_set_x,
+                         scm_list_3 (scm_is_true (CDDDR (args))
+                                     ? scm_sym_at : scm_sym_atat,
+                                     scm_i_finite_list_copy (CADR (args)),
+                                     CADDR (args)),
+                         unmemoize (CAR (args)));
+    default:
+      abort ();
+    }
+}
+
+SCM_DEFINE (scm_memoized_p, "memoized?", 1, 0, 0, 
+            (SCM obj),
+           "Return @code{#t} if @var{obj} is memoized.")
+#define FUNC_NAME s_scm_memoized_p
+{
+  return scm_from_bool (SCM_MEMOIZED_P (obj));
+}
+#undef FUNC_NAME
+
+SCM_DEFINE (scm_unmemoize_expression, "unmemoize-expression", 1, 0, 0, 
+            (SCM m),
+           "Unmemoize the memoized expression @var{m}.")
+#define FUNC_NAME s_scm_unmemoize_expression
+{
+  SCM_VALIDATE_MEMOIZED (1, m);
+  return unmemoize (m);
+}
+#undef FUNC_NAME
+
+SCM_DEFINE (scm_memoized_expression_typecode, "memoized-expression-typecode", 
1, 0, 0, 
+            (SCM m),
+           "Return the typecode from the memoized expression @var{m}.")
+#define FUNC_NAME s_scm_memoized_expression_typecode
+{
+  SCM_VALIDATE_MEMOIZED (1, m);
+  return scm_from_uint16 (SCM_MEMOIZED_TAG (m));
+}
+#undef FUNC_NAME
+
+SCM_DEFINE (scm_memoized_expression_data, "memoized-expression-data", 1, 0, 0, 
+            (SCM m),
+           "Return the data from the memoized expression @var{m}.")
+#define FUNC_NAME s_scm_memoized_expression_data
+{
+  SCM_VALIDATE_MEMOIZED (1, m);
+  return SCM_MEMOIZED_ARGS (m);
+}
+#undef FUNC_NAME
+
+SCM_DEFINE (scm_memoized_typecode, "memoized-typecode", 1, 0, 0, 
+            (SCM sym),
+           "Return the memoized typecode corresponding to the symbol 
@var{sym}.")
+#define FUNC_NAME s_scm_memoized_typecode
+{
+  int i;
+
+  SCM_VALIDATE_SYMBOL (1, sym);
+
+  for (i = 0; i < sizeof(memoized_tags)/sizeof(const char*); i++)
+    if (strcmp (scm_i_symbol_chars (sym), memoized_tags[i]) == 0)
+      return scm_from_int32 (i);
+
+  return SCM_BOOL_F;
+}
+#undef FUNC_NAME
+
+SCM_SYMBOL (scm_unbound_variable_key, "unbound-variable");
+static void error_unbound_variable (SCM symbol) SCM_NORETURN;
+static void error_unbound_variable (SCM symbol)
+{
+  scm_error (scm_unbound_variable_key, NULL, "Unbound variable: ~S",
+            scm_list_1 (symbol), SCM_BOOL_F);
+}
+
+SCM_DEFINE (scm_memoize_variable_access_x, "memoize-variable-access!", 2, 0, 
0, 
+            (SCM m, SCM mod),
+           "Look up and cache the variable that @var{m} will access, returning 
the variable.")
+#define FUNC_NAME s_scm_memoized_expression_data
+{
+  SCM mx;
+  SCM_VALIDATE_MEMOIZED (1, m);
+  mx = SCM_MEMOIZED_ARGS (m);
+  switch (SCM_MEMOIZED_TAG (m))
+    {
+    case SCM_M_TOPLEVEL_REF:
+      if (SCM_VARIABLEP (mx))
+        return mx;
+      else
+        {
+          SCM var = scm_module_variable (mod, mx);
+          if (scm_is_false (var) || scm_is_false (scm_variable_bound_p (var)))
+            error_unbound_variable (mx);
+          SCM_SET_SMOB_OBJECT (m, var);
+          return var;
+        }
+
+    case SCM_M_TOPLEVEL_SET:
+      {
+        SCM var = CAR (mx);
+        if (SCM_VARIABLEP (var))
+          return var;
+        else
+          {
+            var = scm_module_variable (mod, var);
+            if (scm_is_false (var))
+              error_unbound_variable (CAR (mx));
+            SCM_SETCAR (mx, var);
+            return var;
+          }
+      }
+
+    case SCM_M_MODULE_REF:
+      if (SCM_VARIABLEP (mx))
+        return mx;
+      else
+        {
+          SCM var;
+          mod = scm_resolve_module (CAR (mx));
+          if (scm_is_true (CDDR (mx)))
+            mod = scm_module_public_interface (mod);
+          var = scm_module_lookup (mod, CADR (mx));
+          if (scm_is_false (scm_variable_bound_p (var)))
+            error_unbound_variable (CADR (mx));
+          SCM_SET_SMOB_OBJECT (m, var);
+          return var;
+        }
+
+    case SCM_M_MODULE_SET:
+      /* FIXME: not quite threadsafe */
+      if (SCM_VARIABLEP (CDR (mx)))
+        return CDR (mx);
+      else
+        {
+          SCM var;
+          mod = scm_resolve_module (CADR (mx));
+          if (scm_is_true (CDDDR (mx)))
+            mod = scm_module_public_interface (mod);
+          var = scm_module_lookup (mod, CADDR (mx));
+          SCM_SETCDR (mx, var);
+          return var;
+        }
+
+    default:
+      scm_wrong_type_arg (FUNC_NAME, 1, m);
+      return SCM_BOOL_F;
+    }
+}
+#undef FUNC_NAME
+
+
+
+
+void
+scm_init_memoize ()
+{
+  scm_tc16_memoized = scm_make_smob_type ("%memoized", 0);
+  scm_set_smob_mark (scm_tc16_memoized, scm_markcdr);
+  scm_set_smob_print (scm_tc16_memoized, scm_print_memoized);
+
+#include "libguile/memoize.x"
+}
+
+/*
+  Local Variables:
+  c-file-style: "gnu"
+  End:
+*/
diff --git a/libguile/memoize.h b/libguile/memoize.h
new file mode 100644
index 0000000..e033e67
--- /dev/null
+++ b/libguile/memoize.h
@@ -0,0 +1,110 @@
+/* classes: h_files */
+
+#ifndef SCM_MEMOIZE_H
+#define SCM_MEMOIZE_H
+
+/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2004,2008,2009
+ * Free Software Foundation, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+
+
+#include "libguile/__scm.h"
+
+
+
+
+SCM_API SCM scm_sym_and;
+SCM_API SCM scm_sym_begin;
+SCM_API SCM scm_sym_case;
+SCM_API SCM scm_sym_cond;
+SCM_API SCM scm_sym_define;
+SCM_API SCM scm_sym_do;
+SCM_API SCM scm_sym_if;
+SCM_API SCM scm_sym_lambda;
+SCM_API SCM scm_sym_let;
+SCM_API SCM scm_sym_letstar;
+SCM_API SCM scm_sym_letrec;
+SCM_API SCM scm_sym_quote;
+SCM_API SCM scm_sym_quasiquote;
+SCM_API SCM scm_sym_unquote;
+SCM_API SCM scm_sym_uq_splicing;
+
+SCM_API SCM scm_sym_at;
+SCM_API SCM scm_sym_atat;
+SCM_API SCM scm_sym_atapply;
+SCM_API SCM scm_sym_atcall_cc;
+SCM_API SCM scm_sym_at_call_with_values;
+SCM_API SCM scm_sym_delay;
+SCM_API SCM scm_sym_eval_when;
+SCM_API SCM scm_sym_arrow;
+SCM_API SCM scm_sym_else;
+SCM_API SCM scm_sym_apply;
+SCM_API SCM scm_sym_set_x;
+SCM_API SCM scm_sym_args;
+
+/* {Memoized Source}
+ */
+
+SCM_INTERNAL scm_t_bits scm_tc16_memoized;
+
+#define SCM_MEMOIZED_P(x)      (SCM_SMOB_PREDICATE (scm_tc16_memoized, (x)))
+#define SCM_MEMOIZED_TAG(x)    (SCM_SMOB_FLAGS (x))
+#define SCM_MEMOIZED_ARGS(x)   (SCM_SMOB_OBJECT (x))
+
+enum
+  {
+    SCM_M_BEGIN,
+    SCM_M_IF,
+    SCM_M_LAMBDA,
+    SCM_M_LET,
+    SCM_M_QUOTE,
+    SCM_M_DEFINE,
+    SCM_M_APPLY,
+    SCM_M_CONT,
+    SCM_M_CALL_WITH_VALUES,
+    SCM_M_CALL,
+    SCM_M_LEXICAL_REF,
+    SCM_M_LEXICAL_SET,
+    SCM_M_TOPLEVEL_REF,
+    SCM_M_TOPLEVEL_SET,
+    SCM_M_MODULE_REF,
+    SCM_M_MODULE_SET
+  };
+
+
+
+
+SCM_INTERNAL SCM scm_memoize_expression (SCM exp);
+SCM_INTERNAL SCM scm_unmemoize_expression (SCM memoized);
+SCM_INTERNAL SCM scm_memoized_expression_typecode (SCM memoized);
+SCM_INTERNAL SCM scm_memoized_expression_data (SCM memoized);
+SCM_INTERNAL SCM scm_memoized_typecode (SCM sym);
+SCM_INTERNAL SCM scm_memoize_variable_access_x (SCM memoized, SCM module);
+SCM_API SCM scm_memoized_p (SCM obj);
+
+SCM_INTERNAL void scm_init_memoize (void);
+
+
+#endif  /* SCM_MEMOIZE_H */
+
+/*
+  Local Variables:
+  c-file-style: "gnu"
+  End:
+*/
diff --git a/libguile/modules.c b/libguile/modules.c
index c7f0a46..c48c2e8 100644
--- a/libguile/modules.c
+++ b/libguile/modules.c
@@ -52,8 +52,8 @@ static SCM unbound_variable (const char *func, SCM sym)
              "Unbound variable: ~S", scm_list_1 (sym), SCM_BOOL_F);
 }
 
-static SCM
-the_root_module ()
+SCM
+scm_the_root_module (void)
 {
   if (scm_module_system_booted_p)
     return SCM_VARIABLE_REF (the_root_module_var);
@@ -68,7 +68,7 @@ SCM_DEFINE (scm_current_module, "current-module", 0, 0, 0,
 {
   SCM curr = scm_fluid_ref (the_module);
 
-  return scm_is_true (curr) ? curr : the_root_module ();
+  return scm_is_true (curr) ? curr : scm_the_root_module ();
 }
 #undef FUNC_NAME
 
@@ -229,35 +229,13 @@ scm_c_export (const char *name, ...)
 
 /* Environments */
 
-SCM
-scm_top_level_env (SCM thunk)
-{
-  if (SCM_IMP (thunk))
-    return SCM_EOL;
-  else
-    return scm_cons (thunk, SCM_EOL);
-}
-
-SCM
-scm_env_top_level (SCM env)
-{
-  while (scm_is_pair (env))
-    {
-      SCM car_env = SCM_CAR (env);
-      if (!scm_is_pair (car_env) && scm_is_true (scm_procedure_p (car_env)))
-       return car_env;
-      env = SCM_CDR (env);
-    }
-  return SCM_BOOL_F;
-}
-
 SCM_SYMBOL (sym_module, "module");
 
 SCM
 scm_lookup_closure_module (SCM proc)
 {
   if (scm_is_false (proc))
-    return the_root_module ();
+    return scm_the_root_module ();
   else if (SCM_EVAL_CLOSURE_P (proc))
     return SCM_PACK (SCM_SMOB_DATA (proc));
   else
@@ -270,20 +248,11 @@ scm_lookup_closure_module (SCM proc)
 
       mod = scm_procedure_property (proc, sym_module);
       if (scm_is_false (mod))
-       mod = the_root_module ();
+       mod = scm_the_root_module ();
       return mod;
     }
 }
 
-SCM_DEFINE (scm_env_module, "env-module", 1, 0, 0,
-           (SCM env),
-           "Return the module of @var{ENV}, a lexical environment.")
-#define FUNC_NAME s_scm_env_module
-{
-  return scm_lookup_closure_module (scm_env_top_level (env));
-}
-#undef FUNC_NAME
-
 /*
  * C level implementation of the standard eval closure
  *
@@ -592,8 +561,10 @@ scm_current_module_lookup_closure ()
 
 SCM_SYMBOL (sym_sys_pre_modules_transformer, "%pre-modules-transformer");
 
-SCM
-scm_module_transformer (SCM module)
+SCM_DEFINE (scm_module_transformer, "module-transformer", 1, 0, 0,
+           (SCM module),
+           "Returns the syntax expander for the given module.")
+#define FUNC_NAME s_scm_module_transformer
 {
   if (SCM_UNLIKELY (scm_is_false (module)))
     { SCM v = scm_hashq_ref (scm_pre_modules_obarray,
@@ -605,8 +576,12 @@ scm_module_transformer (SCM module)
         return SCM_VARIABLE_REF (v);
     }
   else
-    return SCM_MODULE_TRANSFORMER (module);
+    {
+      SCM_VALIDATE_MODULE (SCM_ARG1, module);
+      return SCM_MODULE_TRANSFORMER (module);
+    }
 }
+#undef FUNC_NAME
 
 SCM
 scm_current_module_transformer ()
@@ -792,14 +767,20 @@ scm_c_define (const char *name, SCM value)
   return scm_define (scm_from_locale_symbol (name), value);
 }
 
-SCM
-scm_define (SCM sym, SCM value)
+SCM_DEFINE (scm_define, "define!", 2, 0, 0,
+           (SCM sym, SCM value),
+           "Define @var{sym} to be @var{value} in the current module."
+            "Returns the variable itself. Note that this is a procedure, "
+            "not a macro.")
+#define FUNC_NAME s_scm_define
 {
-  SCM var =
-    scm_sym2var (sym, scm_current_module_lookup_closure (), SCM_BOOL_T);
+  SCM var;
+  SCM_VALIDATE_SYMBOL (SCM_ARG1, sym);
+  var = scm_sym2var (sym, scm_current_module_lookup_closure (), SCM_BOOL_T);
   SCM_VARIABLE_SET (var, value);
   return var;
 }
+#undef FUNC_NAME
 
 SCM_DEFINE (scm_module_reverse_lookup, "module-reverse-lookup", 2, 0, 0,
            (SCM module, SCM variable),
@@ -878,18 +859,6 @@ SCM_DEFINE (scm_get_pre_modules_obarray, 
"%get-pre-modules-obarray", 0, 0, 0,
 
 SCM_SYMBOL (scm_sym_system_module, "system-module");
 
-SCM
-scm_system_module_env_p (SCM env)
-{
-  SCM proc = scm_env_top_level (env);
-  if (scm_is_false (proc))
-    return SCM_BOOL_T;
-  return ((scm_is_true (scm_procedure_property (proc,
-                                               scm_sym_system_module)))
-         ? SCM_BOOL_T
-         : SCM_BOOL_F);
-}
-
 void
 scm_modules_prehistory ()
 {
diff --git a/libguile/modules.h b/libguile/modules.h
index 8108ac3..aef7d3b 100644
--- a/libguile/modules.h
+++ b/libguile/modules.h
@@ -71,6 +71,7 @@ SCM_API scm_t_bits scm_tc16_eval_closure;
 
 
 SCM_API SCM scm_current_module (void);
+SCM_API SCM scm_the_root_module (void);
 SCM_API SCM scm_module_variable (SCM module, SCM sym);
 SCM_API SCM scm_module_local_variable (SCM module, SCM sym);
 SCM_API SCM scm_interaction_environment (void);
@@ -114,11 +115,6 @@ SCM_API SCM scm_eval_closure_module (SCM eval_closure); /* 
deprecated already */
 SCM_API SCM scm_get_pre_modules_obarray (void);
 SCM_API SCM scm_lookup_closure_module (SCM proc);
 
-SCM_API SCM scm_env_top_level (SCM env);
-SCM_API SCM scm_env_module (SCM env);
-SCM_API SCM scm_top_level_env (SCM thunk);
-SCM_API SCM scm_system_module_env_p (SCM env);
-
 SCM_INTERNAL void scm_modules_prehistory (void);
 SCM_INTERNAL void scm_init_modules (void);
 
diff --git a/libguile/print.c b/libguile/print.c
index fd984d3..3069edc 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -523,14 +523,6 @@ iprin1 (SCM exp, SCM port, scm_print_state *pstate)
         {
           scm_puts (iflagnames [SCM_IFLAGNUM (exp)], port);
         }
-      else if (SCM_ISYMP (exp))
-        {
-          scm_i_print_isym (exp, port);
-        }
-      else if (SCM_ILOCP (exp))
-       {
-          scm_i_print_iloc (exp, port);
-       }
       else
        {
          /* unknown immediate value */
@@ -574,22 +566,14 @@ iprin1 (SCM exp, SCM port, scm_print_state *pstate)
              || scm_is_false (scm_printer_apply (SCM_PRINT_CLOSURE,
                                                exp, port, pstate)))
            {
-             SCM formals = SCM_CLOSURE_FORMALS (exp);
              scm_puts ("#<procedure", port);
              scm_putc (' ', port);
              scm_iprin1 (scm_procedure_name (exp), port, pstate);
              scm_putc (' ', port);
-             if (SCM_PRINT_SOURCE_P)
-               {
-                 SCM env = SCM_ENV (exp);
-                 SCM xenv = SCM_EXTEND_ENV (formals, SCM_EOL, env);
-                 SCM src = scm_i_unmemocopy_body (SCM_CODE (exp), xenv);
-                 ENTER_NESTED_DATA (pstate, exp, circref);
-                 scm_iprin1 (src, port, pstate);
-                 EXIT_NESTED_DATA (pstate);
-               }
-             else
-               scm_iprin1 (formals, port, pstate);
+              scm_iprin1
+                (scm_cons (SCM_I_MAKINUM (SCM_CLOSURE_NUM_REQUIRED_ARGS (exp)),
+                           scm_from_bool (SCM_CLOSURE_HAS_REST_ARGS (exp))),
+                 port, pstate);
              scm_putc ('>', port);
            }
          break;
diff --git a/libguile/private-options.h b/libguile/private-options.h
index ffb699b..703ca8a 100644
--- a/libguile/private-options.h
+++ b/libguile/private-options.h
@@ -4,7 +4,7 @@
  * We put this in a private header, since layout of data structures
  * is an implementation detail that we want to hide.
  * 
- * Copyright (C) 2007 Free Software Foundation, Inc.
+ * Copyright (C) 2007, 2009 Free Software Foundation, Inc.
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -30,8 +30,6 @@
  */
 SCM_API scm_t_option scm_eval_opts[];
 
-SCM_API long scm_eval_stack;
-
 SCM_API scm_t_option scm_evaluator_trap_table[];
 
 SCM_API SCM scm_eval_options_interface (SCM setting);
diff --git a/libguile/procprop.c b/libguile/procprop.c
index c1a3789..cce800f 100644
--- a/libguile/procprop.c
+++ b/libguile/procprop.c
@@ -109,16 +109,8 @@ scm_i_procedure_arity (SCM proc)
       proc = SCM_PROCEDURE (proc);
       goto loop;
     case scm_tcs_closures:
-      proc = SCM_CLOSURE_FORMALS (proc);
-      if (scm_is_null (proc))
-       break;
-      while (scm_is_pair (proc))
-       {
-         ++a;
-         proc = SCM_CDR (proc);
-       }
-      if (!scm_is_null (proc))
-       r = 1;
+      a = SCM_CLOSURE_NUM_REQUIRED_ARGS (proc);
+      r = SCM_CLOSURE_HAS_REST_ARGS (proc) ? 1 : 0;
       break;
     case scm_tcs_struct:
       if (SCM_OBJ_CLASS_FLAGS (proc) & SCM_CLASSF_PURE_GENERIC)
diff --git a/libguile/procs.c b/libguile/procs.c
index dc43755..898a371 100644
--- a/libguile/procs.c
+++ b/libguile/procs.c
@@ -134,7 +134,7 @@ SCM_DEFINE (scm_thunk_p, "thunk?", 1, 0, 0,
       switch (SCM_TYP7 (obj))
        {
        case scm_tcs_closures:
-         return scm_from_bool (!scm_is_pair (SCM_CLOSURE_FORMALS (obj)));
+         return scm_from_bool (SCM_CLOSURE_NUM_REQUIRED_ARGS (obj) == 0);
        case scm_tc7_subr_0:
        case scm_tc7_subr_1o:
        case scm_tc7_lsubr:
diff --git a/libguile/procs.h b/libguile/procs.h
index 7e445ad..dc764ed 100644
--- a/libguile/procs.h
+++ b/libguile/procs.h
@@ -86,8 +86,9 @@
 #define SCM_CLOSUREP(x) (!SCM_IMP(x) && (SCM_TYP3 (x) == scm_tc3_closure))
 #define SCM_CLOSCAR(x) SCM_PACK (SCM_CELL_WORD_0 (x) - scm_tc3_closure)
 #define SCM_CODE(x) SCM_CAR (SCM_CLOSCAR (x))
-#define SCM_CLOSURE_FORMALS(x) SCM_CAR (SCM_CODE (x))
-#define SCM_CLOSURE_BODY(x) SCM_CDR (SCM_CODE (x))
+#define SCM_CLOSURE_NUM_REQUIRED_ARGS(x) SCM_I_INUM (SCM_CAR (SCM_CODE (x)))
+#define SCM_CLOSURE_HAS_REST_ARGS(x) scm_is_true (SCM_CADR (SCM_CODE (x)))
+#define SCM_CLOSURE_BODY(x) SCM_CDDR (SCM_CODE (x))
 #define SCM_PROCPROPS(x) SCM_CDR (SCM_CLOSCAR (x))
 #define SCM_SETPROCPROPS(x, p) SCM_SETCDR (SCM_CLOSCAR (x), p)
 #define SCM_ENV(x) SCM_CELL_OBJECT_1 (x)
diff --git a/libguile/promises.c b/libguile/promises.c
new file mode 100644
index 0000000..fc34cc8
--- /dev/null
+++ b/libguile/promises.c
@@ -0,0 +1,150 @@
+/* Copyright (C) 
1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009
+ * Free Software Foundation, Inc.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <alloca.h>
+
+#include "libguile/__scm.h"
+
+#include "libguile/_scm.h"
+#include "libguile/alist.h"
+#include "libguile/async.h"
+#include "libguile/continuations.h"
+#include "libguile/debug.h"
+#include "libguile/deprecation.h"
+#include "libguile/dynwind.h"
+#include "libguile/eq.h"
+#include "libguile/eval.h"
+#include "libguile/feature.h"
+#include "libguile/fluids.h"
+#include "libguile/goops.h"
+#include "libguile/hash.h"
+#include "libguile/hashtab.h"
+#include "libguile/lang.h"
+#include "libguile/list.h"
+#include "libguile/macros.h"
+#include "libguile/memoize.h"
+#include "libguile/modules.h"
+#include "libguile/ports.h"
+#include "libguile/print.h"
+#include "libguile/procprop.h"
+#include "libguile/programs.h"
+#include "libguile/root.h"
+#include "libguile/smob.h"
+#include "libguile/srcprop.h"
+#include "libguile/stackchk.h"
+#include "libguile/strings.h"
+#include "libguile/threads.h"
+#include "libguile/throw.h"
+#include "libguile/validate.h"
+#include "libguile/values.h"
+#include "libguile/promises.h"
+
+
+
+
+
+scm_t_bits scm_tc16_promise;
+
+SCM_DEFINE (scm_make_promise, "make-promise", 1, 0, 0, 
+           (SCM thunk),
+           "Create a new promise object.\n\n"
+            "@code{make-promise} is a procedural form of @code{delay}.\n"
+            "These two expressions are equivalent:\n"
+            "@lisp\n"
+           "(delay @var{exp})\n"
+           "(make-promise (lambda () @var{exp}))\n"
+            "@end lisp\n")
+#define FUNC_NAME s_scm_make_promise
+{
+  SCM_VALIDATE_THUNK (1, thunk);
+  SCM_RETURN_NEWSMOB2 (scm_tc16_promise,
+                      SCM_UNPACK (thunk),
+                      scm_make_recursive_mutex ());
+}
+#undef FUNC_NAME
+
+static int 
+promise_print (SCM exp, SCM port, scm_print_state *pstate)
+{
+  int writingp = SCM_WRITINGP (pstate);
+  scm_puts ("#<promise ", port);
+  SCM_SET_WRITINGP (pstate, 1);
+  scm_iprin1 (SCM_PROMISE_DATA (exp), port, pstate);
+  SCM_SET_WRITINGP (pstate, writingp);
+  scm_putc ('>', port);
+  return !0;
+}
+
+SCM_DEFINE (scm_force, "force", 1, 0, 0, 
+           (SCM promise),
+           "If the promise @var{x} has not been computed yet, compute and\n"
+           "return @var{x}, otherwise just return the previously computed\n"
+           "value.")
+#define FUNC_NAME s_scm_force
+{
+  SCM_VALIDATE_SMOB (1, promise, promise);
+  scm_lock_mutex (SCM_PROMISE_MUTEX (promise));
+  if (!SCM_PROMISE_COMPUTED_P (promise))
+    {
+      SCM ans = scm_call_0 (SCM_PROMISE_DATA (promise));
+      if (!SCM_PROMISE_COMPUTED_P (promise))
+       {
+         SCM_SET_PROMISE_DATA (promise, ans);
+         SCM_SET_PROMISE_COMPUTED (promise);
+       }
+    }
+  scm_unlock_mutex (SCM_PROMISE_MUTEX (promise));
+  return SCM_PROMISE_DATA (promise);
+}
+#undef FUNC_NAME
+
+
+SCM_DEFINE (scm_promise_p, "promise?", 1, 0, 0, 
+            (SCM obj),
+           "Return true if @var{obj} is a promise, i.e. a delayed 
computation\n"
+           "(@pxref{Delayed evaluation,,,r5rs.info,The Revised^5 Report on 
Scheme}).")
+#define FUNC_NAME s_scm_promise_p
+{
+  return scm_from_bool (SCM_TYP16_PREDICATE (scm_tc16_promise, obj));
+}
+#undef FUNC_NAME
+
+void 
+scm_init_promises ()
+{
+  scm_tc16_promise = scm_make_smob_type ("promise", 0);
+  scm_set_smob_print (scm_tc16_promise, promise_print);
+
+#include "libguile/promises.x"
+
+  scm_add_feature ("delay");
+}
+
+/*
+  Local Variables:
+  c-file-style: "gnu"
+  End:
+*/
+
diff --git a/libguile/lang.h b/libguile/promises.h
similarity index 52%
copy from libguile/lang.h
copy to libguile/promises.h
index b86fb2e..66349b5 100644
--- a/libguile/lang.h
+++ b/libguile/promises.h
@@ -1,9 +1,10 @@
 /* classes: h_files */
 
-#ifndef SCM_LANG_H
-#define SCM_LANG_H
+#ifndef SCM_PROMISES_H
+#define SCM_PROMISES_H
 
-/* Copyright (C) 1998, 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2003,2004,2008,2009
+ * Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -27,21 +28,31 @@
 
 
 
-#if SCM_ENABLE_ELISP
+/* {Promises}
+ */
+
+#define SCM_F_PROMISE_COMPUTED (1L << 0)
+#define SCM_PROMISE_COMPUTED_P(promise) \
+  (SCM_F_PROMISE_COMPUTED & SCM_SMOB_FLAGS (promise))
+#define SCM_SET_PROMISE_COMPUTED(promise) \
+  SCM_SET_SMOB_FLAGS ((promise), SCM_F_PROMISE_COMPUTED)
+#define SCM_PROMISE_MUTEX     SCM_SMOB_OBJECT_2
+#define SCM_PROMISE_DATA      SCM_SMOB_OBJECT
+#define SCM_SET_PROMISE_DATA  SCM_SET_SMOB_OBJECT
 
-#define SCM_NILP(x) (scm_is_eq ((x), SCM_ELISP_NIL))
 
-SCM_INTERNAL void scm_init_lang (void);
+SCM_API scm_t_bits scm_tc16_promise;
 
-#else  /* ! SCM_ENABLE_ELISP */
+
 
-#define SCM_NILP(x) 0
+SCM_API SCM scm_make_promise (SCM thunk);
+SCM_API SCM scm_force (SCM x);
+SCM_API SCM scm_promise_p (SCM x);
 
-#endif /* ! SCM_ENABLE_ELISP */
+SCM_INTERNAL void scm_init_promises (void);
 
-#define SCM_NULL_OR_NIL_P(x) (scm_is_null_or_nil (x))
 
-#endif  /* SCM_LANG_H */
+#endif  /* SCM_PROMISES_H */
 
 /*
   Local Variables:
diff --git a/libguile/quicksort.i.c b/libguile/quicksort.i.c
index 91801c1..4e39f82 100644
--- a/libguile/quicksort.i.c
+++ b/libguile/quicksort.i.c
@@ -55,7 +55,7 @@
 
 static void
 NAME (SCM *const base_ptr, size_t nr_elems, INC_PARAM
-      scm_t_trampoline_2 cmp, SCM less)
+      SCM less)
 {
   /* Stack node declarations used to store unfulfilled partition obligations. 
*/
   typedef struct {
@@ -93,13 +93,13 @@ NAME (SCM *const base_ptr, size_t nr_elems, INC_PARAM
 
          SCM_TICK;
        
-         if (scm_is_true ((*cmp) (less, ELT(mid), ELT(lo))))
+         if (scm_is_true (scm_call_2 (less, ELT(mid), ELT(lo))))
            SWAP (ELT(mid), ELT(lo));
-         if (scm_is_true ((*cmp) (less, ELT(hi), ELT(mid))))
+         if (scm_is_true (scm_call_2 (less, ELT(hi), ELT(mid))))
            SWAP (ELT(mid), ELT(hi));
          else
            goto jump_over;
-         if (scm_is_true ((*cmp) (less, ELT(mid), ELT(lo))))
+         if (scm_is_true (scm_call_2 (less, ELT(mid), ELT(lo))))
            SWAP (ELT(mid), ELT(lo));
        jump_over:;
 
@@ -112,7 +112,7 @@ NAME (SCM *const base_ptr, size_t nr_elems, INC_PARAM
             that this algorithm runs much faster than others. */
          do
            {
-             while (scm_is_true ((*cmp) (less, ELT(left), pivot)))
+             while (scm_is_true (scm_call_2 (less, ELT(left), pivot)))
                {
                  left += 1;
                  /* The comparison predicate may be buggy */
@@ -120,7 +120,7 @@ NAME (SCM *const base_ptr, size_t nr_elems, INC_PARAM
                    scm_misc_error (NULL, s_buggy_less, SCM_EOL);
                }
 
-             while (scm_is_true ((*cmp) (less, pivot, ELT(right))))
+             while (scm_is_true (scm_call_2 (less, pivot, ELT(right))))
                {
                  right -= 1;
                  /* The comparison predicate may be buggy */
@@ -192,7 +192,7 @@ NAME (SCM *const base_ptr, size_t nr_elems, INC_PARAM
        and the operation speeds up insertion sort's inner loop. */
 
     for (run = tmp + 1; run <= thresh; run += 1)
-      if (scm_is_true ((*cmp) (less, ELT(run), ELT(tmp))))
+      if (scm_is_true (scm_call_2 (less, ELT(run), ELT(tmp))))
        tmp = run;
 
     if (tmp != 0)
@@ -206,7 +206,7 @@ NAME (SCM *const base_ptr, size_t nr_elems, INC_PARAM
        SCM_TICK;
 
        tmp = run - 1;
-       while (scm_is_true ((*cmp) (less, ELT(run), ELT(tmp))))
+       while (scm_is_true (scm_call_2 (less, ELT(run), ELT(tmp))))
          {
            /* The comparison predicate may be buggy */
            if (tmp == 0)
diff --git a/libguile/sort.c b/libguile/sort.c
index a9e4dda..763978f 100644
--- a/libguile/sort.c
+++ b/libguile/sort.c
@@ -65,14 +65,6 @@
 #define INC         inc
 #include "libguile/quicksort.i.c"
 
-static scm_t_trampoline_2
-compare_function (SCM less, unsigned int arg_nr, const char* fname)
-{
-  const scm_t_trampoline_2 cmp = scm_trampoline_2 (less);
-  SCM_ASSERT_TYPE (cmp != NULL, less, arg_nr, fname, "less predicate");
-  return cmp;
-}
-
 
 SCM_DEFINE (scm_restricted_vector_sort_x, "restricted-vector-sort!", 4, 0, 0, 
             (SCM vec, SCM less, SCM startpos, SCM endpos),
@@ -83,7 +75,6 @@ SCM_DEFINE (scm_restricted_vector_sort_x, 
"restricted-vector-sort!", 4, 0, 0,
            "is not specified.")
 #define FUNC_NAME s_scm_restricted_vector_sort_x
 {
-  const scm_t_trampoline_2 cmp = compare_function (less, 2, FUNC_NAME);
   size_t vlen, spos, len;
   ssize_t vinc;
   scm_t_array_handle handle;
@@ -94,9 +85,9 @@ SCM_DEFINE (scm_restricted_vector_sort_x, 
"restricted-vector-sort!", 4, 0, 0,
   len = scm_to_unsigned_integer (endpos, spos, vlen) - spos;
 
   if (vinc == 1)
-    quicksort1 (velts + spos*vinc, len, cmp, less);
+    quicksort1 (velts + spos*vinc, len, less);
   else
-    quicksort (velts + spos*vinc, len, vinc, cmp, less);
+    quicksort (velts + spos*vinc, len, vinc, less);
 
   scm_array_handle_release (&handle);
 
@@ -116,7 +107,6 @@ SCM_DEFINE (scm_sorted_p, "sorted?", 2, 0, 0,
            "applied to all elements i - 1 and i")
 #define FUNC_NAME s_scm_sorted_p
 {
-  const scm_t_trampoline_2 cmp = compare_function (less, 2, FUNC_NAME);
   long len, j;                 /* list/vector length, temp j */
   SCM item, rest;              /* rest of items loop variable */
 
@@ -135,7 +125,7 @@ SCM_DEFINE (scm_sorted_p, "sorted?", 2, 0, 0,
       j = len - 1;
       while (j > 0)
        {
-         if (scm_is_true ((*cmp) (less, SCM_CAR (rest), item)))
+         if (scm_is_true (scm_call_2 (less, SCM_CAR (rest), item)))
            return SCM_BOOL_F;
          else
            {
@@ -158,7 +148,7 @@ SCM_DEFINE (scm_sorted_p, "sorted?", 2, 0, 0,
 
       for (i = 1; i < len; i++, elts += inc)
        {
-         if (scm_is_true ((*cmp) (less, elts[inc], elts[0])))
+         if (scm_is_true (scm_call_2 (less, elts[inc], elts[0])))
            {
              result = SCM_BOOL_F;
              break;
@@ -199,13 +189,12 @@ SCM_DEFINE (scm_merge, "merge", 3, 0, 0,
     return alist;
   else
     {
-      const scm_t_trampoline_2 cmp = compare_function (less, 3, FUNC_NAME);
       long alen, blen;         /* list lengths */
       SCM last;
 
       SCM_VALIDATE_NONEMPTYLIST_COPYLEN (1, alist, alen);
       SCM_VALIDATE_NONEMPTYLIST_COPYLEN (2, blist, blen);
-      if (scm_is_true ((*cmp) (less, SCM_CAR (blist), SCM_CAR (alist))))
+      if (scm_is_true (scm_call_2 (less, SCM_CAR (blist), SCM_CAR (alist))))
        {
          build = scm_cons (SCM_CAR (blist), SCM_EOL);
          blist = SCM_CDR (blist);
@@ -221,7 +210,7 @@ SCM_DEFINE (scm_merge, "merge", 3, 0, 0,
       while ((alen > 0) && (blen > 0))
        {
          SCM_TICK;
-         if (scm_is_true ((*cmp) (less, SCM_CAR (blist), SCM_CAR (alist))))
+         if (scm_is_true (scm_call_2 (less, SCM_CAR (blist), SCM_CAR (alist))))
            {
              SCM_SETCDR (last, scm_cons (SCM_CAR (blist), SCM_EOL));
              blist = SCM_CDR (blist);
@@ -248,7 +237,7 @@ SCM_DEFINE (scm_merge, "merge", 3, 0, 0,
 static SCM 
 scm_merge_list_x (SCM alist, SCM blist,
                  long alen, long blen,
-                 scm_t_trampoline_2 cmp, SCM less)
+                 SCM less)
 {
   SCM build, last;
 
@@ -258,7 +247,7 @@ scm_merge_list_x (SCM alist, SCM blist,
     return alist;
   else
     {
-      if (scm_is_true ((*cmp) (less, SCM_CAR (blist), SCM_CAR (alist))))
+      if (scm_is_true (scm_call_2 (less, SCM_CAR (blist), SCM_CAR (alist))))
        {
          build = blist;
          blist = SCM_CDR (blist);
@@ -274,7 +263,7 @@ scm_merge_list_x (SCM alist, SCM blist,
       while ((alen > 0) && (blen > 0))
        {
          SCM_TICK;
-         if (scm_is_true ((*cmp) (less, SCM_CAR (blist), SCM_CAR (alist))))
+         if (scm_is_true (scm_call_2 (less, SCM_CAR (blist), SCM_CAR (alist))))
            {
              SCM_SETCDR (last, blist);
              blist = SCM_CDR (blist);
@@ -314,11 +303,10 @@ SCM_DEFINE (scm_merge_x, "merge!", 3, 0, 0,
     return alist;
   else
     {
-      const scm_t_trampoline_2 cmp = compare_function (less, 3, FUNC_NAME);
       long alen, blen;         /* list lengths */
       SCM_VALIDATE_NONEMPTYLIST_COPYLEN (1, alist, alen);
       SCM_VALIDATE_NONEMPTYLIST_COPYLEN (2, blist, blen);
-      return scm_merge_list_x (alist, blist, alen, blen, cmp, less);
+      return scm_merge_list_x (alist, blist, alen, blen, less);
     }
 }
 #undef FUNC_NAME
@@ -330,7 +318,7 @@ SCM_DEFINE (scm_merge_x, "merge!", 3, 0, 0,
    though it claimed to be.
 */
 static SCM 
-scm_merge_list_step (SCM * seq, scm_t_trampoline_2 cmp, SCM less, long n)
+scm_merge_list_step (SCM * seq, SCM less, long n)
 {
   SCM a, b;
 
@@ -338,9 +326,9 @@ scm_merge_list_step (SCM * seq, scm_t_trampoline_2 cmp, SCM 
less, long n)
     {
       long mid = n / 2;
       SCM_TICK;
-      a = scm_merge_list_step (seq, cmp, less, mid);
-      b = scm_merge_list_step (seq, cmp, less, n - mid);
-      return scm_merge_list_x (a, b, mid, n - mid, cmp, less);
+      a = scm_merge_list_step (seq, less, mid);
+      b = scm_merge_list_step (seq, less, n - mid);
+      return scm_merge_list_x (a, b, mid, n - mid, less);
     }
   else if (n == 2)
     {
@@ -350,7 +338,7 @@ scm_merge_list_step (SCM * seq, scm_t_trampoline_2 cmp, SCM 
less, long n)
       SCM y = SCM_CAR (SCM_CDR (*seq));
       *seq = SCM_CDR (rest);
       SCM_SETCDR (rest, SCM_EOL);
-      if (scm_is_true ((*cmp) (less, y, x)))
+      if (scm_is_true (scm_call_2 (less, y, x)))
        {
          SCM_SETCAR (p, y);
          SCM_SETCAR (rest, x);
@@ -384,9 +372,8 @@ SCM_DEFINE (scm_sort_x, "sort!", 2, 0, 0,
 
   if (scm_is_pair (items))
     {
-      const scm_t_trampoline_2 cmp = compare_function (less, 2, FUNC_NAME);
       SCM_VALIDATE_LIST_COPYLEN (1, items, len);
-      return scm_merge_list_step (&items, cmp, less, len);
+      return scm_merge_list_step (&items, less, len);
     }
   else if (scm_is_vector (items))
     {
@@ -425,7 +412,6 @@ SCM_DEFINE (scm_sort, "sort", 2, 0, 0,
 static void
 scm_merge_vector_x (SCM *vec,
                    SCM *temp,
-                   scm_t_trampoline_2 cmp,
                    SCM less,
                    size_t low,
                    size_t mid,
@@ -441,7 +427,7 @@ scm_merge_vector_x (SCM *vec,
   /* Copy while both segments contain more characters */
   for (it = low; (i1 <= mid) && (i2 <= high); ++it)
     {
-      if (scm_is_true ((*cmp) (less, VEC(i2), VEC(i1))))
+      if (scm_is_true (scm_call_2 (less, VEC(i2), VEC(i1))))
        temp[it] = VEC(i2++);
       else
        temp[it] = VEC(i1++);
@@ -466,7 +452,6 @@ scm_merge_vector_x (SCM *vec,
 static void
 scm_merge_vector_step (SCM *vec,
                       SCM *temp,
-                      scm_t_trampoline_2 cmp,
                       SCM less,
                       size_t low,
                       size_t high,
@@ -476,9 +461,9 @@ scm_merge_vector_step (SCM *vec,
     {
       size_t mid = (low + high) / 2;
       SCM_TICK;
-      scm_merge_vector_step (vec, temp, cmp, less, low, mid, inc);
-      scm_merge_vector_step (vec, temp, cmp, less, mid+1, high, inc);
-      scm_merge_vector_x (vec, temp, cmp, less, low, mid, high, inc);
+      scm_merge_vector_step (vec, temp, less, low, mid, inc);
+      scm_merge_vector_step (vec, temp, less, mid+1, high, inc);
+      scm_merge_vector_x (vec, temp, less, low, mid, high, inc);
     }
 }                              /* scm_merge_vector_step */
 
@@ -492,7 +477,6 @@ SCM_DEFINE (scm_stable_sort_x, "stable-sort!", 2, 0, 0,
            "This is a stable sort.")
 #define FUNC_NAME s_scm_stable_sort_x
 {
-  const scm_t_trampoline_2 cmp = compare_function (less, 2, FUNC_NAME);
   long len;                    /* list/vector length */
 
   if (SCM_NULL_OR_NIL_P (items))
@@ -501,7 +485,7 @@ SCM_DEFINE (scm_stable_sort_x, "stable-sort!", 2, 0, 0,
   if (scm_is_pair (items))
     {
       SCM_VALIDATE_LIST_COPYLEN (1, items, len);
-      return scm_merge_list_step (&items, cmp, less, len);
+      return scm_merge_list_step (&items, less, len);
     }
   else if (scm_is_vector (items))
     {
@@ -516,7 +500,7 @@ SCM_DEFINE (scm_stable_sort_x, "stable-sort!", 2, 0, 0,
       temp_elts = scm_vector_writable_elements (temp, &temp_handle,
                                                NULL, NULL);
 
-      scm_merge_vector_step (vec_elts, temp_elts, cmp, less, 0, len-1, inc);
+      scm_merge_vector_step (vec_elts, temp_elts, less, 0, len-1, inc);
 
       scm_array_handle_release (&temp_handle);
       scm_array_handle_release (&vec_handle);
@@ -557,11 +541,10 @@ SCM_DEFINE (scm_sort_list_x, "sort-list!", 2, 0, 0,
            "This is a stable sort.")
 #define FUNC_NAME s_scm_sort_list_x
 {
-  const scm_t_trampoline_2 cmp = compare_function (less, 2, FUNC_NAME);
   long len;
 
   SCM_VALIDATE_LIST_COPYLEN (1, items, len);
-  return scm_merge_list_step (&items, cmp, less, len);
+  return scm_merge_list_step (&items, less, len);
 }
 #undef FUNC_NAME
 
@@ -572,12 +555,11 @@ SCM_DEFINE (scm_sort_list, "sort-list", 2, 0, 0,
            "list elements. This is a stable sort.")
 #define FUNC_NAME s_scm_sort_list
 {
-  const scm_t_trampoline_2 cmp = compare_function (less, 2, FUNC_NAME);
   long len;
 
   SCM_VALIDATE_LIST_COPYLEN (1, items, len);
   items = scm_list_copy (items);
-  return scm_merge_list_step (&items, cmp, less, len);
+  return scm_merge_list_step (&items, less, len);
 }
 #undef FUNC_NAME
 
diff --git a/libguile/srcprop.c b/libguile/srcprop.c
index 77430bd..1103864 100644
--- a/libguile/srcprop.c
+++ b/libguile/srcprop.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002, 2006, 2008 Free 
Software Foundation
+/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002, 2006, 2008, 2009 
Free Software Foundation
  * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -180,10 +180,6 @@ SCM_DEFINE (scm_source_properties, "source-properties", 1, 
0, 0,
 {
   SCM p;
   SCM_VALIDATE_NIM (1, obj);
-  if (SCM_MEMOIZEDP (obj))
-    obj = SCM_MEMOIZED_EXP (obj);
-  else if (!scm_is_pair (obj))
-    SCM_WRONG_TYPE_ARG (1, obj);
   p = scm_hashq_ref (scm_source_whash, obj, SCM_EOL);
   if (SRCPROPSP (p))
     return scm_srcprops_to_alist (p);
@@ -202,74 +198,7 @@ SCM_DEFINE (scm_set_source_properties_x, 
"set-source-properties!", 2, 0, 0,
 #define FUNC_NAME s_scm_set_source_properties_x
 {
   SCM handle;
-  long line = 0, col = 0;
-  SCM fname = SCM_UNDEFINED, copy = SCM_UNDEFINED, breakpoint = SCM_BOOL_F;
-  SCM others = SCM_EOL;
-  SCM *others_cdrloc = &others;
-  int need_srcprops = 0;
-  SCM tail, key;
-
   SCM_VALIDATE_NIM (1, obj);
-  if (SCM_MEMOIZEDP (obj))
-    obj = SCM_MEMOIZED_EXP (obj);
-  else if (!scm_is_pair (obj))
-    SCM_WRONG_TYPE_ARG(1, obj);
-
-  tail = alist;
-  while (!scm_is_null (tail))
-    {
-      key = SCM_CAAR (tail);
-      if (scm_is_eq (key, scm_sym_line))
-       {
-         line = scm_to_long (SCM_CDAR (tail));
-         need_srcprops = 1;
-       }
-      else if (scm_is_eq (key, scm_sym_column))
-       {
-         col = scm_to_long (SCM_CDAR (tail));
-         need_srcprops = 1;
-       }
-      else if (scm_is_eq (key, scm_sym_filename))
-       {
-         fname = SCM_CDAR (tail);
-         need_srcprops = 1;
-       }
-      else if (scm_is_eq (key, scm_sym_copy))
-       {
-         copy = SCM_CDAR (tail);
-         need_srcprops = 1;
-       }
-      else if (scm_is_eq (key, scm_sym_breakpoint))
-       {
-         breakpoint = SCM_CDAR (tail);
-         need_srcprops = 1;
-       }
-      else
-       {
-         /* Do we allocate here, or clobber the caller's alist?
-
-            Source properties aren't supposed to be used for anything
-            except the special properties above, so the mainline case
-            is that we never execute this else branch, and hence it
-            doesn't matter much.
-
-            We choose allocation here, as that seems safer.
-         */
-         *others_cdrloc = scm_cons (scm_cons (key, SCM_CDAR (tail)),
-                                    SCM_EOL);
-         others_cdrloc = SCM_CDRLOC (*others_cdrloc);
-       }
-      tail = SCM_CDR (tail);
-    }
-  if (need_srcprops)
-    {
-      alist = scm_make_srcprops (line, col, fname, copy, others);
-      if (scm_is_true (breakpoint))
-       SETSRCPROPBRK (alist);
-    }
-  else
-    alist = others;
-
   handle = scm_hashq_create_handle_x (scm_source_whash, obj, alist);
   SCM_SETCDR (handle, alist);
   return alist;
@@ -284,10 +213,6 @@ SCM_DEFINE (scm_source_property, "source-property", 2, 0, 
0,
 {
   SCM p;
   SCM_VALIDATE_NIM (1, obj);
-  if (SCM_MEMOIZEDP (obj))
-    obj = SCM_MEMOIZED_EXP (obj);
-  else if (!scm_is_pair (obj))
-    SCM_WRONG_TYPE_ARG (1, obj);
   p = scm_hashq_ref (scm_source_whash, obj, SCM_EOL);
   if (!SRCPROPSP (p))
     goto alist;
@@ -315,10 +240,6 @@ SCM_DEFINE (scm_set_source_property_x, 
"set-source-property!", 3, 0, 0,
   scm_whash_handle h;
   SCM p;
   SCM_VALIDATE_NIM (1, obj);
-  if (SCM_MEMOIZEDP (obj))
-    obj = SCM_MEMOIZED_EXP (obj);
-  else if (!scm_is_pair (obj))
-    SCM_WRONG_TYPE_ARG (1, obj);
   h = scm_whash_get_handle (scm_source_whash, obj);
   if (SCM_WHASHFOUNDP (h))
     p = SCM_WHASHREF (scm_source_whash, h);
@@ -383,6 +304,24 @@ SCM_DEFINE (scm_set_source_property_x, 
"set-source-property!", 3, 0, 0,
 #undef FUNC_NAME
 
 
+SCM_DEFINE (scm_cons_source, "cons-source", 3, 0, 0, 
+            (SCM xorig, SCM x, SCM y),
+           "Create and return a new pair whose car and cdr are @var{x} and 
@var{y}.\n"
+           "Any source properties associated with @var{xorig} are also 
associated\n"
+           "with the new pair.")
+#define FUNC_NAME s_scm_cons_source
+{
+  SCM p, z;
+  z = scm_cons (x, y);
+  /* Copy source properties possibly associated with xorig. */
+  p = scm_whash_lookup (scm_source_whash, xorig);
+  if (scm_is_true (p))
+    scm_whash_insert (scm_source_whash, z, p);
+  return z;
+}
+#undef FUNC_NAME
+
+
 void
 scm_init_srcprop ()
 {
diff --git a/libguile/srcprop.h b/libguile/srcprop.h
index ca8818a..a0f4772 100644
--- a/libguile/srcprop.h
+++ b/libguile/srcprop.h
@@ -72,6 +72,7 @@ SCM_API SCM scm_source_property (SCM obj, SCM key);
 SCM_API SCM scm_set_source_property_x (SCM obj, SCM key, SCM datum);
 SCM_API SCM scm_source_properties (SCM obj);
 SCM_API SCM scm_set_source_properties_x (SCM obj, SCM props);
+SCM_API SCM scm_cons_source (SCM xorig, SCM x, SCM y);
 SCM_INTERNAL void scm_init_srcprop (void);
 
 #if SCM_ENABLE_DEPRECATED == 1
diff --git a/libguile/srfi-13.c b/libguile/srfi-13.c
index f760931..cf2abfc 100644
--- a/libguile/srfi-13.c
+++ b/libguile/srfi-13.c
@@ -125,12 +125,12 @@ SCM_DEFINE (scm_string_any, "string-any-c-code", 2, 2, 0,
     }
   else
     {
-      scm_t_trampoline_1 pred_tramp = scm_trampoline_1 (char_pred);
-      SCM_ASSERT (pred_tramp, char_pred, SCM_ARG1, FUNC_NAME);
+      SCM_ASSERT (scm_is_true (scm_procedure_p (char_pred)),
+                  char_pred, SCM_ARG1, FUNC_NAME);
 
       while (cstart < cend)
         {
-          res = pred_tramp (char_pred, 
+          res = scm_call_1 (char_pred, 
                             SCM_MAKE_CHAR (scm_i_string_ref (s, cstart)));
           if (scm_is_true (res))
             break;
@@ -192,12 +192,12 @@ SCM_DEFINE (scm_string_every, "string-every-c-code", 2, 
2, 0,
     }
   else
     {
-      scm_t_trampoline_1 pred_tramp = scm_trampoline_1 (char_pred);
-      SCM_ASSERT (pred_tramp, char_pred, SCM_ARG1, FUNC_NAME);
+      SCM_ASSERT (scm_is_true (scm_procedure_p (char_pred)),
+                  char_pred, SCM_ARG1, FUNC_NAME);
 
       while (cstart < cend)
         {
-          res = pred_tramp (char_pred, 
+          res = scm_call_1 (char_pred, 
                             SCM_MAKE_CHAR (scm_i_string_ref (s, cstart)));
           if (scm_is_false (res))
             break;
@@ -222,10 +222,9 @@ SCM_DEFINE (scm_string_tabulate, "string-tabulate", 2, 0, 
0,
   size_t clen, i;
   SCM res;
   SCM ch;
-  scm_t_trampoline_1 proc_tramp;
 
-  proc_tramp = scm_trampoline_1 (proc);
-  SCM_ASSERT (proc_tramp, proc, SCM_ARG1, FUNC_NAME);
+  SCM_ASSERT (scm_is_true (scm_procedure_p (proc)),
+              proc, SCM_ARG1, FUNC_NAME);
 
   SCM_ASSERT_RANGE (2, len, scm_to_int (len) >= 0);
   clen = scm_to_size_t (len);
@@ -238,7 +237,7 @@ SCM_DEFINE (scm_string_tabulate, "string-tabulate", 2, 0, 0,
     i = 0; 
     while (i < clen)
       {
-        ch = proc_tramp (proc, scm_from_size_t (i));
+        ch = scm_call_1 (proc, scm_from_size_t (i));
         if (!SCM_CHARP (ch))
           {
             SCM_MISC_ERROR ("procedure ~S returned non-char", scm_list_1 
(proc));
@@ -745,14 +744,14 @@ SCM_DEFINE (scm_string_trim, "string-trim", 1, 3, 0,
     }
   else
     {
-      scm_t_trampoline_1 pred_tramp = scm_trampoline_1 (char_pred);
-      SCM_ASSERT (pred_tramp, char_pred, SCM_ARG2, FUNC_NAME);
+      SCM_ASSERT (scm_is_true (scm_procedure_p (char_pred)),
+                  char_pred, SCM_ARG2, FUNC_NAME);
 
       while (cstart < cend)
        {
          SCM res;
 
-         res = pred_tramp (char_pred, SCM_MAKE_CHAR (scm_i_string_ref (s, 
cstart)));
+         res = scm_call_1 (char_pred, SCM_MAKE_CHAR (scm_i_string_ref (s, 
cstart)));
          if (scm_is_false (res))
            break;
          cstart++;
@@ -820,14 +819,14 @@ SCM_DEFINE (scm_string_trim_right, "string-trim-right", 
1, 3, 0,
     }
   else
     {
-      scm_t_trampoline_1 pred_tramp = scm_trampoline_1 (char_pred);
-      SCM_ASSERT (pred_tramp, char_pred, SCM_ARG2, FUNC_NAME);
+      SCM_ASSERT (scm_is_true (scm_procedure_p (char_pred)),
+                  char_pred, SCM_ARG2, FUNC_NAME);
 
       while (cstart < cend)
        {
          SCM res;
 
-         res = pred_tramp (char_pred, SCM_MAKE_CHAR (scm_i_string_ref (s, cend 
- 1)));
+         res = scm_call_1 (char_pred, SCM_MAKE_CHAR (scm_i_string_ref (s, cend 
- 1)));
          if (scm_is_false (res))
            break;
          cend--;
@@ -913,14 +912,14 @@ SCM_DEFINE (scm_string_trim_both, "string-trim-both", 1, 
3, 0,
     }
   else
     {
-      scm_t_trampoline_1 pred_tramp = scm_trampoline_1 (char_pred);
-      SCM_ASSERT (pred_tramp, char_pred, SCM_ARG2, FUNC_NAME);
+      SCM_ASSERT (scm_is_true (scm_procedure_p (char_pred)),
+                  char_pred, SCM_ARG2, FUNC_NAME);
 
       while (cstart < cend)
        {
          SCM res;
 
-         res = pred_tramp (char_pred, SCM_MAKE_CHAR (scm_i_string_ref (s, 
cstart)));
+         res = scm_call_1 (char_pred, SCM_MAKE_CHAR (scm_i_string_ref (s, 
cstart)));
          if (scm_is_false (res))
            break;
          cstart++;
@@ -929,7 +928,7 @@ SCM_DEFINE (scm_string_trim_both, "string-trim-both", 1, 3, 
0,
        {
          SCM res;
 
-         res = pred_tramp (char_pred, SCM_MAKE_CHAR (scm_i_string_ref (s, cend 
- 1)));
+         res = scm_call_1 (char_pred, SCM_MAKE_CHAR (scm_i_string_ref (s, cend 
- 1)));
          if (scm_is_false (res))
            break;
          cend--;
@@ -1656,13 +1655,13 @@ SCM_DEFINE (scm_string_index, "string-index", 2, 2, 0,
     }
   else
     {
-      scm_t_trampoline_1 pred_tramp = scm_trampoline_1 (char_pred);
-      SCM_ASSERT (pred_tramp, char_pred, SCM_ARG2, FUNC_NAME);
+      SCM_ASSERT (scm_is_true (scm_procedure_p (char_pred)),
+                  char_pred, SCM_ARG2, FUNC_NAME);
 
       while (cstart < cend)
        {
          SCM res;
-         res = pred_tramp (char_pred, SCM_MAKE_CHAR (scm_i_string_ref (s, 
cstart)));
+         res = scm_call_1 (char_pred, SCM_MAKE_CHAR (scm_i_string_ref (s, 
cstart)));
          if (scm_is_true (res))
            goto found;
          cstart++;
@@ -1720,14 +1719,14 @@ SCM_DEFINE (scm_string_index_right, 
"string-index-right", 2, 2, 0,
     }
   else
     {
-      scm_t_trampoline_1 pred_tramp = scm_trampoline_1 (char_pred);
-      SCM_ASSERT (pred_tramp, char_pred, SCM_ARG2, FUNC_NAME);
+      SCM_ASSERT (scm_is_true (scm_procedure_p (char_pred)),
+                  char_pred, SCM_ARG2, FUNC_NAME);
 
       while (cstart < cend)
        {
          SCM res;
          cend--;
-         res = pred_tramp (char_pred, SCM_MAKE_CHAR (scm_i_string_ref (s, 
cend)));
+         res = scm_call_1 (char_pred, SCM_MAKE_CHAR (scm_i_string_ref (s, 
cend)));
          if (scm_is_true (res))
            goto found;
        }
@@ -1806,13 +1805,13 @@ SCM_DEFINE (scm_string_skip, "string-skip", 2, 2, 0,
     }
   else
     {
-      scm_t_trampoline_1 pred_tramp = scm_trampoline_1 (char_pred);
-      SCM_ASSERT (pred_tramp, char_pred, SCM_ARG2, FUNC_NAME);
+      SCM_ASSERT (scm_is_true (scm_procedure_p (char_pred)),
+                  char_pred, SCM_ARG2, FUNC_NAME);
 
       while (cstart < cend)
        {
          SCM res;
-         res = pred_tramp (char_pred, SCM_MAKE_CHAR (scm_i_string_ref (s, 
cstart)));
+         res = scm_call_1 (char_pred, SCM_MAKE_CHAR (scm_i_string_ref (s, 
cstart)));
          if (scm_is_false (res))
            goto found;
          cstart++;
@@ -1872,14 +1871,14 @@ SCM_DEFINE (scm_string_skip_right, "string-skip-right", 
2, 2, 0,
     }
   else
     {
-      scm_t_trampoline_1 pred_tramp = scm_trampoline_1 (char_pred);
-      SCM_ASSERT (pred_tramp, char_pred, SCM_ARG2, FUNC_NAME);
+      SCM_ASSERT (scm_is_true (scm_procedure_p (char_pred)),
+                  char_pred, SCM_ARG2, FUNC_NAME);
 
       while (cstart < cend)
        {
          SCM res;
          cend--;
-         res = pred_tramp (char_pred, SCM_MAKE_CHAR (scm_i_string_ref (s, 
cend)));
+         res = scm_call_1 (char_pred, SCM_MAKE_CHAR (scm_i_string_ref (s, 
cend)));
          if (scm_is_false (res))
            goto found;
        }
@@ -1939,13 +1938,13 @@ SCM_DEFINE (scm_string_count, "string-count", 2, 2, 0,
     }
   else
     {
-      scm_t_trampoline_1 pred_tramp = scm_trampoline_1 (char_pred);
-      SCM_ASSERT (pred_tramp, char_pred, SCM_ARG2, FUNC_NAME);
+      SCM_ASSERT (scm_is_true (scm_procedure_p (char_pred)),
+                  char_pred, SCM_ARG2, FUNC_NAME);
 
       while (cstart < cend)
        {
          SCM res;
-         res = pred_tramp (char_pred, SCM_MAKE_CHAR (scm_i_string_ref (s, 
cstart)));
+         res = scm_call_1 (char_pred, SCM_MAKE_CHAR (scm_i_string_ref (s, 
cstart)));
          if (scm_is_true (res))
            count++;
          cstart++;
@@ -2452,9 +2451,9 @@ SCM_DEFINE (scm_string_map, "string-map", 2, 2, 0,
   size_t p;
   size_t cstart, cend;
   SCM result;
-  scm_t_trampoline_1 proc_tramp = scm_trampoline_1 (proc);
 
-  SCM_ASSERT (proc_tramp, proc, SCM_ARG1, FUNC_NAME);
+  SCM_ASSERT (scm_is_true (scm_procedure_p (proc)),
+              proc, SCM_ARG1, FUNC_NAME);
   MY_VALIDATE_SUBSTRING_SPEC (2, s,
                              3, start, cstart,
                              4, end, cend);
@@ -2462,7 +2461,7 @@ SCM_DEFINE (scm_string_map, "string-map", 2, 2, 0,
   p = 0;
   while (cstart < cend)
     {
-      SCM ch = proc_tramp (proc, scm_c_string_ref (s, cstart));
+      SCM ch = scm_call_1 (proc, scm_c_string_ref (s, cstart));
       if (!SCM_CHARP (ch))
        SCM_MISC_ERROR ("procedure ~S returned non-char", scm_list_1 (proc));
       cstart++;
@@ -2486,15 +2485,15 @@ SCM_DEFINE (scm_string_map_x, "string-map!", 2, 2, 0,
 #define FUNC_NAME s_scm_string_map_x
 {
   size_t cstart, cend;
-  scm_t_trampoline_1 proc_tramp = scm_trampoline_1 (proc);
 
-  SCM_ASSERT (proc_tramp, proc, SCM_ARG1, FUNC_NAME);
+  SCM_ASSERT (scm_is_true (scm_procedure_p (proc)),
+              proc, SCM_ARG1, FUNC_NAME);
   MY_VALIDATE_SUBSTRING_SPEC (2, s,
                              3, start, cstart,
                              4, end, cend);
   while (cstart < cend)
     {
-      SCM ch = proc_tramp (proc, scm_c_string_ref (s, cstart));
+      SCM ch = scm_call_1 (proc, scm_c_string_ref (s, cstart));
       if (!SCM_CHARP (ch))
        SCM_MISC_ERROR ("procedure ~S returned non-char", scm_list_1 (proc));
       s = scm_i_string_start_writing (s);
@@ -2702,15 +2701,15 @@ SCM_DEFINE (scm_string_for_each, "string-for-each", 2, 
2, 0,
 #define FUNC_NAME s_scm_string_for_each
 {
   size_t cstart, cend;
-  scm_t_trampoline_1 proc_tramp = scm_trampoline_1 (proc);
 
-  SCM_ASSERT (proc_tramp, proc, SCM_ARG1, FUNC_NAME);
+  SCM_ASSERT (scm_is_true (scm_procedure_p (proc)),
+              proc, SCM_ARG1, FUNC_NAME);
   MY_VALIDATE_SUBSTRING_SPEC (2, s,
                              3, start, cstart,
                              4, end, cend);
   while (cstart < cend)
     {
-      proc_tramp (proc, SCM_MAKE_CHAR (scm_i_string_ref (s, cstart)));
+      scm_call_1 (proc, SCM_MAKE_CHAR (scm_i_string_ref (s, cstart)));
       cstart++;
     }
 
@@ -2740,16 +2739,16 @@ SCM_DEFINE (scm_string_for_each_index, 
"string-for-each-index", 2, 2, 0,
 #define FUNC_NAME s_scm_string_for_each_index
 {
   size_t cstart, cend;
-  scm_t_trampoline_1 proc_tramp = scm_trampoline_1 (proc);
 
-  SCM_ASSERT (proc_tramp, proc, SCM_ARG1, FUNC_NAME);
+  SCM_ASSERT (scm_is_true (scm_procedure_p (proc)),
+              proc, SCM_ARG1, FUNC_NAME);
   MY_VALIDATE_SUBSTRING_SPEC (2, s,
                              3, start, cstart,
                              4, end, cend);
 
   while (cstart < cend)
     {
-      proc_tramp (proc, scm_from_size_t (cstart));
+      scm_call_1 (proc, scm_from_size_t (cstart));
       cstart++;
     }
 
@@ -3106,15 +3105,15 @@ SCM_DEFINE (scm_string_filter, "string-filter", 2, 2, 0,
   else
     {
       SCM ls = SCM_EOL;
-      scm_t_trampoline_1 pred_tramp = scm_trampoline_1 (char_pred);
 
-      SCM_ASSERT (pred_tramp, char_pred, SCM_ARG2, FUNC_NAME);
+      SCM_ASSERT (scm_is_true (scm_procedure_p (char_pred)),
+                  char_pred, SCM_ARG2, FUNC_NAME);
       idx = cstart;
       while (idx < cend)
        {
          SCM res, ch;
          ch = SCM_MAKE_CHAR (scm_i_string_ref (s, idx));
-         res = pred_tramp (char_pred, ch);
+         res = scm_call_1 (char_pred, ch);
          if (scm_is_true (res))
            ls = scm_cons (ch, ls);
          idx++;
@@ -3242,14 +3241,14 @@ SCM_DEFINE (scm_string_delete, "string-delete", 2, 2, 0,
   else
     {
       SCM ls = SCM_EOL;
-      scm_t_trampoline_1 pred_tramp = scm_trampoline_1 (char_pred);
-      SCM_ASSERT (pred_tramp, char_pred, SCM_ARG2, FUNC_NAME);
+      SCM_ASSERT (scm_is_true (scm_procedure_p (char_pred)),
+                  char_pred, SCM_ARG2, FUNC_NAME);
 
       idx = cstart;
       while (idx < cend)
        {
          SCM res, ch = SCM_MAKE_CHAR (scm_i_string_ref (s, idx));
-         res = pred_tramp (char_pred, ch);
+         res = scm_call_1 (char_pred, ch);
          if (scm_is_false (res))
            ls = scm_cons (ch, ls);
          idx++;
diff --git a/libguile/stacks.c b/libguile/stacks.c
index a701863..79fe2bd 100644
--- a/libguile/stacks.c
+++ b/libguile/stacks.c
@@ -212,7 +212,6 @@ read_frame (scm_t_debug_frame *dframe, scm_t_ptrdiff offset,
                flags |= SCM_FRAMEF_EVAL_ARGS;
            }
        }
-      iframe->source = scm_make_memoized (info[0].e.exp, info[0].e.env);
     }
   else
     {
@@ -239,16 +238,6 @@ get_applybody ()
 
 #define NEXT_FRAME(iframe, n, quit) \
 do { \
-  if (SCM_MEMOIZEDP (iframe->source) \
-      && scm_is_eq (SCM_MEMOIZED_EXP (iframe->source), applybody)) \
-    { \
-      iframe->source = SCM_BOOL_F; \
-      if (scm_is_false (iframe->proc)) \
-       { \
-         --iframe; \
-         ++n; \
-       } \
-    } \
   ++iframe; \
   if (--n == 0) \
     goto quit; \
@@ -316,8 +305,7 @@ read_frames (scm_t_debug_frame *dframe, scm_t_ptrdiff 
offset,
                }
              else
                iframe->flags = SCM_UNPACK (SCM_INUM0);
-             iframe->source = scm_make_memoized (info[0].e.exp,
-                                                 info[0].e.env);
+             iframe->source = SCM_BOOL_F;
              info -= 2;
              NEXT_FRAME (iframe, n, quit);
            }
@@ -395,31 +383,7 @@ narrow_stack (SCM stack, long inner, SCM inner_key, long 
outer, SCM outer_key)
     {
       /* Cut all frames up to user module code */
       for (i = 0; inner; ++i, --inner)
-       {
-         SCM m = s->frames[i].source;
-         if (SCM_MEMOIZEDP (m)
-             && !SCM_IMP (SCM_MEMOIZED_ENV (m))
-             && scm_is_false (scm_system_module_env_p (SCM_MEMOIZED_ENV (m))))
-           {
-             /* Back up in order to include any non-source frames */
-             while (i > 0)
-               {
-                 m = s->frames[i - 1].source;
-                 if (SCM_MEMOIZEDP (m))
-                   break;
-
-                 m = s->frames[i - 1].proc;
-                 if (scm_is_true (scm_procedure_p (m))
-                     && scm_is_true (scm_procedure_property
-                                     (m, scm_sym_system_procedure)))
-                   break;
-
-                 --i;
-                 ++inner;
-               }
-             break;
-           }
-       }
+        ;
     }
   else
     /* Use standard cutting procedure. */
diff --git a/libguile/tags.h b/libguile/tags.h
index 210a82b..92d0bb8 100644
--- a/libguile/tags.h
+++ b/libguile/tags.h
@@ -307,8 +307,8 @@ typedef scm_t_uintptr scm_t_bits;
  * tc8 (for objects with tc3==100):
  *   00000-100:  special objects ('flags')
  *   00001-100:  characters
- *   00010-100:  evaluator byte codes ('isyms')
- *   00011-100:  evaluator byte codes ('ilocs')
+ *   00010-100:  unused
+ *   00011-100:  unused
  *
  *
  * Summary of type codes on the heap
@@ -464,8 +464,8 @@ enum scm_tc8_tags
 {
   scm_tc8_flag = scm_tc3_imm24 + 0x00,  /* special objects ('flags') */
   scm_tc8_char = scm_tc3_imm24 + 0x08,  /* characters */
-  scm_tc8_isym = scm_tc3_imm24 + 0x10,  /* evaluator byte codes ('isyms') */
-  scm_tc8_iloc = scm_tc3_imm24 + 0x18   /* evaluator byte codes ('ilocs') */
+  scm_tc8_unused_0 = scm_tc3_imm24 + 0x10,
+  scm_tc8_unused_1 = scm_tc3_imm24 + 0x18
 };
 
 #define SCM_ITAG8(X)           (SCM_UNPACK (X) & 0xff)
@@ -586,42 +586,6 @@ enum scm_tc8_tags
 #endif /* BUILDING_LIBGUILE */
 
 
-/* Evaluator byte codes ('immediate symbols').  These constants are used only
- * in eval but their values have to be allocated here.  The indices of the
- * SCM_IM_ symbols must agree with the declarations in eval.c:
- * scm_isymnames.  */
-
-#define SCM_ISYMP(n)           (SCM_ITAG8 (n) == scm_tc8_isym)
-#define SCM_MAKISYM(n)                 SCM_MAKE_ITAG8 ((n), scm_tc8_isym)
-
-#define SCM_IM_AND              SCM_MAKISYM (0)
-#define SCM_IM_BEGIN            SCM_MAKISYM (1)
-#define SCM_IM_CASE             SCM_MAKISYM (2)
-#define SCM_IM_COND             SCM_MAKISYM (3)
-#define SCM_IM_DO               SCM_MAKISYM (4)
-#define SCM_IM_IF               SCM_MAKISYM (5)
-#define SCM_IM_LAMBDA           SCM_MAKISYM (6)
-#define SCM_IM_LET              SCM_MAKISYM (7)
-#define SCM_IM_LETSTAR          SCM_MAKISYM (8)
-#define SCM_IM_LETREC           SCM_MAKISYM (9)
-#define SCM_IM_OR               SCM_MAKISYM (10)
-#define SCM_IM_QUOTE            SCM_MAKISYM (11)
-#define SCM_IM_SET_X            SCM_MAKISYM (12)
-#define SCM_IM_DEFINE           SCM_MAKISYM (13)
-#define SCM_IM_APPLY           SCM_MAKISYM (14)
-#define SCM_IM_CONT            SCM_MAKISYM (15)
-#define SCM_IM_DISPATCH                SCM_MAKISYM (16)
-#define SCM_IM_SLOT_REF                SCM_MAKISYM (17)
-#define SCM_IM_SLOT_SET_X      SCM_MAKISYM (18)
-#define SCM_IM_DELAY           SCM_MAKISYM (19)
-#define SCM_IM_CALL_WITH_VALUES SCM_MAKISYM (20)
-#define SCM_IM_ELSE             SCM_MAKISYM (21)
-#define SCM_IM_ARROW            SCM_MAKISYM (22)
-#define SCM_IM_NIL_COND         SCM_MAKISYM (23)  /* Multi-language support */
-#define SCM_IM_BIND             SCM_MAKISYM (24)  /* Multi-language support */
-
-
-
 /* Dispatching aids:
 
    When switching on SCM_TYP7 of a SCM value, use these fake case
diff --git a/libguile/trees.c b/libguile/trees.c
new file mode 100644
index 0000000..cbfd427
--- /dev/null
+++ b/libguile/trees.c
@@ -0,0 +1,211 @@
+/* Copyright (C) 
1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009
+ * Free Software Foundation, Inc.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "libguile/_scm.h"
+#include "libguile/eq.h"
+#include "libguile/lang.h"
+
+#include "libguile/validate.h"
+#include "libguile/list.h"
+#include "libguile/vectors.h"
+#include "libguile/srcprop.h"
+#include "libguile/trees.h"
+
+#include <stdarg.h>
+
+
+/* scm_copy_tree creates deep copies of pairs and vectors, but not of any other
+ * data types.
+ *
+ * To avoid infinite recursion due to cyclic structures, the hare-and-tortoise
+ * pattern is used to detect cycles.  In fact, the pattern is used in two
+ * dimensions, vertical (indicated in the code by the variable names 'hare'
+ * and 'tortoise') and horizontal ('rabbit' and 'turtle').  In both
+ * dimensions, the hare/rabbit will take two steps when the tortoise/turtle
+ * takes one.
+ *
+ * The vertical dimension corresponds to recursive calls to function
+ * copy_tree: This happens when descending into vector elements, into cars of
+ * lists and into the cdr of an improper list.  In this dimension, the
+ * tortoise follows the hare by using the processor stack: Every stack frame
+ * will hold an instance of struct t_trace.  These instances are connected in
+ * a way that represents the trace of the hare, which thus can be followed by
+ * the tortoise.  The tortoise will always point to struct t_trace instances
+ * relating to SCM objects that have already been copied.  Thus, a cycle is
+ * detected if the tortoise and the hare point to the same object,
+ *
+ * The horizontal dimension is within one execution of copy_tree, when the
+ * function cdr's along the pairs of a list.  This is the standard
+ * hare-and-tortoise implementation, found several times in guile.  */
+
+struct t_trace {
+  struct t_trace *trace; /* These pointers form a trace along the stack. */
+  SCM obj;               /* The object handled at the respective stack frame.*/
+};
+
+static SCM
+copy_tree (struct t_trace *const hare,
+           struct t_trace *tortoise,
+           unsigned int tortoise_delay);
+
+SCM_DEFINE (scm_copy_tree, "copy-tree", 1, 0, 0, 
+            (SCM obj),
+           "Recursively copy the data tree that is bound to @var{obj}, and 
return a\n"
+           "the new data structure.  @code{copy-tree} recurses down the\n"
+           "contents of both pairs and vectors (since both cons cells and 
vector\n"
+           "cells may point to arbitrary objects), and stops recursing when it 
hits\n"
+           "any other object.")
+#define FUNC_NAME s_scm_copy_tree
+{
+  /* Prepare the trace along the stack.  */
+  struct t_trace trace;
+  trace.obj = obj;
+
+  /* In function copy_tree, if the tortoise makes its step, it will do this
+   * before the hare has the chance to move.  Thus, we have to make sure that
+   * the very first step of the tortoise will not happen after the hare has
+   * really made two steps.  This is achieved by passing '2' as the initial
+   * delay for the tortoise.  NOTE: Since cycles are unlikely, giving the hare
+   * a bigger advantage may improve performance slightly.  */
+  return copy_tree (&trace, &trace, 2);
+}
+#undef FUNC_NAME
+
+
+static SCM
+copy_tree (struct t_trace *const hare,
+           struct t_trace *tortoise,
+           unsigned int tortoise_delay)
+#define FUNC_NAME s_scm_copy_tree
+{
+  if (!scm_is_pair (hare->obj) && !scm_is_simple_vector (hare->obj))
+    {
+      return hare->obj;
+    }
+  else
+    {
+      /* Prepare the trace along the stack.  */
+      struct t_trace new_hare;
+      hare->trace = &new_hare;
+
+      /* The tortoise will make its step after the delay has elapsed.  Note
+       * that in contrast to the typical hare-and-tortoise pattern, the step
+       * of the tortoise happens before the hare takes its steps.  This is, in
+       * principle, no problem, except for the start of the algorithm: Then,
+       * it has to be made sure that the hare actually gets its advantage of
+       * two steps.  */
+      if (tortoise_delay == 0)
+        {
+          tortoise_delay = 1;
+          tortoise = tortoise->trace;
+          if (SCM_UNLIKELY (scm_is_eq (hare->obj, tortoise->obj)))
+            scm_wrong_type_arg_msg (FUNC_NAME, 1, hare->obj,
+                                    "expected non-circular data structure");
+        }
+      else
+        {
+          --tortoise_delay;
+        }
+
+      if (scm_is_simple_vector (hare->obj))
+        {
+          size_t length = SCM_SIMPLE_VECTOR_LENGTH (hare->obj);
+          SCM new_vector = scm_c_make_vector (length, SCM_UNSPECIFIED);
+
+          /* Each vector element is copied by recursing into copy_tree, having
+           * the tortoise follow the hare into the depths of the stack.  */
+          unsigned long int i;
+          for (i = 0; i < length; ++i)
+            {
+              SCM new_element;
+              new_hare.obj = SCM_SIMPLE_VECTOR_REF (hare->obj, i);
+              new_element = copy_tree (&new_hare, tortoise, tortoise_delay);
+              SCM_SIMPLE_VECTOR_SET (new_vector, i, new_element);
+            }
+
+          return new_vector;
+        }
+      else /* scm_is_pair (hare->obj) */
+        {
+          SCM result;
+          SCM tail;
+
+          SCM rabbit = hare->obj;
+          SCM turtle = hare->obj;
+
+          SCM copy;
+
+          /* The first pair of the list is treated specially, in order to
+           * preserve a potential source code position.  */
+          result = tail = scm_cons_source (rabbit, SCM_EOL, SCM_EOL);
+          new_hare.obj = SCM_CAR (rabbit);
+          copy = copy_tree (&new_hare, tortoise, tortoise_delay);
+          SCM_SETCAR (tail, copy);
+
+          /* The remaining pairs of the list are copied by, horizontally,
+           * having the turtle follow the rabbit, and, vertically, having the
+           * tortoise follow the hare into the depths of the stack.  */
+          rabbit = SCM_CDR (rabbit);
+          while (scm_is_pair (rabbit))
+            {
+              new_hare.obj = SCM_CAR (rabbit);
+              copy = copy_tree (&new_hare, tortoise, tortoise_delay);
+              SCM_SETCDR (tail, scm_cons (copy, SCM_UNDEFINED));
+              tail = SCM_CDR (tail);
+
+              rabbit = SCM_CDR (rabbit);
+              if (scm_is_pair (rabbit))
+                {
+                  new_hare.obj = SCM_CAR (rabbit);
+                  copy = copy_tree (&new_hare, tortoise, tortoise_delay);
+                  SCM_SETCDR (tail, scm_cons (copy, SCM_UNDEFINED));
+                  tail = SCM_CDR (tail);
+                  rabbit = SCM_CDR (rabbit);
+
+                  turtle = SCM_CDR (turtle);
+                  if (SCM_UNLIKELY (scm_is_eq (rabbit, turtle)))
+                    scm_wrong_type_arg_msg (FUNC_NAME, 1, rabbit,
+                                            "expected non-circular data 
structure");
+                }
+            }
+
+          /* We have to recurse into copy_tree again for the last cdr, in
+           * order to handle the situation that it holds a vector.  */
+          new_hare.obj = rabbit;
+          copy = copy_tree (&new_hare, tortoise, tortoise_delay);
+          SCM_SETCDR (tail, copy);
+
+          return result;
+        }
+    }
+}
+#undef FUNC_NAME
+
+
+void
+scm_init_trees ()
+{
+#include "libguile/trees.x"
+}
diff --git a/libguile/gdbint.h b/libguile/trees.h
similarity index 78%
copy from libguile/gdbint.h
copy to libguile/trees.h
index d7c6cf3..70d32ad 100644
--- a/libguile/gdbint.h
+++ b/libguile/trees.h
@@ -1,9 +1,10 @@
 /* classes: h_files */
 
-#ifndef SCM_GDBINT_H
-#define SCM_GDBINT_H
+#ifndef SCM_TREES_H
+#define SCM_TREES_H
 
-/* Copyright (C) 1996,2000, 2006, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2009
+ * Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -27,11 +28,15 @@
 
 
 
-SCM_API int scm_print_carefully_p;
+SCM_API SCM scm_copy_tree (SCM obj);
 
-SCM_INTERNAL void scm_init_gdbint (void);
+
+
+/* Guile internal functions */
+
+SCM_INTERNAL void scm_init_trees (void);
 
-#endif  /* SCM_GDBINT_H */
+#endif  /* SCM_TREES_H */
 
 /*
   Local Variables:
diff --git a/libguile/validate.h b/libguile/validate.h
index ec32aa6..be4ed48 100644
--- a/libguile/validate.h
+++ b/libguile/validate.h
@@ -294,7 +294,7 @@
 
 #define SCM_VALIDATE_VARIABLE(pos, var) SCM_MAKE_VALIDATE_MSG (pos, var, 
VARIABLEP, "variable")
 
-#define SCM_VALIDATE_MEMOIZED(pos, obj) SCM_MAKE_VALIDATE_MSG (pos, obj, 
MEMOIZEDP, "memoized code")
+#define SCM_VALIDATE_MEMOIZED(pos, obj) SCM_MAKE_VALIDATE_MSG (pos, obj, 
MEMOIZED_P, "memoized code")
 
 #define SCM_VALIDATE_CLOSURE(pos, obj) SCM_MAKE_VALIDATE_MSG (pos, obj, 
CLOSUREP, "closure")
 
diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c
index aaa8884..03993ec 100644
--- a/libguile/vm-engine.c
+++ b/libguile/vm-engine.c
@@ -199,8 +199,8 @@ VM_NAME (struct scm_vm *vp, SCM program, SCM *argv, int 
nargs)
 
   vm_error_wrong_type_apply:
     SYNC_ALL ();
-    scm_error (scm_misc_error_key, FUNC_NAME, "Wrong type to apply: ~S",
-               scm_list_1 (program), SCM_BOOL_F);
+    scm_error (scm_arg_type_key, FUNC_NAME, "Wrong type to apply: ~S",
+               scm_list_1 (program), scm_list_1 (program));
     goto vm_error;
 
   vm_error_stack_overflow:
diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c
index c7704f3..6d32a6c 100644
--- a/libguile/vm-i-system.c
+++ b/libguile/vm-i-system.c
@@ -298,7 +298,7 @@ VM_DEFINE_INSTRUCTION (24, long_local_bound, 
"long-local-bound?", 2, 0, 1)
   NEXT;
 }
 
-VM_DEFINE_INSTRUCTION (25, variable_ref, "variable-ref", 0, 0, 1)
+VM_DEFINE_INSTRUCTION (25, variable_ref, "variable-ref", 0, 1, 1)
 {
   SCM x = *sp;
 
@@ -393,7 +393,7 @@ VM_DEFINE_INSTRUCTION (30, long_local_set, 
"long-local-set", 2, 1, 0)
   NEXT;
 }
 
-VM_DEFINE_INSTRUCTION (31, variable_set, "variable-set", 0, 1, 0)
+VM_DEFINE_INSTRUCTION (31, variable_set, "variable-set", 0, 2, 0)
 {
   VARIABLE_SET (sp[0], sp[-1]);
   DROPN (2);
@@ -766,32 +766,38 @@ VM_DEFINE_INSTRUCTION (53, call, "call", 1, -1, 1)
       sp[-nargs] = SCM_STRUCT_PROCEDURE (x);
       goto vm_call;
     }
+  else if (SCM_PROCEDURE_WITH_SETTER_P (x))
+    {
+      sp[-nargs] = SCM_PROCEDURE (x);
+      goto vm_call;
+    }
   /*
    * Other interpreted or compiled call
    */
   if (!scm_is_false (scm_procedure_p (x)))
     {
-      SCM args;
+      SCM ret;
       /* At this point, the stack contains the frame, the procedure and each 
one
         of its arguments. */
-      POP_LIST (nargs);
-      POP (args);
-      DROP (); /* drop the procedure */
-      DROP_FRAME ();
-      
       SYNC_REGISTER ();
-      PUSH (scm_apply (x, args, SCM_EOL));
+      ret = apply_foreign (sp[-nargs],
+                           sp - nargs + 1,
+                           nargs,
+                           vp->stack_limit - sp + 1);
       NULLSTACK_FOR_NONLOCAL_EXIT ();
-      if (SCM_UNLIKELY (SCM_VALUESP (*sp)))
+      DROPN (nargs + 1); /* drop args and procedure */
+      DROP_FRAME ();
+      
+      if (SCM_UNLIKELY (SCM_VALUESP (ret)))
         {
           /* truncate values */
-          SCM values;
-          POP (values);
-          values = scm_struct_ref (values, SCM_INUM0);
-          if (scm_is_null (values))
+          ret = scm_struct_ref (ret, SCM_INUM0);
+          if (scm_is_null (ret))
             goto vm_error_not_enough_values;
-          PUSH (SCM_CAR (values));
+          PUSH (SCM_CAR (ret));
         }
+      else
+        PUSH (ret);
       NEXT;
     }
 
@@ -844,32 +850,39 @@ VM_DEFINE_INSTRUCTION (54, goto_args, "goto/args", 1, -1, 
1)
       sp[-nargs] = SCM_STRUCT_PROCEDURE (x);
       goto vm_goto_args;
     }
+  else if (SCM_PROCEDURE_WITH_SETTER_P (x))
+    {
+      sp[-nargs] = SCM_PROCEDURE (x);
+      goto vm_goto_args;
+    }
 
   /*
    * Other interpreted or compiled call
    */
   if (!scm_is_false (scm_procedure_p (x)))
     {
-      SCM args;
-      POP_LIST (nargs);
-      POP (args);
-
+      SCM ret;
       SYNC_REGISTER ();
-      *sp = scm_apply (x, args, SCM_EOL);
+      ret = apply_foreign (sp[-nargs],
+                           sp - nargs + 1,
+                           nargs,
+                           vp->stack_limit - sp + 1);
       NULLSTACK_FOR_NONLOCAL_EXIT ();
-
-      if (SCM_UNLIKELY (SCM_VALUESP (*sp)))
+      DROPN (nargs + 1); /* drop args and procedure */
+      
+      if (SCM_UNLIKELY (SCM_VALUESP (ret)))
         {
           /* multiple values returned to continuation */
-          SCM values;
-          POP (values);
-          values = scm_struct_ref (values, SCM_INUM0);
-          nvalues = scm_ilength (values);
-          PUSH_LIST (values, scm_is_null);
+          ret = scm_struct_ref (ret, SCM_INUM0);
+          nvalues = scm_ilength (ret);
+          PUSH_LIST (ret, scm_is_null);
           goto vm_return_values;
         }
       else
-        goto vm_return;
+        {
+          PUSH (ret);
+          goto vm_return;
+        }
     }
 
   program = x;
@@ -930,32 +943,39 @@ VM_DEFINE_INSTRUCTION (57, mv_call, "mv-call", 4, -1, 1)
       sp[-nargs] = SCM_STRUCT_PROCEDURE (x);
       goto vm_mv_call;
     }
+  else if (SCM_PROCEDURE_WITH_SETTER_P (x))
+    {
+      sp[-nargs] = SCM_PROCEDURE (x);
+      goto vm_mv_call;
+    }
   /*
    * Other interpreted or compiled call
    */
   if (!scm_is_false (scm_procedure_p (x)))
     {
-      SCM args;
-      /* At this point, the stack contains the procedure and each one of its
-        arguments.  */
-      POP_LIST (nargs);
-      POP (args);
-      DROP (); /* drop the procedure */
-      DROP_FRAME ();
-      
+      SCM ret;
+      /* At this point, the stack contains the frame, the procedure and each 
one
+        of its arguments. */
       SYNC_REGISTER ();
-      PUSH (scm_apply (x, args, SCM_EOL));
+      ret = apply_foreign (sp[-nargs],
+                           sp - nargs + 1,
+                           nargs,
+                           vp->stack_limit - sp + 1);
       NULLSTACK_FOR_NONLOCAL_EXIT ();
-      if (SCM_VALUESP (*sp))
+      DROPN (nargs + 1); /* drop args and procedure */
+      DROP_FRAME ();
+      
+      if (SCM_VALUESP (ret))
         {
-          SCM values, len;
-          POP (values);
-          values = scm_struct_ref (values, SCM_INUM0);
-          len = scm_length (values);
-          PUSH_LIST (values, scm_is_null);
+          SCM len;
+          ret = scm_struct_ref (ret, SCM_INUM0);
+          len = scm_length (ret);
+          PUSH_LIST (ret, scm_is_null);
           PUSH (len);
           ip = mvra;
         }
+      else
+        PUSH (ret);
       NEXT;
     }
 
diff --git a/libguile/vm.c b/libguile/vm.c
index 055bbee..247bb7d 100644
--- a/libguile/vm.c
+++ b/libguile/vm.c
@@ -262,6 +262,134 @@ resolve_variable (SCM what, SCM program_module)
     }
 }
   
+static SCM
+apply_foreign (SCM proc, SCM *args, int nargs, int headroom)
+{
+  SCM arg1, arg2, arg3;
+
+  SCM_ASRTGO (SCM_NIMP (proc), badproc);
+
+  /* Parse args. */
+  switch (nargs)
+    {
+    case 0:
+      arg1 = SCM_UNDEFINED; arg2 = SCM_UNDEFINED; arg3 = SCM_UNDEFINED;
+      break;
+    case 1:
+      arg1 = args[0]; arg2 = SCM_UNDEFINED; arg3 = SCM_UNDEFINED;
+      break;
+    case 2:
+      arg1 = args[0]; arg2 = args[1]; arg3 = SCM_UNDEFINED;
+      break;
+    default:
+      arg1 = args[0]; arg2 = args[1]; arg3 = args[2];
+      break;
+    }
+
+  switch (SCM_TYP7 (proc))
+    {
+    case scm_tcs_closures:
+      /* FIXME: pre-boot closures should be smobs */
+      {
+        SCM arglist = SCM_EOL;
+        while (nargs--)
+          arglist = scm_cons (args[nargs], arglist);
+        return scm_closure_apply (proc, arglist);
+      }
+    case scm_tc7_subr_2o:
+      if (nargs > 2 || nargs < 1) scm_wrong_num_args (proc);
+      return SCM_SUBRF (proc) (arg1, arg2);
+    case scm_tc7_subr_2:
+      if (nargs != 2) scm_wrong_num_args (proc);
+      return SCM_SUBRF (proc) (arg1, arg2);
+    case scm_tc7_subr_0:
+      if (nargs != 0) scm_wrong_num_args (proc);
+      return SCM_SUBRF (proc) ();
+    case scm_tc7_subr_1:
+      if (nargs != 1) scm_wrong_num_args (proc);
+      return SCM_SUBRF (proc) (arg1);
+    case scm_tc7_subr_1o:
+      if (nargs > 1) scm_wrong_num_args (proc);
+      return SCM_SUBRF (proc) (arg1);
+    case scm_tc7_dsubr:
+      if (nargs != 1) scm_wrong_num_args (proc);
+      if (SCM_I_INUMP (arg1))
+        return scm_from_double (SCM_DSUBRF (proc) ((double) SCM_I_INUM 
(arg1)));
+      else if (SCM_REALP (arg1))
+        return scm_from_double (SCM_DSUBRF (proc) (SCM_REAL_VALUE (arg1)));
+      else if (SCM_BIGP (arg1))
+        return scm_from_double (SCM_DSUBRF (proc) (scm_i_big2dbl (arg1)));
+      else if (SCM_FRACTIONP (arg1))
+        return scm_from_double (SCM_DSUBRF (proc) (scm_i_fraction2double 
(arg1)));
+      SCM_WTA_DISPATCH_1 (*SCM_SUBR_GENERIC (proc), arg1,
+                          SCM_ARG1, scm_i_symbol_chars (SCM_SUBR_NAME (proc)));
+    case scm_tc7_cxr:
+      if (nargs != 1) scm_wrong_num_args (proc);
+      return scm_i_chase_pairs (arg1, (scm_t_bits) SCM_SUBRF (proc));
+    case scm_tc7_subr_3:
+      if (nargs != 3) scm_wrong_num_args (proc);
+      return SCM_SUBRF (proc) (arg1, arg2, arg3);
+    case scm_tc7_lsubr:
+      {
+        SCM arglist = SCM_EOL;
+        while (nargs--)
+          arglist = scm_cons (args[nargs], arglist);
+        return SCM_SUBRF (proc) (arglist);
+      }
+    case scm_tc7_lsubr_2:
+      if (nargs < 2) scm_wrong_num_args (proc);
+      {
+        SCM arglist = SCM_EOL;
+        while (nargs-- > 2)
+          arglist = scm_cons (args[nargs], arglist);
+        return SCM_SUBRF (proc) (arg1, arg2, arglist);
+      }
+    case scm_tc7_asubr:
+      if (nargs < 2)
+        return SCM_SUBRF (proc) (arg1, SCM_UNDEFINED);
+      {
+        int idx = 1;
+        while (nargs-- > 1)
+          arg1 = SCM_SUBRF (proc) (arg1, args[idx++]);
+        return arg1;
+      }
+    case scm_tc7_rpsubr:
+      {
+        int idx = 0;
+        while (nargs-- > 1)
+          { idx++;
+            if (scm_is_false (SCM_SUBRF (proc) (args[idx-1], args[idx])))
+              return SCM_BOOL_F;
+          }
+        return SCM_BOOL_T;
+      }
+    case scm_tc7_smob:
+      if (!SCM_SMOB_APPLICABLE_P (proc))
+        goto badproc;
+      switch (nargs)
+        {
+        case 0:
+          return SCM_SMOB_APPLY_0 (proc);
+        case 1:
+          return SCM_SMOB_APPLY_1 (proc, arg1);
+        case 2:
+          return SCM_SMOB_APPLY_2 (proc, arg1, arg2);
+        default:
+          {
+            SCM arglist = SCM_EOL;
+            while (nargs-- > 2)
+              arglist = scm_cons (args[nargs], arglist);
+            return SCM_SMOB_APPLY_3 (proc, arg1, arg2, arglist);
+          }
+        }
+    case scm_tc7_gsubr:
+      return scm_i_gsubr_apply_array (proc, args, nargs, headroom);
+    default:
+    badproc:
+      scm_wrong_type_arg ("apply", SCM_ARG1, proc);
+    }
+}
+
 
 #define VM_DEFAULT_STACK_SIZE  (64 * 1024)
 
@@ -386,7 +514,7 @@ scm_vm_apply (SCM vm, SCM program, SCM args)
   int i, nargs;
   
   SCM_VALIDATE_VM (1, vm);
-  SCM_VALIDATE_PROGRAM (2, program);
+  SCM_VALIDATE_PROC (2, program);
 
   nargs = scm_ilength (args);
   if (SCM_UNLIKELY (nargs < 0))
diff --git a/module/Makefile.am b/module/Makefile.am
index e3a0aed..9e55ef6 100644
--- a/module/Makefile.am
+++ b/module/Makefile.am
@@ -24,34 +24,44 @@ include $(top_srcdir)/am/guilec
 # We're at the root of the module hierarchy.
 modpath =
 
-# Compile psyntax and boot-9 first, so that we get the speed benefit in
-# the rest of the compilation. Also, if there is too much switching back
-# and forth between interpreted and compiled code, we end up using more
-# of the C stack than the interpreter would have; so avoid that by
-# putting these core modules first.
+BEGINNING_OF_TIME=198001010100
 
-SOURCES =                                                              \
-  ice-9/psyntax-pp.scm                                                         
\
-  system/base/pmatch.scm system/base/syntax.scm                                
\
-  system/base/compile.scm system/base/language.scm                     \
-  system/base/message.scm                                              \
-                                                                       \
-  language/tree-il.scm                                                 \
-  language/glil.scm language/assembly.scm                              \
-                                                                       \
-  $(SCHEME_LANG_SOURCES)                                               \
-  $(TREE_IL_LANG_SOURCES)                                              \
-  $(GLIL_LANG_SOURCES)                                                 \
-  $(ASSEMBLY_LANG_SOURCES) $(BYTECODE_LANG_SOURCES)                    \
-  $(OBJCODE_LANG_SOURCES) $(VALUE_LANG_SOURCES)                                
\
-                                                                       \
-  $(ICE_9_SOURCES)                                                     \
-  $(SRFI_SOURCES)                                                      \
-  $(RNRS_SOURCES)                                                      \
-  $(OOP_SOURCES)                                                       \
-  $(SYSTEM_SOURCES)                                                     \
-  $(SCRIPTS_SOURCES)                                                    \
-  $(ECMASCRIPT_LANG_SOURCES)                                           \
+$(GOBJECTS): ice-9/eval.go.stamp
+ice-9/eval.go.stamp: ice-9/eval.go
+       touch -t $(BEGINNING_OF_TIME) $(srcdir)/ice-9/eval.scm 
+       touch -r $(srcdir)/ice-9/eval.scm ice-9/eval.go
+       touch -r $(srcdir)/ice-9/eval.scm ice-9/eval.go.stamp
+CLEANFILES += ice-9/eval.go ice-9/eval.go.stamp
+nobase_mod_DATA += ice-9/eval.scm
+nobase_ccache_DATA += ice-9/eval.go
+EXTRA_DIST += ice-9/eval.scm
+
+# We can compile these in any order, but it's fastest if we compile
+# psyntax and boot-9 first, then the compiler itself, then the rest of
+# the code.
+SOURCES =                                      \
+  ice-9/psyntax-pp.scm                         \
+  ice-9/boot-9.scm                             \
+                                               \
+  language/tree-il.scm                         \
+  language/glil.scm                            \
+  language/assembly.scm                                \
+  $(TREE_IL_LANG_SOURCES)                      \
+  $(GLIL_LANG_SOURCES)                         \
+  $(ASSEMBLY_LANG_SOURCES)                     \
+  $(BYTECODE_LANG_SOURCES)                     \
+  $(OBJCODE_LANG_SOURCES)                      \
+  $(VALUE_LANG_SOURCES)                                \
+  $(SCHEME_LANG_SOURCES)                       \
+  $(SYSTEM_BASE_SOURCES)                       \
+                                               \
+  $(ICE_9_SOURCES)                             \
+  $(SRFI_SOURCES)                              \
+  $(RNRS_SOURCES)                              \
+  $(OOP_SOURCES)                               \
+  $(SYSTEM_SOURCES)                            \
+  $(SCRIPTS_SOURCES)                           \
+  $(ECMASCRIPT_LANG_SOURCES)                   \
   $(BRAINFUCK_LANG_SOURCES)
 
 ## test.scm is not currently installed.
@@ -142,8 +152,14 @@ SCRIPTS_SOURCES =                          \
   scripts/read-rfc822.scm                      \
   scripts/snarf-guile-m4-docs.scm
 
+SYSTEM_BASE_SOURCES =                          \
+  system/base/pmatch.scm                       \
+  system/base/syntax.scm                       \
+  system/base/compile.scm                      \
+  system/base/language.scm                     \
+  system/base/message.scm
+
 ICE_9_SOURCES = \
-  ice-9/boot-9.scm \
   ice-9/r4rs.scm \
   ice-9/r5rs.scm \
   ice-9/and-let-star.scm \
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index ed7a4c8..f4274f7 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -68,6 +68,7 @@
 
 (define pk peek)
 
+
 (define (warn . stuff)
   (with-output-to-port (current-error-port)
     (lambda ()
@@ -1396,7 +1397,7 @@
 ;; NOTE: This binding is used in libguile/modules.c.
 (define module-eval-closure (record-accessor module-type 'eval-closure))
 
-(define module-transformer (record-accessor module-type 'transformer))
+;; (define module-transformer (record-accessor module-type 'transformer))
 (define set-module-transformer! (record-modifier module-type 'transformer))
 ;; (define module-name (record-accessor module-type 'name)) wait until mods 
are booted
 (define set-module-name! (record-modifier module-type 'name))
diff --git a/module/ice-9/debugger/commands.scm 
b/module/ice-9/debugger/commands.scm
index 00cab87..dbb06c1 100644
--- a/module/ice-9/debugger/commands.scm
+++ b/module/ice-9/debugger/commands.scm
@@ -1,6 +1,6 @@
 ;;;; (ice-9 debugger commands) -- debugger commands
 
-;;; Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+;;; Copyright (C) 2002, 2006, 2009 Free Software Foundation, Inc.
 ;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -71,6 +71,7 @@ If the number of frames isn't explicitly given, the debug 
option
                 (apply display-error stack (current-error-port) args)))))
   (throw 'continue))
 
+;; FIXME: no longer working due to no more local-eval
 (define (evaluate state expression)
   "Evaluate an expression in the environment of the selected stack frame.
 The expression must appear on the same line as the command, however it
diff --git a/module/ice-9/debugging/traps.scm b/module/ice-9/debugging/traps.scm
index 292456d..132e2d4 100755
--- a/module/ice-9/debugging/traps.scm
+++ b/module/ice-9/debugging/traps.scm
@@ -1,6 +1,6 @@
 ;;;; (ice-9 debugging traps) -- abstraction of libguile's traps interface
 
-;;; Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+;;; Copyright (C) 2002, 2004, 2009 Free Software Foundation, Inc.
 ;;; Copyright (C) 2005 Neil Jerram
 ;;;
 ;;;; This library is free software; you can redistribute it and/or
@@ -887,6 +887,7 @@ it twice."
              (= (caddr trap-location) (slot-ref trap 'column))))))
 
 ;; (trap-here EXPRESSION . OPTIONS)
+;; FIXME: no longer working due to no mmacros, no local-eval
 (define trap-here
   (procedure->memoizing-macro
    (lambda (expr env)
diff --git a/module/ice-9/deprecated.scm b/module/ice-9/deprecated.scm
index c55e13b..a48edb7 100644
--- a/module/ice-9/deprecated.scm
+++ b/module/ice-9/deprecated.scm
@@ -202,3 +202,8 @@
              x)))
       (else
        (error "#y needs to be followed by a list" x))))))
+
+(define (unmemoize-expr . args)
+  (issue-deprecation-warning
+   "`unmemoize-expr' is deprecated. Use `unmemoize-expression' instead.")
+  (apply unmemoize-expression args))
diff --git a/module/ice-9/emacs.scm b/module/ice-9/emacs.scm
index 8803586..5bd5282 100644
--- a/module/ice-9/emacs.scm
+++ b/module/ice-9/emacs.scm
@@ -1,4 +1,4 @@
-;;;;   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2006 Free Software 
Foundation, Inc.
+;;;;   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2006, 2009 Free 
Software Foundation, Inc.
 ;;;; 
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -234,6 +234,7 @@
                       msg)
        msg)))
 
+;; FIXME: no longer working due to removal of local-eval
 (define (emacs-frame-eval frame form)
   (let ((source (get-frame-source frame)))
     (if source
diff --git a/module/ice-9/eval.scm b/module/ice-9/eval.scm
new file mode 100644
index 0000000..e2746dc
--- /dev/null
+++ b/module/ice-9/eval.scm
@@ -0,0 +1,226 @@
+;;; -*- mode: scheme; coding: utf-8; -*-
+
+;;;; Copyright (C) 2009
+;;;; Free Software Foundation, Inc.
+;;;;
+;;;; This library is free software; you can redistribute it and/or
+;;;; modify it under the terms of the GNU Lesser General Public
+;;;; License as published by the Free Software Foundation; either
+;;;; version 3 of the License, or (at your option) any later version.
+;;;; 
+;;;; This library is distributed in the hope that it will be useful,
+;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;;; Lesser General Public License for more details.
+;;;; 
+;;;; You should have received a copy of the GNU Lesser General Public
+;;;; License along with this library; if not, write to the Free Software
+;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA
+;;;;
+
+
+
+;;; Commentary:
+
+;;; Scheme eval, written in Scheme.
+;;;
+;;; Expressions are first expanded, by the syntax expander (i.e.
+;;; psyntax), then memoized into internal forms. The evaluator itself
+;;; only operates on the internal forms ("memoized expressions").
+;;;
+;;; Environments are represented as linked lists of the form (VAL ... .
+;;; MOD). If MOD is #f, it means the environment was captured before
+;;; modules were booted. If MOD is the literal value '(), we are
+;;; evaluating at the top level, and so should track changes to the
+;;; current module.
+;;;
+;;; Evaluate this in Emacs to make code indentation work right:
+;;;
+;;;    (put 'memoized-expression-case 'scheme-indent-function 1)
+;;;
+
+;;; Code:
+
+
+
+(eval-when (compile)
+  (define-syntax capture-env
+    (syntax-rules ()
+      ((_ env)
+       (if (null? env)
+           (current-module)
+           (if (not env)
+               ;; the and current-module checks that modules are booted,
+               ;; and thus the-root-module is defined
+               (and (current-module) the-root-module)
+               env)))))
+
+  ;; This macro could be more straightforward if the compiler had better
+  ;; copy propagation. As it is we do some copy propagation by hand.
+  (define-syntax mx-bind
+    (lambda (x)
+      (syntax-case x ()
+        ((_ data () body)
+         #'body)
+        ((_ data (a . b) body) (and (identifier? #'a) (identifier? #'b))
+         #'(let ((a (car data))
+                 (b (cdr data)))
+             body))
+        ((_ data (a . b) body) (identifier? #'a)
+         #'(let ((a (car data))
+                 (xb (cdr data)))
+             (mx-bind xb b body)))
+        ((_ data (a . b) body) 
+         #'(let ((xa (car data))
+                 (xb (cdr data)))
+             (mx-bind xa a (mx-bind xb b body))))
+        ((_ data v body) (identifier? #'v)
+         #'(let ((v data))
+             body)))))
+  
+  ;; The resulting nested if statements will be an O(n) dispatch. Once
+  ;; we compile `case' effectively, this situation will improve.
+  (define-syntax mx-match
+    (lambda (x)
+      (syntax-case x (quote)
+        ((_ mx data tag)
+         #'(error "what" mx))
+        ((_ mx data tag (('type pat) body) c* ...)
+         #`(if (eqv? tag #,(or (memoized-typecode (syntax->datum #'type))
+                               (error "not a typecode" #'type)))
+               (mx-bind data pat body)
+               (mx-match mx data tag c* ...))))))
+
+  (define-syntax memoized-expression-case
+    (lambda (x)
+      (syntax-case x ()
+        ((_ mx c ...)
+         #'(let ((tag (memoized-expression-typecode mx))
+                 (data (memoized-expression-data mx)))
+             (mx-match mx data tag c ...)))))))
+
+
+(define primitive-eval
+  (let ()
+    ;; The "engine". EXP is a memoized expression.
+    (define (eval exp env)
+      (memoized-expression-case exp
+        (('begin (first . rest))
+         (let lp ((first first) (rest rest))
+           (if (null? rest)
+               (eval first env)
+               (begin
+                 (eval first env)
+                 (lp (car rest) (cdr rest))))))
+      
+        (('if (test consequent . alternate))
+         (if (eval test env)
+             (eval consequent env)
+             (eval alternate env)))
+      
+        (('let (inits . body))
+         (let lp ((inits inits) (new-env (capture-env env)))
+           (if (null? inits)
+               (eval body new-env)
+               (lp (cdr inits)
+                   (cons (eval (car inits) env) new-env)))))
+      
+        (('lambda (nreq rest? . body))
+         (let ((env (capture-env env)))
+           (lambda args
+             (let lp ((env env) (nreq nreq) (args args))
+               (if (zero? nreq)
+                   (eval body
+                         (if rest?
+                             (cons args env)
+                             (if (not (null? args))
+                                 (scm-error 'wrong-number-of-args
+                                            "eval" "Wrong number of arguments"
+                                            '() #f)
+                                 env)))
+                   (if (null? args)
+                       (scm-error 'wrong-number-of-args
+                                  "eval" "Wrong number of arguments"
+                                  '() #f)
+                       (lp (cons (car args) env)
+                           (1- nreq)
+                           (cdr args))))))))
+
+        (('quote x)
+         x)
+
+        (('define (name . x))
+         (define! name (eval x env)))
+      
+        (('apply (f args))
+         (apply (eval f env) (eval args env)))
+
+        (('call (f . args))
+         (let ((proc (eval f env)))
+           (let eval-args ((in args) (out '()))
+             (if (null? in)
+                 (apply proc (reverse out))
+                 (eval-args (cdr in)
+                            (cons (eval (car in) env) out))))))
+      
+        (('call/cc proc)
+         (call/cc (eval proc env)))
+
+        (('call-with-values (producer . consumer))
+         (call-with-values (eval producer env)
+           (eval consumer env)))
+
+        (('lexical-ref n)
+         (let lp ((n n) (env env))
+           (if (zero? n)
+               (car env)
+               (lp (1- n) (cdr env)))))
+      
+        (('lexical-set! (n . x))
+         (let ((val (eval x env)))
+           (let lp ((n n) (env env))
+             (if (zero? n)
+                 (set-car! env val)
+                 (lp (1- n) (cdr env))))))
+        
+        (('toplevel-ref var-or-sym)
+         (variable-ref
+          (if (variable? var-or-sym)
+              var-or-sym
+              (let lp ((env env))
+                (if (pair? env)
+                    (lp (cdr env))
+                    (memoize-variable-access! exp (capture-env env)))))))
+
+        (('toplevel-set! (var-or-sym . x))
+         (variable-set!
+          (if (variable? var-or-sym)
+              var-or-sym
+              (let lp ((env env))
+                (if (pair? env)
+                    (lp (cdr env))
+                    (memoize-variable-access! exp (capture-env env)))))
+          (eval x env)))
+      
+        (('module-ref var-or-spec)
+         (variable-ref
+          (if (variable? var-or-spec)
+              var-or-spec
+              (memoize-variable-access! exp #f))))
+
+        (('module-set! (x . var-or-spec))
+         (variable-set!
+          (if (variable? var-or-spec)
+              var-or-spec
+              (memoize-variable-access! exp #f))
+          (eval x env)))))
+  
+    ;; primitive-eval
+    (lambda (exp)
+      "Evaluate @var{exp} in the current module."
+      (eval 
+       (memoize-expression ((or (module-transformer (current-module))
+                                (lambda (x) x))
+                            exp))
+       '()))))
+
diff --git a/module/ice-9/gds-client.scm b/module/ice-9/gds-client.scm
index 03e2927..aa45b54 100755
--- a/module/ice-9/gds-client.scm
+++ b/module/ice-9/gds-client.scm
@@ -248,6 +248,8 @@
             erf))
         flags)))
 
+;; FIXME: the new evaluator breaks this, by removing local-eval. Need to
+;; figure out our story in this regard.
 (define (eval-in-frame stack index expr)
   (write-form
    (list 'eval-result
diff --git a/module/ice-9/psyntax-pp.scm b/module/ice-9/psyntax-pp.scm
index ec655ac..6b44d0c 100644
--- a/module/ice-9/psyntax-pp.scm
+++ b/module/ice-9/psyntax-pp.scm
@@ -1,596 +1,604 @@
 (eval-when (compile) (set-current-module (resolve-module (quote (guile)))))
 (if #f #f)
 
-(letrec ((#{and-map*\ 31}#
-           (lambda (#{f\ 69}# #{first\ 70}# . #{rest\ 71}#)
-             (let ((#{t\ 72}# (null? #{first\ 70}#)))
-               (if #{t\ 72}#
-                 #{t\ 72}#
-                 (if (null? #{rest\ 71}#)
-                   (letrec ((#{andmap\ 73}#
-                              (lambda (#{first\ 74}#)
-                                (let ((#{x\ 75}# (car #{first\ 74}#))
-                                      (#{first\ 76}# (cdr #{first\ 74}#)))
-                                  (if (null? #{first\ 76}#)
-                                    (#{f\ 69}# #{x\ 75}#)
-                                    (if (#{f\ 69}# #{x\ 75}#)
-                                      (#{andmap\ 73}# #{first\ 76}#)
+(letrec ((#{and-map*\ 3695}#
+           (lambda (#{f\ 3733}# #{first\ 3734}# . #{rest\ 3735}#)
+             (let ((#{t\ 3736}# (null? #{first\ 3734}#)))
+               (if #{t\ 3736}#
+                 #{t\ 3736}#
+                 (if (null? #{rest\ 3735}#)
+                   (letrec ((#{andmap\ 3737}#
+                              (lambda (#{first\ 3738}#)
+                                (let ((#{x\ 3739}# (car #{first\ 3738}#))
+                                      (#{first\ 3740}# (cdr #{first\ 3738}#)))
+                                  (if (null? #{first\ 3740}#)
+                                    (#{f\ 3733}# #{x\ 3739}#)
+                                    (if (#{f\ 3733}# #{x\ 3739}#)
+                                      (#{andmap\ 3737}# #{first\ 3740}#)
                                       #f))))))
-                     (#{andmap\ 73}# #{first\ 70}#))
-                   (letrec ((#{andmap\ 77}#
-                              (lambda (#{first\ 78}# #{rest\ 79}#)
-                                (let ((#{x\ 80}# (car #{first\ 78}#))
-                                      (#{xr\ 81}# (map car #{rest\ 79}#))
-                                      (#{first\ 82}# (cdr #{first\ 78}#))
-                                      (#{rest\ 83}# (map cdr #{rest\ 79}#)))
-                                  (if (null? #{first\ 82}#)
-                                    (apply #{f\ 69}#
-                                           (cons #{x\ 80}# #{xr\ 81}#))
-                                    (if (apply #{f\ 69}#
-                                               (cons #{x\ 80}# #{xr\ 81}#))
-                                      (#{andmap\ 77}#
-                                        #{first\ 82}#
-                                        #{rest\ 83}#)
+                     (#{andmap\ 3737}# #{first\ 3734}#))
+                   (letrec ((#{andmap\ 3741}#
+                              (lambda (#{first\ 3742}# #{rest\ 3743}#)
+                                (let ((#{x\ 3744}# (car #{first\ 3742}#))
+                                      (#{xr\ 3745}# (map car #{rest\ 3743}#))
+                                      (#{first\ 3746}# (cdr #{first\ 3742}#))
+                                      (#{rest\ 3747}#
+                                        (map cdr #{rest\ 3743}#)))
+                                  (if (null? #{first\ 3746}#)
+                                    (apply #{f\ 3733}#
+                                           (cons #{x\ 3744}# #{xr\ 3745}#))
+                                    (if (apply #{f\ 3733}#
+                                               (cons #{x\ 3744}# #{xr\ 3745}#))
+                                      (#{andmap\ 3741}#
+                                        #{first\ 3746}#
+                                        #{rest\ 3747}#)
                                       #f))))))
-                     (#{andmap\ 77}# #{first\ 70}# #{rest\ 71}#))))))))
-  (letrec ((#{lambda-var-list\ 182}#
-             (lambda (#{vars\ 306}#)
-               (letrec ((#{lvl\ 307}#
-                          (lambda (#{vars\ 308}# #{ls\ 309}# #{w\ 310}#)
-                            (if (pair? #{vars\ 308}#)
-                              (#{lvl\ 307}#
-                                (cdr #{vars\ 308}#)
-                                (cons (#{wrap\ 159}#
-                                        (car #{vars\ 308}#)
-                                        #{w\ 310}#
+                     (#{andmap\ 3741}# #{first\ 3734}# #{rest\ 3735}#))))))))
+  (letrec ((#{lambda-var-list\ 3846}#
+             (lambda (#{vars\ 3970}#)
+               (letrec ((#{lvl\ 3971}#
+                          (lambda (#{vars\ 3972}# #{ls\ 3973}# #{w\ 3974}#)
+                            (if (pair? #{vars\ 3972}#)
+                              (#{lvl\ 3971}#
+                                (cdr #{vars\ 3972}#)
+                                (cons (#{wrap\ 3823}#
+                                        (car #{vars\ 3972}#)
+                                        #{w\ 3974}#
                                         #f)
-                                      #{ls\ 309}#)
-                                #{w\ 310}#)
-                              (if (#{id?\ 131}# #{vars\ 308}#)
-                                (cons (#{wrap\ 159}#
-                                        #{vars\ 308}#
-                                        #{w\ 310}#
+                                      #{ls\ 3973}#)
+                                #{w\ 3974}#)
+                              (if (#{id?\ 3795}# #{vars\ 3972}#)
+                                (cons (#{wrap\ 3823}#
+                                        #{vars\ 3972}#
+                                        #{w\ 3974}#
                                         #f)
-                                      #{ls\ 309}#)
-                                (if (null? #{vars\ 308}#)
-                                  #{ls\ 309}#
-                                  (if (#{syntax-object?\ 115}# #{vars\ 308}#)
-                                    (#{lvl\ 307}#
-                                      (#{syntax-object-expression\ 116}#
-                                        #{vars\ 308}#)
-                                      #{ls\ 309}#
-                                      (#{join-wraps\ 150}#
-                                        #{w\ 310}#
-                                        (#{syntax-object-wrap\ 117}#
-                                          #{vars\ 308}#)))
-                                    (cons #{vars\ 308}# #{ls\ 309}#))))))))
-                 (#{lvl\ 307}#
-                   #{vars\ 306}#
+                                      #{ls\ 3973}#)
+                                (if (null? #{vars\ 3972}#)
+                                  #{ls\ 3973}#
+                                  (if (#{syntax-object?\ 3779}# #{vars\ 3972}#)
+                                    (#{lvl\ 3971}#
+                                      (#{syntax-object-expression\ 3780}#
+                                        #{vars\ 3972}#)
+                                      #{ls\ 3973}#
+                                      (#{join-wraps\ 3814}#
+                                        #{w\ 3974}#
+                                        (#{syntax-object-wrap\ 3781}#
+                                          #{vars\ 3972}#)))
+                                    (cons #{vars\ 3972}# #{ls\ 3973}#))))))))
+                 (#{lvl\ 3971}#
+                   #{vars\ 3970}#
                    '()
                    '(())))))
-           (#{gen-var\ 181}#
-             (lambda (#{id\ 311}#)
-               (let ((#{id\ 312}#
-                       (if (#{syntax-object?\ 115}# #{id\ 311}#)
-                         (#{syntax-object-expression\ 116}# #{id\ 311}#)
-                         #{id\ 311}#)))
+           (#{gen-var\ 3845}#
+             (lambda (#{id\ 3975}#)
+               (let ((#{id\ 3976}#
+                       (if (#{syntax-object?\ 3779}# #{id\ 3975}#)
+                         (#{syntax-object-expression\ 3780}# #{id\ 3975}#)
+                         #{id\ 3975}#)))
                  (gensym
-                   (string-append (symbol->string #{id\ 312}#) " ")))))
-           (#{strip\ 180}#
-             (lambda (#{x\ 313}# #{w\ 314}#)
+                   (string-append (symbol->string #{id\ 3976}#) " ")))))
+           (#{strip\ 3844}#
+             (lambda (#{x\ 3977}# #{w\ 3978}#)
                (if (memq 'top
-                         (#{wrap-marks\ 134}# #{w\ 314}#))
-                 #{x\ 313}#
-                 (letrec ((#{f\ 315}# (lambda (#{x\ 316}#)
-                                        (if (#{syntax-object?\ 115}#
-                                              #{x\ 316}#)
-                                          (#{strip\ 180}#
-                                            (#{syntax-object-expression\ 116}#
-                                              #{x\ 316}#)
-                                            (#{syntax-object-wrap\ 117}#
-                                              #{x\ 316}#))
-                                          (if (pair? #{x\ 316}#)
-                                            (let ((#{a\ 317}# (#{f\ 315}# (car 
#{x\ 316}#)))
-                                                  (#{d\ 318}# (#{f\ 315}# (cdr 
#{x\ 316}#))))
-                                              (if (if (eq? #{a\ 317}#
-                                                           (car #{x\ 316}#))
-                                                    (eq? #{d\ 318}#
-                                                         (cdr #{x\ 316}#))
-                                                    #f)
-                                                #{x\ 316}#
-                                                (cons #{a\ 317}# #{d\ 318}#)))
-                                            (if (vector? #{x\ 316}#)
-                                              (let ((#{old\ 319}#
-                                                      (vector->list
-                                                        #{x\ 316}#)))
-                                                (let ((#{new\ 320}#
-                                                        (map #{f\ 315}#
-                                                             #{old\ 319}#)))
-                                                  (if (#{and-map*\ 31}#
-                                                        eq?
-                                                        #{old\ 319}#
-                                                        #{new\ 320}#)
-                                                    #{x\ 316}#
-                                                    (list->vector
-                                                      #{new\ 320}#))))
-                                              #{x\ 316}#))))))
-                   (#{f\ 315}# #{x\ 313}#)))))
-           (#{chi-lambda-case\ 179}#
-             (lambda (#{e\ 321}#
-                      #{r\ 322}#
-                      #{w\ 323}#
-                      #{s\ 324}#
-                      #{mod\ 325}#
-                      #{get-formals\ 326}#
-                      #{clauses\ 327}#)
-               (letrec ((#{expand-body\ 331}#
-                          (lambda (#{req\ 332}#
-                                   #{opt\ 333}#
-                                   #{rest\ 334}#
-                                   #{kw\ 335}#
-                                   #{body\ 336}#
-                                   #{vars\ 337}#
-                                   #{r*\ 338}#
-                                   #{w*\ 339}#
-                                   #{inits\ 340}#)
-                            ((lambda (#{tmp\ 341}#)
-                               ((lambda (#{tmp\ 342}#)
-                                  (if (if #{tmp\ 342}#
-                                        (apply (lambda (#{docstring\ 343}#
-                                                        #{e1\ 344}#
-                                                        #{e2\ 345}#)
+                         (#{wrap-marks\ 3798}# #{w\ 3978}#))
+                 #{x\ 3977}#
+                 (letrec ((#{f\ 3979}#
+                            (lambda (#{x\ 3980}#)
+                              (if (#{syntax-object?\ 3779}# #{x\ 3980}#)
+                                (#{strip\ 3844}#
+                                  (#{syntax-object-expression\ 3780}#
+                                    #{x\ 3980}#)
+                                  (#{syntax-object-wrap\ 3781}# #{x\ 3980}#))
+                                (if (pair? #{x\ 3980}#)
+                                  (let ((#{a\ 3981}#
+                                          (#{f\ 3979}# (car #{x\ 3980}#)))
+                                        (#{d\ 3982}#
+                                          (#{f\ 3979}# (cdr #{x\ 3980}#))))
+                                    (if (if (eq? #{a\ 3981}# (car #{x\ 3980}#))
+                                          (eq? #{d\ 3982}# (cdr #{x\ 3980}#))
+                                          #f)
+                                      #{x\ 3980}#
+                                      (cons #{a\ 3981}# #{d\ 3982}#)))
+                                  (if (vector? #{x\ 3980}#)
+                                    (let ((#{old\ 3983}#
+                                            (vector->list #{x\ 3980}#)))
+                                      (let ((#{new\ 3984}#
+                                              (map #{f\ 3979}# #{old\ 3983}#)))
+                                        (if (#{and-map*\ 3695}#
+                                              eq?
+                                              #{old\ 3983}#
+                                              #{new\ 3984}#)
+                                          #{x\ 3980}#
+                                          (list->vector #{new\ 3984}#))))
+                                    #{x\ 3980}#))))))
+                   (#{f\ 3979}# #{x\ 3977}#)))))
+           (#{chi-lambda-case\ 3843}#
+             (lambda (#{e\ 3985}#
+                      #{r\ 3986}#
+                      #{w\ 3987}#
+                      #{s\ 3988}#
+                      #{mod\ 3989}#
+                      #{get-formals\ 3990}#
+                      #{clauses\ 3991}#)
+               (letrec ((#{expand-body\ 3995}#
+                          (lambda (#{req\ 3996}#
+                                   #{opt\ 3997}#
+                                   #{rest\ 3998}#
+                                   #{kw\ 3999}#
+                                   #{body\ 4000}#
+                                   #{vars\ 4001}#
+                                   #{r*\ 4002}#
+                                   #{w*\ 4003}#
+                                   #{inits\ 4004}#)
+                            ((lambda (#{tmp\ 4005}#)
+                               ((lambda (#{tmp\ 4006}#)
+                                  (if (if #{tmp\ 4006}#
+                                        (apply (lambda (#{docstring\ 4007}#
+                                                        #{e1\ 4008}#
+                                                        #{e2\ 4009}#)
                                                  (string?
                                                    (syntax->datum
-                                                     #{docstring\ 343}#)))
-                                               #{tmp\ 342}#)
+                                                     #{docstring\ 4007}#)))
+                                               #{tmp\ 4006}#)
                                         #f)
-                                    (apply (lambda (#{docstring\ 346}#
-                                                    #{e1\ 347}#
-                                                    #{e2\ 348}#)
+                                    (apply (lambda (#{docstring\ 4010}#
+                                                    #{e1\ 4011}#
+                                                    #{e2\ 4012}#)
                                              (values
                                                (syntax->datum
-                                                 #{docstring\ 346}#)
-                                               #{req\ 332}#
-                                               #{opt\ 333}#
-                                               #{rest\ 334}#
-                                               #{kw\ 335}#
-                                               #{inits\ 340}#
-                                               #{vars\ 337}#
-                                               (#{chi-body\ 171}#
-                                                 (cons #{e1\ 347}# #{e2\ 348}#)
-                                                 (#{source-wrap\ 160}#
-                                                   #{e\ 321}#
-                                                   #{w\ 323}#
-                                                   #{s\ 324}#
-                                                   #{mod\ 325}#)
-                                                 #{r*\ 338}#
-                                                 #{w*\ 339}#
-                                                 #{mod\ 325}#)))
-                                           #{tmp\ 342}#)
-                                    ((lambda (#{tmp\ 350}#)
-                                       (if #{tmp\ 350}#
-                                         (apply (lambda (#{e1\ 351}#
-                                                         #{e2\ 352}#)
+                                                 #{docstring\ 4010}#)
+                                               #{req\ 3996}#
+                                               #{opt\ 3997}#
+                                               #{rest\ 3998}#
+                                               #{kw\ 3999}#
+                                               #{inits\ 4004}#
+                                               #{vars\ 4001}#
+                                               (#{chi-body\ 3835}#
+                                                 (cons #{e1\ 4011}#
+                                                       #{e2\ 4012}#)
+                                                 (#{source-wrap\ 3824}#
+                                                   #{e\ 3985}#
+                                                   #{w\ 3987}#
+                                                   #{s\ 3988}#
+                                                   #{mod\ 3989}#)
+                                                 #{r*\ 4002}#
+                                                 #{w*\ 4003}#
+                                                 #{mod\ 3989}#)))
+                                           #{tmp\ 4006}#)
+                                    ((lambda (#{tmp\ 4014}#)
+                                       (if #{tmp\ 4014}#
+                                         (apply (lambda (#{e1\ 4015}#
+                                                         #{e2\ 4016}#)
                                                   (values
                                                     #f
-                                                    #{req\ 332}#
-                                                    #{opt\ 333}#
-                                                    #{rest\ 334}#
-                                                    #{kw\ 335}#
-                                                    #{inits\ 340}#
-                                                    #{vars\ 337}#
-                                                    (#{chi-body\ 171}#
-                                                      (cons #{e1\ 351}#
-                                                            #{e2\ 352}#)
-                                                      (#{source-wrap\ 160}#
-                                                        #{e\ 321}#
-                                                        #{w\ 323}#
-                                                        #{s\ 324}#
-                                                        #{mod\ 325}#)
-                                                      #{r*\ 338}#
-                                                      #{w*\ 339}#
-                                                      #{mod\ 325}#)))
-                                                #{tmp\ 350}#)
+                                                    #{req\ 3996}#
+                                                    #{opt\ 3997}#
+                                                    #{rest\ 3998}#
+                                                    #{kw\ 3999}#
+                                                    #{inits\ 4004}#
+                                                    #{vars\ 4001}#
+                                                    (#{chi-body\ 3835}#
+                                                      (cons #{e1\ 4015}#
+                                                            #{e2\ 4016}#)
+                                                      (#{source-wrap\ 3824}#
+                                                        #{e\ 3985}#
+                                                        #{w\ 3987}#
+                                                        #{s\ 3988}#
+                                                        #{mod\ 3989}#)
+                                                      #{r*\ 4002}#
+                                                      #{w*\ 4003}#
+                                                      #{mod\ 3989}#)))
+                                                #{tmp\ 4014}#)
                                          (syntax-violation
                                            #f
                                            "source expression failed to match 
any pattern"
-                                           #{tmp\ 341}#)))
+                                           #{tmp\ 4005}#)))
                                      ($sc-dispatch
-                                       #{tmp\ 341}#
+                                       #{tmp\ 4005}#
                                        '(any . each-any)))))
                                 ($sc-dispatch
-                                  #{tmp\ 341}#
+                                  #{tmp\ 4005}#
                                   '(any any . each-any))))
-                             #{body\ 336}#)))
-                        (#{expand-kw\ 330}#
-                          (lambda (#{req\ 354}#
-                                   #{opt\ 355}#
-                                   #{rest\ 356}#
-                                   #{kw\ 357}#
-                                   #{body\ 358}#
-                                   #{vars\ 359}#
-                                   #{r*\ 360}#
-                                   #{w*\ 361}#
-                                   #{aok\ 362}#
-                                   #{out\ 363}#
-                                   #{inits\ 364}#)
-                            (if (pair? #{kw\ 357}#)
-                              ((lambda (#{tmp\ 365}#)
-                                 ((lambda (#{tmp\ 366}#)
-                                    (if #{tmp\ 366}#
-                                      (apply (lambda (#{k\ 367}#
-                                                      #{id\ 368}#
-                                                      #{i\ 369}#)
-                                               (let ((#{v\ 370}# (#{gen-var\ 
181}#
-                                                                   #{id\ 
368}#)))
-                                                 (let ((#{l\ 371}# 
(#{gen-labels\ 137}#
-                                                                     (list 
#{v\ 370}#))))
-                                                   (let ((#{r**\ 372}#
-                                                           (#{extend-var-env\ 
126}#
-                                                             #{l\ 371}#
-                                                             (list #{v\ 370}#)
-                                                             #{r*\ 360}#)))
-                                                     (let ((#{w**\ 373}#
-                                                             
(#{make-binding-wrap\ 148}#
-                                                               (list #{id\ 
368}#)
-                                                               #{l\ 371}#
-                                                               #{w*\ 361}#)))
-                                                       (#{expand-kw\ 330}#
-                                                         #{req\ 354}#
-                                                         #{opt\ 355}#
-                                                         #{rest\ 356}#
-                                                         (cdr #{kw\ 357}#)
-                                                         #{body\ 358}#
-                                                         (cons #{v\ 370}#
-                                                               #{vars\ 359}#)
-                                                         #{r**\ 372}#
-                                                         #{w**\ 373}#
-                                                         #{aok\ 362}#
+                             #{body\ 4000}#)))
+                        (#{expand-kw\ 3994}#
+                          (lambda (#{req\ 4018}#
+                                   #{opt\ 4019}#
+                                   #{rest\ 4020}#
+                                   #{kw\ 4021}#
+                                   #{body\ 4022}#
+                                   #{vars\ 4023}#
+                                   #{r*\ 4024}#
+                                   #{w*\ 4025}#
+                                   #{aok\ 4026}#
+                                   #{out\ 4027}#
+                                   #{inits\ 4028}#)
+                            (if (pair? #{kw\ 4021}#)
+                              ((lambda (#{tmp\ 4029}#)
+                                 ((lambda (#{tmp\ 4030}#)
+                                    (if #{tmp\ 4030}#
+                                      (apply (lambda (#{k\ 4031}#
+                                                      #{id\ 4032}#
+                                                      #{i\ 4033}#)
+                                               (let ((#{v\ 4034}#
+                                                       (#{gen-var\ 3845}#
+                                                         #{id\ 4032}#)))
+                                                 (let ((#{l\ 4035}#
+                                                         (#{gen-labels\ 3801}#
+                                                           (list #{v\ 
4034}#))))
+                                                   (let ((#{r**\ 4036}#
+                                                           (#{extend-var-env\ 
3790}#
+                                                             #{l\ 4035}#
+                                                             (list #{v\ 4034}#)
+                                                             #{r*\ 4024}#)))
+                                                     (let ((#{w**\ 4037}#
+                                                             
(#{make-binding-wrap\ 3812}#
+                                                               (list #{id\ 
4032}#)
+                                                               #{l\ 4035}#
+                                                               #{w*\ 4025}#)))
+                                                       (#{expand-kw\ 3994}#
+                                                         #{req\ 4018}#
+                                                         #{opt\ 4019}#
+                                                         #{rest\ 4020}#
+                                                         (cdr #{kw\ 4021}#)
+                                                         #{body\ 4022}#
+                                                         (cons #{v\ 4034}#
+                                                               #{vars\ 4023}#)
+                                                         #{r**\ 4036}#
+                                                         #{w**\ 4037}#
+                                                         #{aok\ 4026}#
                                                          (cons (list 
(syntax->datum
-                                                                       #{k\ 
367}#)
+                                                                       #{k\ 
4031}#)
                                                                      
(syntax->datum
-                                                                       #{id\ 
368}#)
-                                                                     #{v\ 
370}#)
-                                                               #{out\ 363}#)
-                                                         (cons (#{chi\ 167}#
-                                                                 #{i\ 369}#
-                                                                 #{r*\ 360}#
-                                                                 #{w*\ 361}#
-                                                                 #{mod\ 325}#)
-                                                               #{inits\ 
364}#)))))))
-                                             #{tmp\ 366}#)
+                                                                       #{id\ 
4032}#)
+                                                                     #{v\ 
4034}#)
+                                                               #{out\ 4027}#)
+                                                         (cons (#{chi\ 3831}#
+                                                                 #{i\ 4033}#
+                                                                 #{r*\ 4024}#
+                                                                 #{w*\ 4025}#
+                                                                 #{mod\ 3989}#)
+                                                               #{inits\ 
4028}#)))))))
+                                             #{tmp\ 4030}#)
                                       (syntax-violation
                                         #f
                                         "source expression failed to match any 
pattern"
-                                        #{tmp\ 365}#)))
+                                        #{tmp\ 4029}#)))
                                   ($sc-dispatch
-                                    #{tmp\ 365}#
+                                    #{tmp\ 4029}#
                                     '(any any any))))
-                               (car #{kw\ 357}#))
-                              (#{expand-body\ 331}#
-                                #{req\ 354}#
-                                #{opt\ 355}#
-                                #{rest\ 356}#
-                                (if (let ((#{t\ 374}# #{aok\ 362}#))
-                                      (if #{t\ 374}#
-                                        #{t\ 374}#
-                                        (pair? #{out\ 363}#)))
-                                  (cons #{aok\ 362}# (reverse #{out\ 363}#))
+                               (car #{kw\ 4021}#))
+                              (#{expand-body\ 3995}#
+                                #{req\ 4018}#
+                                #{opt\ 4019}#
+                                #{rest\ 4020}#
+                                (if (let ((#{t\ 4038}# #{aok\ 4026}#))
+                                      (if #{t\ 4038}#
+                                        #{t\ 4038}#
+                                        (pair? #{out\ 4027}#)))
+                                  (cons #{aok\ 4026}# (reverse #{out\ 4027}#))
                                   #f)
-                                #{body\ 358}#
-                                (reverse #{vars\ 359}#)
-                                #{r*\ 360}#
-                                #{w*\ 361}#
-                                (reverse #{inits\ 364}#)))))
-                        (#{expand-opt\ 329}#
-                          (lambda (#{req\ 375}#
-                                   #{opt\ 376}#
-                                   #{rest\ 377}#
-                                   #{kw\ 378}#
-                                   #{body\ 379}#
-                                   #{vars\ 380}#
-                                   #{r*\ 381}#
-                                   #{w*\ 382}#
-                                   #{out\ 383}#
-                                   #{inits\ 384}#)
-                            (if (pair? #{opt\ 376}#)
-                              ((lambda (#{tmp\ 385}#)
-                                 ((lambda (#{tmp\ 386}#)
-                                    (if #{tmp\ 386}#
-                                      (apply (lambda (#{id\ 387}# #{i\ 388}#)
-                                               (let ((#{v\ 389}# (#{gen-var\ 
181}#
-                                                                   #{id\ 
387}#)))
-                                                 (let ((#{l\ 390}# 
(#{gen-labels\ 137}#
-                                                                     (list 
#{v\ 389}#))))
-                                                   (let ((#{r**\ 391}#
-                                                           (#{extend-var-env\ 
126}#
-                                                             #{l\ 390}#
-                                                             (list #{v\ 389}#)
-                                                             #{r*\ 381}#)))
-                                                     (let ((#{w**\ 392}#
-                                                             
(#{make-binding-wrap\ 148}#
-                                                               (list #{id\ 
387}#)
-                                                               #{l\ 390}#
-                                                               #{w*\ 382}#)))
-                                                       (#{expand-opt\ 329}#
-                                                         #{req\ 375}#
-                                                         (cdr #{opt\ 376}#)
-                                                         #{rest\ 377}#
-                                                         #{kw\ 378}#
-                                                         #{body\ 379}#
-                                                         (cons #{v\ 389}#
-                                                               #{vars\ 380}#)
-                                                         #{r**\ 391}#
-                                                         #{w**\ 392}#
+                                #{body\ 4022}#
+                                (reverse #{vars\ 4023}#)
+                                #{r*\ 4024}#
+                                #{w*\ 4025}#
+                                (reverse #{inits\ 4028}#)))))
+                        (#{expand-opt\ 3993}#
+                          (lambda (#{req\ 4039}#
+                                   #{opt\ 4040}#
+                                   #{rest\ 4041}#
+                                   #{kw\ 4042}#
+                                   #{body\ 4043}#
+                                   #{vars\ 4044}#
+                                   #{r*\ 4045}#
+                                   #{w*\ 4046}#
+                                   #{out\ 4047}#
+                                   #{inits\ 4048}#)
+                            (if (pair? #{opt\ 4040}#)
+                              ((lambda (#{tmp\ 4049}#)
+                                 ((lambda (#{tmp\ 4050}#)
+                                    (if #{tmp\ 4050}#
+                                      (apply (lambda (#{id\ 4051}# #{i\ 4052}#)
+                                               (let ((#{v\ 4053}#
+                                                       (#{gen-var\ 3845}#
+                                                         #{id\ 4051}#)))
+                                                 (let ((#{l\ 4054}#
+                                                         (#{gen-labels\ 3801}#
+                                                           (list #{v\ 
4053}#))))
+                                                   (let ((#{r**\ 4055}#
+                                                           (#{extend-var-env\ 
3790}#
+                                                             #{l\ 4054}#
+                                                             (list #{v\ 4053}#)
+                                                             #{r*\ 4045}#)))
+                                                     (let ((#{w**\ 4056}#
+                                                             
(#{make-binding-wrap\ 3812}#
+                                                               (list #{id\ 
4051}#)
+                                                               #{l\ 4054}#
+                                                               #{w*\ 4046}#)))
+                                                       (#{expand-opt\ 3993}#
+                                                         #{req\ 4039}#
+                                                         (cdr #{opt\ 4040}#)
+                                                         #{rest\ 4041}#
+                                                         #{kw\ 4042}#
+                                                         #{body\ 4043}#
+                                                         (cons #{v\ 4053}#
+                                                               #{vars\ 4044}#)
+                                                         #{r**\ 4055}#
+                                                         #{w**\ 4056}#
                                                          (cons (syntax->datum
-                                                                 #{id\ 387}#)
-                                                               #{out\ 383}#)
-                                                         (cons (#{chi\ 167}#
-                                                                 #{i\ 388}#
-                                                                 #{r*\ 381}#
-                                                                 #{w*\ 382}#
-                                                                 #{mod\ 325}#)
-                                                               #{inits\ 
384}#)))))))
-                                             #{tmp\ 386}#)
+                                                                 #{id\ 4051}#)
+                                                               #{out\ 4047}#)
+                                                         (cons (#{chi\ 3831}#
+                                                                 #{i\ 4052}#
+                                                                 #{r*\ 4045}#
+                                                                 #{w*\ 4046}#
+                                                                 #{mod\ 3989}#)
+                                                               #{inits\ 
4048}#)))))))
+                                             #{tmp\ 4050}#)
                                       (syntax-violation
                                         #f
                                         "source expression failed to match any 
pattern"
-                                        #{tmp\ 385}#)))
+                                        #{tmp\ 4049}#)))
                                   ($sc-dispatch
-                                    #{tmp\ 385}#
+                                    #{tmp\ 4049}#
                                     '(any any))))
-                               (car #{opt\ 376}#))
-                              (if #{rest\ 377}#
-                                (let ((#{v\ 393}# (#{gen-var\ 181}#
-                                                    #{rest\ 377}#)))
-                                  (let ((#{l\ 394}# (#{gen-labels\ 137}#
-                                                      (list #{v\ 393}#))))
-                                    (let ((#{r*\ 395}#
-                                            (#{extend-var-env\ 126}#
-                                              #{l\ 394}#
-                                              (list #{v\ 393}#)
-                                              #{r*\ 381}#)))
-                                      (let ((#{w*\ 396}#
-                                              (#{make-binding-wrap\ 148}#
-                                                (list #{rest\ 377}#)
-                                                #{l\ 394}#
-                                                #{w*\ 382}#)))
-                                        (#{expand-kw\ 330}#
-                                          #{req\ 375}#
-                                          (if (pair? #{out\ 383}#)
-                                            (reverse #{out\ 383}#)
+                               (car #{opt\ 4040}#))
+                              (if #{rest\ 4041}#
+                                (let ((#{v\ 4057}#
+                                        (#{gen-var\ 3845}# #{rest\ 4041}#)))
+                                  (let ((#{l\ 4058}#
+                                          (#{gen-labels\ 3801}#
+                                            (list #{v\ 4057}#))))
+                                    (let ((#{r*\ 4059}#
+                                            (#{extend-var-env\ 3790}#
+                                              #{l\ 4058}#
+                                              (list #{v\ 4057}#)
+                                              #{r*\ 4045}#)))
+                                      (let ((#{w*\ 4060}#
+                                              (#{make-binding-wrap\ 3812}#
+                                                (list #{rest\ 4041}#)
+                                                #{l\ 4058}#
+                                                #{w*\ 4046}#)))
+                                        (#{expand-kw\ 3994}#
+                                          #{req\ 4039}#
+                                          (if (pair? #{out\ 4047}#)
+                                            (reverse #{out\ 4047}#)
                                             #f)
-                                          (syntax->datum #{rest\ 377}#)
-                                          (if (pair? #{kw\ 378}#)
-                                            (cdr #{kw\ 378}#)
-                                            #{kw\ 378}#)
-                                          #{body\ 379}#
-                                          (cons #{v\ 393}# #{vars\ 380}#)
-                                          #{r*\ 395}#
-                                          #{w*\ 396}#
-                                          (if (pair? #{kw\ 378}#)
-                                            (car #{kw\ 378}#)
+                                          (syntax->datum #{rest\ 4041}#)
+                                          (if (pair? #{kw\ 4042}#)
+                                            (cdr #{kw\ 4042}#)
+                                            #{kw\ 4042}#)
+                                          #{body\ 4043}#
+                                          (cons #{v\ 4057}# #{vars\ 4044}#)
+                                          #{r*\ 4059}#
+                                          #{w*\ 4060}#
+                                          (if (pair? #{kw\ 4042}#)
+                                            (car #{kw\ 4042}#)
                                             #f)
                                           '()
-                                          #{inits\ 384}#)))))
-                                (#{expand-kw\ 330}#
-                                  #{req\ 375}#
-                                  (if (pair? #{out\ 383}#)
-                                    (reverse #{out\ 383}#)
+                                          #{inits\ 4048}#)))))
+                                (#{expand-kw\ 3994}#
+                                  #{req\ 4039}#
+                                  (if (pair? #{out\ 4047}#)
+                                    (reverse #{out\ 4047}#)
                                     #f)
                                   #f
-                                  (if (pair? #{kw\ 378}#)
-                                    (cdr #{kw\ 378}#)
-                                    #{kw\ 378}#)
-                                  #{body\ 379}#
-                                  #{vars\ 380}#
-                                  #{r*\ 381}#
-                                  #{w*\ 382}#
-                                  (if (pair? #{kw\ 378}#) (car #{kw\ 378}#) #f)
+                                  (if (pair? #{kw\ 4042}#)
+                                    (cdr #{kw\ 4042}#)
+                                    #{kw\ 4042}#)
+                                  #{body\ 4043}#
+                                  #{vars\ 4044}#
+                                  #{r*\ 4045}#
+                                  #{w*\ 4046}#
+                                  (if (pair? #{kw\ 4042}#)
+                                    (car #{kw\ 4042}#)
+                                    #f)
                                   '()
-                                  #{inits\ 384}#)))))
-                        (#{expand-req\ 328}#
-                          (lambda (#{req\ 397}#
-                                   #{opt\ 398}#
-                                   #{rest\ 399}#
-                                   #{kw\ 400}#
-                                   #{body\ 401}#)
-                            (let ((#{vars\ 402}#
-                                    (map #{gen-var\ 181}# #{req\ 397}#))
-                                  (#{labels\ 403}#
-                                    (#{gen-labels\ 137}# #{req\ 397}#)))
-                              (let ((#{r*\ 404}#
-                                      (#{extend-var-env\ 126}#
-                                        #{labels\ 403}#
-                                        #{vars\ 402}#
-                                        #{r\ 322}#))
-                                    (#{w*\ 405}#
-                                      (#{make-binding-wrap\ 148}#
-                                        #{req\ 397}#
-                                        #{labels\ 403}#
-                                        #{w\ 323}#)))
-                                (#{expand-opt\ 329}#
-                                  (map syntax->datum #{req\ 397}#)
-                                  #{opt\ 398}#
-                                  #{rest\ 399}#
-                                  #{kw\ 400}#
-                                  #{body\ 401}#
-                                  (reverse #{vars\ 402}#)
-                                  #{r*\ 404}#
-                                  #{w*\ 405}#
+                                  #{inits\ 4048}#)))))
+                        (#{expand-req\ 3992}#
+                          (lambda (#{req\ 4061}#
+                                   #{opt\ 4062}#
+                                   #{rest\ 4063}#
+                                   #{kw\ 4064}#
+                                   #{body\ 4065}#)
+                            (let ((#{vars\ 4066}#
+                                    (map #{gen-var\ 3845}# #{req\ 4061}#))
+                                  (#{labels\ 4067}#
+                                    (#{gen-labels\ 3801}# #{req\ 4061}#)))
+                              (let ((#{r*\ 4068}#
+                                      (#{extend-var-env\ 3790}#
+                                        #{labels\ 4067}#
+                                        #{vars\ 4066}#
+                                        #{r\ 3986}#))
+                                    (#{w*\ 4069}#
+                                      (#{make-binding-wrap\ 3812}#
+                                        #{req\ 4061}#
+                                        #{labels\ 4067}#
+                                        #{w\ 3987}#)))
+                                (#{expand-opt\ 3993}#
+                                  (map syntax->datum #{req\ 4061}#)
+                                  #{opt\ 4062}#
+                                  #{rest\ 4063}#
+                                  #{kw\ 4064}#
+                                  #{body\ 4065}#
+                                  (reverse #{vars\ 4066}#)
+                                  #{r*\ 4068}#
+                                  #{w*\ 4069}#
                                   '()
                                   '()))))))
-                 ((lambda (#{tmp\ 406}#)
-                    ((lambda (#{tmp\ 407}#)
-                       (if #{tmp\ 407}#
-                         (apply (lambda () (values #f #f)) #{tmp\ 407}#)
-                         ((lambda (#{tmp\ 408}#)
-                            (if #{tmp\ 408}#
-                              (apply (lambda (#{args\ 409}#
-                                              #{e1\ 410}#
-                                              #{e2\ 411}#
-                                              #{args*\ 412}#
-                                              #{e1*\ 413}#
-                                              #{e2*\ 414}#)
+                 ((lambda (#{tmp\ 4070}#)
+                    ((lambda (#{tmp\ 4071}#)
+                       (if #{tmp\ 4071}#
+                         (apply (lambda () (values #f #f)) #{tmp\ 4071}#)
+                         ((lambda (#{tmp\ 4072}#)
+                            (if #{tmp\ 4072}#
+                              (apply (lambda (#{args\ 4073}#
+                                              #{e1\ 4074}#
+                                              #{e2\ 4075}#
+                                              #{args*\ 4076}#
+                                              #{e1*\ 4077}#
+                                              #{e2*\ 4078}#)
                                        (call-with-values
                                          (lambda ()
-                                           (#{get-formals\ 326}#
-                                             #{args\ 409}#))
-                                         (lambda (#{req\ 415}#
-                                                  #{opt\ 416}#
-                                                  #{rest\ 417}#
-                                                  #{kw\ 418}#)
+                                           (#{get-formals\ 3990}#
+                                             #{args\ 4073}#))
+                                         (lambda (#{req\ 4079}#
+                                                  #{opt\ 4080}#
+                                                  #{rest\ 4081}#
+                                                  #{kw\ 4082}#)
                                            (call-with-values
                                              (lambda ()
-                                               (#{expand-req\ 328}#
-                                                 #{req\ 415}#
-                                                 #{opt\ 416}#
-                                                 #{rest\ 417}#
-                                                 #{kw\ 418}#
-                                                 (cons #{e1\ 410}#
-                                                       #{e2\ 411}#)))
-                                             (lambda (#{docstring\ 420}#
-                                                      #{req\ 421}#
-                                                      #{opt\ 422}#
-                                                      #{rest\ 423}#
-                                                      #{kw\ 424}#
-                                                      #{inits\ 425}#
-                                                      #{vars\ 426}#
-                                                      #{body\ 427}#)
+                                               (#{expand-req\ 3992}#
+                                                 #{req\ 4079}#
+                                                 #{opt\ 4080}#
+                                                 #{rest\ 4081}#
+                                                 #{kw\ 4082}#
+                                                 (cons #{e1\ 4074}#
+                                                       #{e2\ 4075}#)))
+                                             (lambda (#{docstring\ 4084}#
+                                                      #{req\ 4085}#
+                                                      #{opt\ 4086}#
+                                                      #{rest\ 4087}#
+                                                      #{kw\ 4088}#
+                                                      #{inits\ 4089}#
+                                                      #{vars\ 4090}#
+                                                      #{body\ 4091}#)
                                                (call-with-values
                                                  (lambda ()
-                                                   (#{chi-lambda-case\ 179}#
-                                                     #{e\ 321}#
-                                                     #{r\ 322}#
-                                                     #{w\ 323}#
-                                                     #{s\ 324}#
-                                                     #{mod\ 325}#
-                                                     #{get-formals\ 326}#
-                                                     (map (lambda (#{tmp\ 430}#
-                                                                   #{tmp\ 429}#
-                                                                   #{tmp\ 
428}#)
-                                                            (cons #{tmp\ 428}#
-                                                                  (cons #{tmp\ 
429}#
-                                                                        #{tmp\ 
430}#)))
-                                                          #{e2*\ 414}#
-                                                          #{e1*\ 413}#
-                                                          #{args*\ 412}#)))
-                                                 (lambda (#{docstring*\ 432}#
-                                                          #{else*\ 433}#)
+                                                   (#{chi-lambda-case\ 3843}#
+                                                     #{e\ 3985}#
+                                                     #{r\ 3986}#
+                                                     #{w\ 3987}#
+                                                     #{s\ 3988}#
+                                                     #{mod\ 3989}#
+                                                     #{get-formals\ 3990}#
+                                                     (map (lambda (#{tmp\ 
4094}#
+                                                                   #{tmp\ 
4093}#
+                                                                   #{tmp\ 
4092}#)
+                                                            (cons #{tmp\ 4092}#
+                                                                  (cons #{tmp\ 
4093}#
+                                                                        #{tmp\ 
4094}#)))
+                                                          #{e2*\ 4078}#
+                                                          #{e1*\ 4077}#
+                                                          #{args*\ 4076}#)))
+                                                 (lambda (#{docstring*\ 4096}#
+                                                          #{else*\ 4097}#)
                                                    (values
-                                                     (let ((#{t\ 434}# 
#{docstring\ 420}#))
-                                                       (if #{t\ 434}#
-                                                         #{t\ 434}#
-                                                         #{docstring*\ 432}#))
-                                                     (#{build-lambda-case\ 
107}#
-                                                       #{s\ 324}#
-                                                       #{req\ 421}#
-                                                       #{opt\ 422}#
-                                                       #{rest\ 423}#
-                                                       #{kw\ 424}#
-                                                       #{inits\ 425}#
-                                                       #{vars\ 426}#
-                                                       #{body\ 427}#
-                                                       #{else*\ 433}#)))))))))
-                                     #{tmp\ 408}#)
+                                                     (let ((#{t\ 4098}#
+                                                             #{docstring\ 
4084}#))
+                                                       (if #{t\ 4098}#
+                                                         #{t\ 4098}#
+                                                         #{docstring*\ 4096}#))
+                                                     (#{build-lambda-case\ 
3771}#
+                                                       #{s\ 3988}#
+                                                       #{req\ 4085}#
+                                                       #{opt\ 4086}#
+                                                       #{rest\ 4087}#
+                                                       #{kw\ 4088}#
+                                                       #{inits\ 4089}#
+                                                       #{vars\ 4090}#
+                                                       #{body\ 4091}#
+                                                       #{else*\ 4097}#)))))))))
+                                     #{tmp\ 4072}#)
                               (syntax-violation
                                 #f
                                 "source expression failed to match any pattern"
-                                #{tmp\ 406}#)))
+                                #{tmp\ 4070}#)))
                           ($sc-dispatch
-                            #{tmp\ 406}#
+                            #{tmp\ 4070}#
                             '((any any . each-any)
                               .
                               #(each (any any . each-any)))))))
-                     ($sc-dispatch #{tmp\ 406}# (quote ()))))
-                  #{clauses\ 327}#))))
-           (#{lambda*-formals\ 178}#
-             (lambda (#{orig-args\ 435}#)
-               (letrec ((#{check\ 440}#
-                          (lambda (#{req\ 441}#
-                                   #{opt\ 442}#
-                                   #{rest\ 443}#
-                                   #{kw\ 444}#)
-                            (if (#{distinct-bound-ids?\ 157}#
+                     ($sc-dispatch #{tmp\ 4070}# (quote ()))))
+                  #{clauses\ 3991}#))))
+           (#{lambda*-formals\ 3842}#
+             (lambda (#{orig-args\ 4099}#)
+               (letrec ((#{check\ 4104}#
+                          (lambda (#{req\ 4105}#
+                                   #{opt\ 4106}#
+                                   #{rest\ 4107}#
+                                   #{kw\ 4108}#)
+                            (if (#{distinct-bound-ids?\ 3821}#
                                   (append
-                                    #{req\ 441}#
-                                    (map car #{opt\ 442}#)
-                                    (if #{rest\ 443}#
-                                      (list #{rest\ 443}#)
+                                    #{req\ 4105}#
+                                    (map car #{opt\ 4106}#)
+                                    (if #{rest\ 4107}#
+                                      (list #{rest\ 4107}#)
                                       '())
-                                    (if (pair? #{kw\ 444}#)
-                                      (map cadr (cdr #{kw\ 444}#))
+                                    (if (pair? #{kw\ 4108}#)
+                                      (map cadr (cdr #{kw\ 4108}#))
                                       '())))
                               (values
-                                #{req\ 441}#
-                                #{opt\ 442}#
-                                #{rest\ 443}#
-                                #{kw\ 444}#)
+                                #{req\ 4105}#
+                                #{opt\ 4106}#
+                                #{rest\ 4107}#
+                                #{kw\ 4108}#)
                               (syntax-violation
                                 'lambda*
                                 "duplicate identifier in argument list"
-                                #{orig-args\ 435}#))))
-                        (#{rest\ 439}#
-                          (lambda (#{args\ 445}#
-                                   #{req\ 446}#
-                                   #{opt\ 447}#
-                                   #{kw\ 448}#)
-                            ((lambda (#{tmp\ 449}#)
-                               ((lambda (#{tmp\ 450}#)
-                                  (if (if #{tmp\ 450}#
-                                        (apply (lambda (#{r\ 451}#)
-                                                 (#{id?\ 131}# #{r\ 451}#))
-                                               #{tmp\ 450}#)
+                                #{orig-args\ 4099}#))))
+                        (#{rest\ 4103}#
+                          (lambda (#{args\ 4109}#
+                                   #{req\ 4110}#
+                                   #{opt\ 4111}#
+                                   #{kw\ 4112}#)
+                            ((lambda (#{tmp\ 4113}#)
+                               ((lambda (#{tmp\ 4114}#)
+                                  (if (if #{tmp\ 4114}#
+                                        (apply (lambda (#{r\ 4115}#)
+                                                 (#{id?\ 3795}# #{r\ 4115}#))
+                                               #{tmp\ 4114}#)
                                         #f)
-                                    (apply (lambda (#{r\ 452}#)
-                                             (#{check\ 440}#
-                                               #{req\ 446}#
-                                               #{opt\ 447}#
-                                               #{r\ 452}#
-                                               #{kw\ 448}#))
-                                           #{tmp\ 450}#)
-                                    ((lambda (#{else\ 453}#)
+                                    (apply (lambda (#{r\ 4116}#)
+                                             (#{check\ 4104}#
+                                               #{req\ 4110}#
+                                               #{opt\ 4111}#
+                                               #{r\ 4116}#
+                                               #{kw\ 4112}#))
+                                           #{tmp\ 4114}#)
+                                    ((lambda (#{else\ 4117}#)
                                        (syntax-violation
                                          'lambda*
                                          "invalid rest argument"
-                                         #{orig-args\ 435}#
-                                         #{args\ 445}#))
-                                     #{tmp\ 449}#)))
-                                (list #{tmp\ 449}#)))
-                             #{args\ 445}#)))
-                        (#{key\ 438}#
-                          (lambda (#{args\ 454}#
-                                   #{req\ 455}#
-                                   #{opt\ 456}#
-                                   #{rkey\ 457}#)
-                            ((lambda (#{tmp\ 458}#)
-                               ((lambda (#{tmp\ 459}#)
-                                  (if #{tmp\ 459}#
+                                         #{orig-args\ 4099}#
+                                         #{args\ 4109}#))
+                                     #{tmp\ 4113}#)))
+                                (list #{tmp\ 4113}#)))
+                             #{args\ 4109}#)))
+                        (#{key\ 4102}#
+                          (lambda (#{args\ 4118}#
+                                   #{req\ 4119}#
+                                   #{opt\ 4120}#
+                                   #{rkey\ 4121}#)
+                            ((lambda (#{tmp\ 4122}#)
+                               ((lambda (#{tmp\ 4123}#)
+                                  (if #{tmp\ 4123}#
                                     (apply (lambda ()
-                                             (#{check\ 440}#
-                                               #{req\ 455}#
-                                               #{opt\ 456}#
+                                             (#{check\ 4104}#
+                                               #{req\ 4119}#
+                                               #{opt\ 4120}#
                                                #f
                                                (cons #f
-                                                     (reverse #{rkey\ 457}#))))
-                                           #{tmp\ 459}#)
-                                    ((lambda (#{tmp\ 460}#)
-                                       (if (if #{tmp\ 460}#
-                                             (apply (lambda (#{a\ 461}#
-                                                             #{b\ 462}#)
-                                                      (#{id?\ 131}#
-                                                        #{a\ 461}#))
-                                                    #{tmp\ 460}#)
+                                                     (reverse
+                                                       #{rkey\ 4121}#))))
+                                           #{tmp\ 4123}#)
+                                    ((lambda (#{tmp\ 4124}#)
+                                       (if (if #{tmp\ 4124}#
+                                             (apply (lambda (#{a\ 4125}#
+                                                             #{b\ 4126}#)
+                                                      (#{id?\ 3795}#
+                                                        #{a\ 4125}#))
+                                                    #{tmp\ 4124}#)
                                              #f)
-                                         (apply (lambda (#{a\ 463}# #{b\ 464}#)
-                                                  ((lambda (#{tmp\ 465}#)
-                                                     ((lambda (#{k\ 466}#)
-                                                        (#{key\ 438}#
-                                                          #{b\ 464}#
-                                                          #{req\ 455}#
-                                                          #{opt\ 456}#
-                                                          (cons (cons #{k\ 
466}#
-                                                                      (cons 
#{a\ 463}#
+                                         (apply (lambda (#{a\ 4127}#
+                                                         #{b\ 4128}#)
+                                                  ((lambda (#{tmp\ 4129}#)
+                                                     ((lambda (#{k\ 4130}#)
+                                                        (#{key\ 4102}#
+                                                          #{b\ 4128}#
+                                                          #{req\ 4119}#
+                                                          #{opt\ 4120}#
+                                                          (cons (cons #{k\ 
4130}#
+                                                                      (cons 
#{a\ 4127}#
                                                                             
'(#(syntax-object
                                                                                
 #f
                                                                                
 ((top)
@@ -1002,222 +1010,223 @@
                                                                                
     "i")))
                                                                                
 (hygiene
                                                                                
   guile)))))
-                                                                #{rkey\ 
457}#)))
-                                                      #{tmp\ 465}#))
+                                                                #{rkey\ 
4121}#)))
+                                                      #{tmp\ 4129}#))
                                                    (symbol->keyword
                                                      (syntax->datum
-                                                       #{a\ 463}#))))
-                                                #{tmp\ 460}#)
-                                         ((lambda (#{tmp\ 467}#)
-                                            (if (if #{tmp\ 467}#
-                                                  (apply (lambda (#{a\ 468}#
-                                                                  #{init\ 469}#
-                                                                  #{b\ 470}#)
-                                                           (#{id?\ 131}#
-                                                             #{a\ 468}#))
-                                                         #{tmp\ 467}#)
+                                                       #{a\ 4127}#))))
+                                                #{tmp\ 4124}#)
+                                         ((lambda (#{tmp\ 4131}#)
+                                            (if (if #{tmp\ 4131}#
+                                                  (apply (lambda (#{a\ 4132}#
+                                                                  #{init\ 
4133}#
+                                                                  #{b\ 4134}#)
+                                                           (#{id?\ 3795}#
+                                                             #{a\ 4132}#))
+                                                         #{tmp\ 4131}#)
                                                   #f)
-                                              (apply (lambda (#{a\ 471}#
-                                                              #{init\ 472}#
-                                                              #{b\ 473}#)
-                                                       ((lambda (#{tmp\ 474}#)
-                                                          ((lambda (#{k\ 475}#)
-                                                             (#{key\ 438}#
-                                                               #{b\ 473}#
-                                                               #{req\ 455}#
-                                                               #{opt\ 456}#
-                                                               (cons (list 
#{k\ 475}#
-                                                                           
#{a\ 471}#
-                                                                           
#{init\ 472}#)
-                                                                     #{rkey\ 
457}#)))
-                                                           #{tmp\ 474}#))
+                                              (apply (lambda (#{a\ 4135}#
+                                                              #{init\ 4136}#
+                                                              #{b\ 4137}#)
+                                                       ((lambda (#{tmp\ 4138}#)
+                                                          ((lambda (#{k\ 
4139}#)
+                                                             (#{key\ 4102}#
+                                                               #{b\ 4137}#
+                                                               #{req\ 4119}#
+                                                               #{opt\ 4120}#
+                                                               (cons (list 
#{k\ 4139}#
+                                                                           
#{a\ 4135}#
+                                                                           
#{init\ 4136}#)
+                                                                     #{rkey\ 
4121}#)))
+                                                           #{tmp\ 4138}#))
                                                         (symbol->keyword
                                                           (syntax->datum
-                                                            #{a\ 471}#))))
-                                                     #{tmp\ 467}#)
-                                              ((lambda (#{tmp\ 476}#)
-                                                 (if (if #{tmp\ 476}#
-                                                       (apply (lambda (#{a\ 
477}#
-                                                                       #{init\ 
478}#
-                                                                       #{k\ 
479}#
-                                                                       #{b\ 
480}#)
-                                                                (if (#{id?\ 
131}#
-                                                                      #{a\ 
477}#)
+                                                            #{a\ 4135}#))))
+                                                     #{tmp\ 4131}#)
+                                              ((lambda (#{tmp\ 4140}#)
+                                                 (if (if #{tmp\ 4140}#
+                                                       (apply (lambda (#{a\ 
4141}#
+                                                                       #{init\ 
4142}#
+                                                                       #{k\ 
4143}#
+                                                                       #{b\ 
4144}#)
+                                                                (if (#{id?\ 
3795}#
+                                                                      #{a\ 
4141}#)
                                                                   (keyword?
                                                                     
(syntax->datum
-                                                                      #{k\ 
479}#))
+                                                                      #{k\ 
4143}#))
                                                                   #f))
-                                                              #{tmp\ 476}#)
+                                                              #{tmp\ 4140}#)
                                                        #f)
-                                                   (apply (lambda (#{a\ 481}#
-                                                                   #{init\ 
482}#
-                                                                   #{k\ 483}#
-                                                                   #{b\ 484}#)
-                                                            (#{key\ 438}#
-                                                              #{b\ 484}#
-                                                              #{req\ 455}#
-                                                              #{opt\ 456}#
-                                                              (cons (list #{k\ 
483}#
-                                                                          #{a\ 
481}#
-                                                                          
#{init\ 482}#)
-                                                                    #{rkey\ 
457}#)))
-                                                          #{tmp\ 476}#)
-                                                   ((lambda (#{tmp\ 485}#)
-                                                      (if (if #{tmp\ 485}#
-                                                            (apply (lambda 
(#{aok\ 486}#)
+                                                   (apply (lambda (#{a\ 4145}#
+                                                                   #{init\ 
4146}#
+                                                                   #{k\ 4147}#
+                                                                   #{b\ 4148}#)
+                                                            (#{key\ 4102}#
+                                                              #{b\ 4148}#
+                                                              #{req\ 4119}#
+                                                              #{opt\ 4120}#
+                                                              (cons (list #{k\ 
4147}#
+                                                                          #{a\ 
4145}#
+                                                                          
#{init\ 4146}#)
+                                                                    #{rkey\ 
4121}#)))
+                                                          #{tmp\ 4140}#)
+                                                   ((lambda (#{tmp\ 4149}#)
+                                                      (if (if #{tmp\ 4149}#
+                                                            (apply (lambda 
(#{aok\ 4150}#)
                                                                      (eq? 
(syntax->datum
-                                                                            
#{aok\ 486}#)
+                                                                            
#{aok\ 4150}#)
                                                                           
#:allow-other-keys))
-                                                                   #{tmp\ 
485}#)
+                                                                   #{tmp\ 
4149}#)
                                                             #f)
-                                                        (apply (lambda (#{aok\ 
487}#)
-                                                                 (#{check\ 
440}#
-                                                                   #{req\ 455}#
-                                                                   #{opt\ 456}#
+                                                        (apply (lambda (#{aok\ 
4151}#)
+                                                                 (#{check\ 
4104}#
+                                                                   #{req\ 
4119}#
+                                                                   #{opt\ 
4120}#
                                                                    #f
                                                                    (cons #t
                                                                          
(reverse
-                                                                           
#{rkey\ 457}#))))
-                                                               #{tmp\ 485}#)
-                                                        ((lambda (#{tmp\ 488}#)
-                                                           (if (if #{tmp\ 488}#
-                                                                 (apply 
(lambda (#{aok\ 489}#
-                                                                               
  #{a\ 490}#
-                                                                               
  #{b\ 491}#)
+                                                                           
#{rkey\ 4121}#))))
+                                                               #{tmp\ 4149}#)
+                                                        ((lambda (#{tmp\ 
4152}#)
+                                                           (if (if #{tmp\ 
4152}#
+                                                                 (apply 
(lambda (#{aok\ 4153}#
+                                                                               
  #{a\ 4154}#
+                                                                               
  #{b\ 4155}#)
                                                                           (if 
(eq? (syntax->datum
-                                                                               
      #{aok\ 489}#)
+                                                                               
      #{aok\ 4153}#)
                                                                                
    #:allow-other-keys)
                                                                             
(eq? (syntax->datum
-                                                                               
    #{a\ 490}#)
+                                                                               
    #{a\ 4154}#)
                                                                                
  #:rest)
                                                                             
#f))
-                                                                        #{tmp\ 
488}#)
+                                                                        #{tmp\ 
4152}#)
                                                                  #f)
-                                                             (apply (lambda 
(#{aok\ 492}#
-                                                                             
#{a\ 493}#
-                                                                             
#{b\ 494}#)
-                                                                      (#{rest\ 
439}#
-                                                                        #{b\ 
494}#
-                                                                        #{req\ 
455}#
-                                                                        #{opt\ 
456}#
+                                                             (apply (lambda 
(#{aok\ 4156}#
+                                                                             
#{a\ 4157}#
+                                                                             
#{b\ 4158}#)
+                                                                      (#{rest\ 
4103}#
+                                                                        #{b\ 
4158}#
+                                                                        #{req\ 
4119}#
+                                                                        #{opt\ 
4120}#
                                                                         (cons 
#t
                                                                               
(reverse
-                                                                               
 #{rkey\ 457}#))))
-                                                                    #{tmp\ 
488}#)
-                                                             ((lambda (#{tmp\ 
495}#)
-                                                                (if (if #{tmp\ 
495}#
-                                                                      (apply 
(lambda (#{aok\ 496}#
-                                                                               
       #{r\ 497}#)
+                                                                               
 #{rkey\ 4121}#))))
+                                                                    #{tmp\ 
4152}#)
+                                                             ((lambda (#{tmp\ 
4159}#)
+                                                                (if (if #{tmp\ 
4159}#
+                                                                      (apply 
(lambda (#{aok\ 4160}#
+                                                                               
       #{r\ 4161}#)
                                                                                
(if (eq? (syntax->datum
-                                                                               
           #{aok\ 496}#)
+                                                                               
           #{aok\ 4160}#)
                                                                                
         #:allow-other-keys)
-                                                                               
  (#{id?\ 131}#
-                                                                               
    #{r\ 497}#)
+                                                                               
  (#{id?\ 3795}#
+                                                                               
    #{r\ 4161}#)
                                                                                
  #f))
-                                                                             
#{tmp\ 495}#)
+                                                                             
#{tmp\ 4159}#)
                                                                       #f)
-                                                                  (apply 
(lambda (#{aok\ 498}#
-                                                                               
   #{r\ 499}#)
-                                                                           
(#{rest\ 439}#
-                                                                             
#{r\ 499}#
-                                                                             
#{req\ 455}#
-                                                                             
#{opt\ 456}#
+                                                                  (apply 
(lambda (#{aok\ 4162}#
+                                                                               
   #{r\ 4163}#)
+                                                                           
(#{rest\ 4103}#
+                                                                             
#{r\ 4163}#
+                                                                             
#{req\ 4119}#
+                                                                             
#{opt\ 4120}#
                                                                              
(cons #t
                                                                                
    (reverse
-                                                                               
      #{rkey\ 457}#))))
-                                                                         
#{tmp\ 495}#)
-                                                                  ((lambda 
(#{tmp\ 500}#)
-                                                                     (if (if 
#{tmp\ 500}#
-                                                                           
(apply (lambda (#{a\ 501}#
-                                                                               
            #{b\ 502}#)
+                                                                               
      #{rkey\ 4121}#))))
+                                                                         
#{tmp\ 4159}#)
+                                                                  ((lambda 
(#{tmp\ 4164}#)
+                                                                     (if (if 
#{tmp\ 4164}#
+                                                                           
(apply (lambda (#{a\ 4165}#
+                                                                               
            #{b\ 4166}#)
                                                                                
     (eq? (syntax->datum
-                                                                               
            #{a\ 501}#)
+                                                                               
            #{a\ 4165}#)
                                                                                
          #:rest))
-                                                                               
   #{tmp\ 500}#)
+                                                                               
   #{tmp\ 4164}#)
                                                                            #f)
-                                                                       (apply 
(lambda (#{a\ 503}#
-                                                                               
        #{b\ 504}#)
-                                                                               
 (#{rest\ 439}#
-                                                                               
   #{b\ 504}#
-                                                                               
   #{req\ 455}#
-                                                                               
   #{opt\ 456}#
+                                                                       (apply 
(lambda (#{a\ 4167}#
+                                                                               
        #{b\ 4168}#)
+                                                                               
 (#{rest\ 4103}#
+                                                                               
   #{b\ 4168}#
+                                                                               
   #{req\ 4119}#
+                                                                               
   #{opt\ 4120}#
                                                                                
   (cons #f
                                                                                
         (reverse
-                                                                               
           #{rkey\ 457}#))))
-                                                                              
#{tmp\ 500}#)
-                                                                       
((lambda (#{tmp\ 505}#)
-                                                                          (if 
(if #{tmp\ 505}#
-                                                                               
 (apply (lambda (#{r\ 506}#)
-                                                                               
          (#{id?\ 131}#
-                                                                               
            #{r\ 506}#))
-                                                                               
        #{tmp\ 505}#)
+                                                                               
           #{rkey\ 4121}#))))
+                                                                              
#{tmp\ 4164}#)
+                                                                       
((lambda (#{tmp\ 4169}#)
+                                                                          (if 
(if #{tmp\ 4169}#
+                                                                               
 (apply (lambda (#{r\ 4170}#)
+                                                                               
          (#{id?\ 3795}#
+                                                                               
            #{r\ 4170}#))
+                                                                               
        #{tmp\ 4169}#)
                                                                                
 #f)
-                                                                            
(apply (lambda (#{r\ 507}#)
-                                                                               
      (#{rest\ 439}#
-                                                                               
        #{r\ 507}#
-                                                                               
        #{req\ 455}#
-                                                                               
        #{opt\ 456}#
+                                                                            
(apply (lambda (#{r\ 4171}#)
+                                                                               
      (#{rest\ 4103}#
+                                                                               
        #{r\ 4171}#
+                                                                               
        #{req\ 4119}#
+                                                                               
        #{opt\ 4120}#
                                                                                
        (cons #f
                                                                                
              (reverse
-                                                                               
                #{rkey\ 457}#))))
-                                                                               
    #{tmp\ 505}#)
-                                                                            
((lambda (#{else\ 508}#)
+                                                                               
                #{rkey\ 4121}#))))
+                                                                               
    #{tmp\ 4169}#)
+                                                                            
((lambda (#{else\ 4172}#)
                                                                                
(syntax-violation
                                                                                
  'lambda*
                                                                                
  "invalid keyword argument list"
-                                                                               
  #{orig-args\ 435}#
-                                                                               
  #{args\ 454}#))
-                                                                             
#{tmp\ 458}#)))
-                                                                        (list 
#{tmp\ 458}#))))
+                                                                               
  #{orig-args\ 4099}#
+                                                                               
  #{args\ 4118}#))
+                                                                             
#{tmp\ 4122}#)))
+                                                                        (list 
#{tmp\ 4122}#))))
                                                                    
($sc-dispatch
-                                                                     #{tmp\ 
458}#
+                                                                     #{tmp\ 
4122}#
                                                                      '(any 
any)))))
                                                               ($sc-dispatch
-                                                                #{tmp\ 458}#
+                                                                #{tmp\ 4122}#
                                                                 '(any .
                                                                       any)))))
                                                          ($sc-dispatch
-                                                           #{tmp\ 458}#
+                                                           #{tmp\ 4122}#
                                                            '(any any any)))))
                                                     ($sc-dispatch
-                                                      #{tmp\ 458}#
+                                                      #{tmp\ 4122}#
                                                       '(any)))))
                                                ($sc-dispatch
-                                                 #{tmp\ 458}#
+                                                 #{tmp\ 4122}#
                                                  '((any any any) . any)))))
                                           ($sc-dispatch
-                                            #{tmp\ 458}#
+                                            #{tmp\ 4122}#
                                             '((any any) . any)))))
                                      ($sc-dispatch
-                                       #{tmp\ 458}#
+                                       #{tmp\ 4122}#
                                        '(any . any)))))
-                                ($sc-dispatch #{tmp\ 458}# (quote ()))))
-                             #{args\ 454}#)))
-                        (#{opt\ 437}#
-                          (lambda (#{args\ 509}# #{req\ 510}# #{ropt\ 511}#)
-                            ((lambda (#{tmp\ 512}#)
-                               ((lambda (#{tmp\ 513}#)
-                                  (if #{tmp\ 513}#
+                                ($sc-dispatch #{tmp\ 4122}# (quote ()))))
+                             #{args\ 4118}#)))
+                        (#{opt\ 4101}#
+                          (lambda (#{args\ 4173}# #{req\ 4174}# #{ropt\ 4175}#)
+                            ((lambda (#{tmp\ 4176}#)
+                               ((lambda (#{tmp\ 4177}#)
+                                  (if #{tmp\ 4177}#
                                     (apply (lambda ()
-                                             (#{check\ 440}#
-                                               #{req\ 510}#
-                                               (reverse #{ropt\ 511}#)
+                                             (#{check\ 4104}#
+                                               #{req\ 4174}#
+                                               (reverse #{ropt\ 4175}#)
                                                #f
                                                '()))
-                                           #{tmp\ 513}#)
-                                    ((lambda (#{tmp\ 514}#)
-                                       (if (if #{tmp\ 514}#
-                                             (apply (lambda (#{a\ 515}#
-                                                             #{b\ 516}#)
-                                                      (#{id?\ 131}#
-                                                        #{a\ 515}#))
-                                                    #{tmp\ 514}#)
+                                           #{tmp\ 4177}#)
+                                    ((lambda (#{tmp\ 4178}#)
+                                       (if (if #{tmp\ 4178}#
+                                             (apply (lambda (#{a\ 4179}#
+                                                             #{b\ 4180}#)
+                                                      (#{id?\ 3795}#
+                                                        #{a\ 4179}#))
+                                                    #{tmp\ 4178}#)
                                              #f)
-                                         (apply (lambda (#{a\ 517}# #{b\ 518}#)
-                                                  (#{opt\ 437}#
-                                                    #{b\ 518}#
-                                                    #{req\ 510}#
-                                                    (cons (cons #{a\ 517}#
+                                         (apply (lambda (#{a\ 4181}#
+                                                         #{b\ 4182}#)
+                                                  (#{opt\ 4101}#
+                                                    #{b\ 4182}#
+                                                    #{req\ 4174}#
+                                                    (cons (cons #{a\ 4181}#
                                                                 
'(#(syntax-object
                                                                     #f
                                                                     ((top)
@@ -1621,328 +1630,330 @@
                                                                         "i")))
                                                                     (hygiene
                                                                       guile))))
-                                                          #{ropt\ 511}#)))
-                                                #{tmp\ 514}#)
-                                         ((lambda (#{tmp\ 519}#)
-                                            (if (if #{tmp\ 519}#
-                                                  (apply (lambda (#{a\ 520}#
-                                                                  #{init\ 521}#
-                                                                  #{b\ 522}#)
-                                                           (#{id?\ 131}#
-                                                             #{a\ 520}#))
-                                                         #{tmp\ 519}#)
+                                                          #{ropt\ 4175}#)))
+                                                #{tmp\ 4178}#)
+                                         ((lambda (#{tmp\ 4183}#)
+                                            (if (if #{tmp\ 4183}#
+                                                  (apply (lambda (#{a\ 4184}#
+                                                                  #{init\ 
4185}#
+                                                                  #{b\ 4186}#)
+                                                           (#{id?\ 3795}#
+                                                             #{a\ 4184}#))
+                                                         #{tmp\ 4183}#)
                                                   #f)
-                                              (apply (lambda (#{a\ 523}#
-                                                              #{init\ 524}#
-                                                              #{b\ 525}#)
-                                                       (#{opt\ 437}#
-                                                         #{b\ 525}#
-                                                         #{req\ 510}#
-                                                         (cons (list #{a\ 523}#
-                                                                     #{init\ 
524}#)
-                                                               #{ropt\ 511}#)))
-                                                     #{tmp\ 519}#)
-                                              ((lambda (#{tmp\ 526}#)
-                                                 (if (if #{tmp\ 526}#
-                                                       (apply (lambda (#{a\ 
527}#
-                                                                       #{b\ 
528}#)
+                                              (apply (lambda (#{a\ 4187}#
+                                                              #{init\ 4188}#
+                                                              #{b\ 4189}#)
+                                                       (#{opt\ 4101}#
+                                                         #{b\ 4189}#
+                                                         #{req\ 4174}#
+                                                         (cons (list #{a\ 
4187}#
+                                                                     #{init\ 
4188}#)
+                                                               #{ropt\ 
4175}#)))
+                                                     #{tmp\ 4183}#)
+                                              ((lambda (#{tmp\ 4190}#)
+                                                 (if (if #{tmp\ 4190}#
+                                                       (apply (lambda (#{a\ 
4191}#
+                                                                       #{b\ 
4192}#)
                                                                 (eq? 
(syntax->datum
-                                                                       #{a\ 
527}#)
+                                                                       #{a\ 
4191}#)
                                                                      #:key))
-                                                              #{tmp\ 526}#)
+                                                              #{tmp\ 4190}#)
                                                        #f)
-                                                   (apply (lambda (#{a\ 529}#
-                                                                   #{b\ 530}#)
-                                                            (#{key\ 438}#
-                                                              #{b\ 530}#
-                                                              #{req\ 510}#
+                                                   (apply (lambda (#{a\ 4193}#
+                                                                   #{b\ 4194}#)
+                                                            (#{key\ 4102}#
+                                                              #{b\ 4194}#
+                                                              #{req\ 4174}#
                                                               (reverse
-                                                                #{ropt\ 511}#)
+                                                                #{ropt\ 4175}#)
                                                               '()))
-                                                          #{tmp\ 526}#)
-                                                   ((lambda (#{tmp\ 531}#)
-                                                      (if (if #{tmp\ 531}#
-                                                            (apply (lambda 
(#{a\ 532}#
-                                                                            
#{b\ 533}#)
+                                                          #{tmp\ 4190}#)
+                                                   ((lambda (#{tmp\ 4195}#)
+                                                      (if (if #{tmp\ 4195}#
+                                                            (apply (lambda 
(#{a\ 4196}#
+                                                                            
#{b\ 4197}#)
                                                                      (eq? 
(syntax->datum
-                                                                            
#{a\ 532}#)
+                                                                            
#{a\ 4196}#)
                                                                           
#:rest))
-                                                                   #{tmp\ 
531}#)
+                                                                   #{tmp\ 
4195}#)
                                                             #f)
-                                                        (apply (lambda (#{a\ 
534}#
-                                                                        #{b\ 
535}#)
-                                                                 (#{rest\ 439}#
-                                                                   #{b\ 535}#
-                                                                   #{req\ 510}#
+                                                        (apply (lambda (#{a\ 
4198}#
+                                                                        #{b\ 
4199}#)
+                                                                 (#{rest\ 
4103}#
+                                                                   #{b\ 4199}#
+                                                                   #{req\ 
4174}#
                                                                    (reverse
-                                                                     #{ropt\ 
511}#)
+                                                                     #{ropt\ 
4175}#)
                                                                    '()))
-                                                               #{tmp\ 531}#)
-                                                        ((lambda (#{tmp\ 536}#)
-                                                           (if (if #{tmp\ 536}#
-                                                                 (apply 
(lambda (#{r\ 537}#)
-                                                                          
(#{id?\ 131}#
-                                                                            
#{r\ 537}#))
-                                                                        #{tmp\ 
536}#)
+                                                               #{tmp\ 4195}#)
+                                                        ((lambda (#{tmp\ 
4200}#)
+                                                           (if (if #{tmp\ 
4200}#
+                                                                 (apply 
(lambda (#{r\ 4201}#)
+                                                                          
(#{id?\ 3795}#
+                                                                            
#{r\ 4201}#))
+                                                                        #{tmp\ 
4200}#)
                                                                  #f)
-                                                             (apply (lambda 
(#{r\ 538}#)
-                                                                      (#{rest\ 
439}#
-                                                                        #{r\ 
538}#
-                                                                        #{req\ 
510}#
+                                                             (apply (lambda 
(#{r\ 4202}#)
+                                                                      (#{rest\ 
4103}#
+                                                                        #{r\ 
4202}#
+                                                                        #{req\ 
4174}#
                                                                         
(reverse
-                                                                          
#{ropt\ 511}#)
+                                                                          
#{ropt\ 4175}#)
                                                                         '()))
-                                                                    #{tmp\ 
536}#)
-                                                             ((lambda (#{else\ 
539}#)
+                                                                    #{tmp\ 
4200}#)
+                                                             ((lambda (#{else\ 
4203}#)
                                                                 
(syntax-violation
                                                                   'lambda*
                                                                   "invalid 
optional argument list"
-                                                                  #{orig-args\ 
435}#
-                                                                  #{args\ 
509}#))
-                                                              #{tmp\ 512}#)))
-                                                         (list #{tmp\ 512}#))))
+                                                                  #{orig-args\ 
4099}#
+                                                                  #{args\ 
4173}#))
+                                                              #{tmp\ 4176}#)))
+                                                         (list #{tmp\ 
4176}#))))
                                                     ($sc-dispatch
-                                                      #{tmp\ 512}#
+                                                      #{tmp\ 4176}#
                                                       '(any any)))))
                                                ($sc-dispatch
-                                                 #{tmp\ 512}#
+                                                 #{tmp\ 4176}#
                                                  '(any . any)))))
                                           ($sc-dispatch
-                                            #{tmp\ 512}#
+                                            #{tmp\ 4176}#
                                             '((any any) . any)))))
                                      ($sc-dispatch
-                                       #{tmp\ 512}#
+                                       #{tmp\ 4176}#
                                        '(any . any)))))
-                                ($sc-dispatch #{tmp\ 512}# (quote ()))))
-                             #{args\ 509}#)))
-                        (#{req\ 436}#
-                          (lambda (#{args\ 540}# #{rreq\ 541}#)
-                            ((lambda (#{tmp\ 542}#)
-                               ((lambda (#{tmp\ 543}#)
-                                  (if #{tmp\ 543}#
+                                ($sc-dispatch #{tmp\ 4176}# (quote ()))))
+                             #{args\ 4173}#)))
+                        (#{req\ 4100}#
+                          (lambda (#{args\ 4204}# #{rreq\ 4205}#)
+                            ((lambda (#{tmp\ 4206}#)
+                               ((lambda (#{tmp\ 4207}#)
+                                  (if #{tmp\ 4207}#
                                     (apply (lambda ()
-                                             (#{check\ 440}#
-                                               (reverse #{rreq\ 541}#)
+                                             (#{check\ 4104}#
+                                               (reverse #{rreq\ 4205}#)
                                                '()
                                                #f
                                                '()))
-                                           #{tmp\ 543}#)
-                                    ((lambda (#{tmp\ 544}#)
-                                       (if (if #{tmp\ 544}#
-                                             (apply (lambda (#{a\ 545}#
-                                                             #{b\ 546}#)
-                                                      (#{id?\ 131}#
-                                                        #{a\ 545}#))
-                                                    #{tmp\ 544}#)
+                                           #{tmp\ 4207}#)
+                                    ((lambda (#{tmp\ 4208}#)
+                                       (if (if #{tmp\ 4208}#
+                                             (apply (lambda (#{a\ 4209}#
+                                                             #{b\ 4210}#)
+                                                      (#{id?\ 3795}#
+                                                        #{a\ 4209}#))
+                                                    #{tmp\ 4208}#)
                                              #f)
-                                         (apply (lambda (#{a\ 547}# #{b\ 548}#)
-                                                  (#{req\ 436}#
-                                                    #{b\ 548}#
-                                                    (cons #{a\ 547}#
-                                                          #{rreq\ 541}#)))
-                                                #{tmp\ 544}#)
-                                         ((lambda (#{tmp\ 549}#)
-                                            (if (if #{tmp\ 549}#
-                                                  (apply (lambda (#{a\ 550}#
-                                                                  #{b\ 551}#)
+                                         (apply (lambda (#{a\ 4211}#
+                                                         #{b\ 4212}#)
+                                                  (#{req\ 4100}#
+                                                    #{b\ 4212}#
+                                                    (cons #{a\ 4211}#
+                                                          #{rreq\ 4205}#)))
+                                                #{tmp\ 4208}#)
+                                         ((lambda (#{tmp\ 4213}#)
+                                            (if (if #{tmp\ 4213}#
+                                                  (apply (lambda (#{a\ 4214}#
+                                                                  #{b\ 4215}#)
                                                            (eq? (syntax->datum
-                                                                  #{a\ 550}#)
+                                                                  #{a\ 4214}#)
                                                                 #:optional))
-                                                         #{tmp\ 549}#)
+                                                         #{tmp\ 4213}#)
                                                   #f)
-                                              (apply (lambda (#{a\ 552}#
-                                                              #{b\ 553}#)
-                                                       (#{opt\ 437}#
-                                                         #{b\ 553}#
+                                              (apply (lambda (#{a\ 4216}#
+                                                              #{b\ 4217}#)
+                                                       (#{opt\ 4101}#
+                                                         #{b\ 4217}#
                                                          (reverse
-                                                           #{rreq\ 541}#)
+                                                           #{rreq\ 4205}#)
                                                          '()))
-                                                     #{tmp\ 549}#)
-                                              ((lambda (#{tmp\ 554}#)
-                                                 (if (if #{tmp\ 554}#
-                                                       (apply (lambda (#{a\ 
555}#
-                                                                       #{b\ 
556}#)
+                                                     #{tmp\ 4213}#)
+                                              ((lambda (#{tmp\ 4218}#)
+                                                 (if (if #{tmp\ 4218}#
+                                                       (apply (lambda (#{a\ 
4219}#
+                                                                       #{b\ 
4220}#)
                                                                 (eq? 
(syntax->datum
-                                                                       #{a\ 
555}#)
+                                                                       #{a\ 
4219}#)
                                                                      #:key))
-                                                              #{tmp\ 554}#)
+                                                              #{tmp\ 4218}#)
                                                        #f)
-                                                   (apply (lambda (#{a\ 557}#
-                                                                   #{b\ 558}#)
-                                                            (#{key\ 438}#
-                                                              #{b\ 558}#
+                                                   (apply (lambda (#{a\ 4221}#
+                                                                   #{b\ 4222}#)
+                                                            (#{key\ 4102}#
+                                                              #{b\ 4222}#
                                                               (reverse
-                                                                #{rreq\ 541}#)
+                                                                #{rreq\ 4205}#)
                                                               '()
                                                               '()))
-                                                          #{tmp\ 554}#)
-                                                   ((lambda (#{tmp\ 559}#)
-                                                      (if (if #{tmp\ 559}#
-                                                            (apply (lambda 
(#{a\ 560}#
-                                                                            
#{b\ 561}#)
+                                                          #{tmp\ 4218}#)
+                                                   ((lambda (#{tmp\ 4223}#)
+                                                      (if (if #{tmp\ 4223}#
+                                                            (apply (lambda 
(#{a\ 4224}#
+                                                                            
#{b\ 4225}#)
                                                                      (eq? 
(syntax->datum
-                                                                            
#{a\ 560}#)
+                                                                            
#{a\ 4224}#)
                                                                           
#:rest))
-                                                                   #{tmp\ 
559}#)
+                                                                   #{tmp\ 
4223}#)
                                                             #f)
-                                                        (apply (lambda (#{a\ 
562}#
-                                                                        #{b\ 
563}#)
-                                                                 (#{rest\ 439}#
-                                                                   #{b\ 563}#
+                                                        (apply (lambda (#{a\ 
4226}#
+                                                                        #{b\ 
4227}#)
+                                                                 (#{rest\ 
4103}#
+                                                                   #{b\ 4227}#
                                                                    (reverse
-                                                                     #{rreq\ 
541}#)
+                                                                     #{rreq\ 
4205}#)
                                                                    '()
                                                                    '()))
-                                                               #{tmp\ 559}#)
-                                                        ((lambda (#{tmp\ 564}#)
-                                                           (if (if #{tmp\ 564}#
-                                                                 (apply 
(lambda (#{r\ 565}#)
-                                                                          
(#{id?\ 131}#
-                                                                            
#{r\ 565}#))
-                                                                        #{tmp\ 
564}#)
+                                                               #{tmp\ 4223}#)
+                                                        ((lambda (#{tmp\ 
4228}#)
+                                                           (if (if #{tmp\ 
4228}#
+                                                                 (apply 
(lambda (#{r\ 4229}#)
+                                                                          
(#{id?\ 3795}#
+                                                                            
#{r\ 4229}#))
+                                                                        #{tmp\ 
4228}#)
                                                                  #f)
-                                                             (apply (lambda 
(#{r\ 566}#)
-                                                                      (#{rest\ 
439}#
-                                                                        #{r\ 
566}#
+                                                             (apply (lambda 
(#{r\ 4230}#)
+                                                                      (#{rest\ 
4103}#
+                                                                        #{r\ 
4230}#
                                                                         
(reverse
-                                                                          
#{rreq\ 541}#)
+                                                                          
#{rreq\ 4205}#)
                                                                         '()
                                                                         '()))
-                                                                    #{tmp\ 
564}#)
-                                                             ((lambda (#{else\ 
567}#)
+                                                                    #{tmp\ 
4228}#)
+                                                             ((lambda (#{else\ 
4231}#)
                                                                 
(syntax-violation
                                                                   'lambda*
                                                                   "invalid 
argument list"
-                                                                  #{orig-args\ 
435}#
-                                                                  #{args\ 
540}#))
-                                                              #{tmp\ 542}#)))
-                                                         (list #{tmp\ 542}#))))
+                                                                  #{orig-args\ 
4099}#
+                                                                  #{args\ 
4204}#))
+                                                              #{tmp\ 4206}#)))
+                                                         (list #{tmp\ 
4206}#))))
                                                     ($sc-dispatch
-                                                      #{tmp\ 542}#
+                                                      #{tmp\ 4206}#
                                                       '(any any)))))
                                                ($sc-dispatch
-                                                 #{tmp\ 542}#
+                                                 #{tmp\ 4206}#
                                                  '(any . any)))))
                                           ($sc-dispatch
-                                            #{tmp\ 542}#
+                                            #{tmp\ 4206}#
                                             '(any . any)))))
                                      ($sc-dispatch
-                                       #{tmp\ 542}#
+                                       #{tmp\ 4206}#
                                        '(any . any)))))
-                                ($sc-dispatch #{tmp\ 542}# (quote ()))))
-                             #{args\ 540}#))))
-                 (#{req\ 436}# #{orig-args\ 435}# (quote ())))))
-           (#{chi-simple-lambda\ 177}#
-             (lambda (#{e\ 568}#
-                      #{r\ 569}#
-                      #{w\ 570}#
-                      #{s\ 571}#
-                      #{mod\ 572}#
-                      #{req\ 573}#
-                      #{rest\ 574}#
-                      #{docstring\ 575}#
-                      #{body\ 576}#)
-               (let ((#{ids\ 577}#
-                       (if #{rest\ 574}#
-                         (append #{req\ 573}# (list #{rest\ 574}#))
-                         #{req\ 573}#)))
-                 (let ((#{vars\ 578}#
-                         (map #{gen-var\ 181}# #{ids\ 577}#)))
-                   (let ((#{labels\ 579}#
-                           (#{gen-labels\ 137}# #{ids\ 577}#)))
-                     (#{build-simple-lambda\ 105}#
-                       #{s\ 571}#
-                       (map syntax->datum #{req\ 573}#)
-                       (if #{rest\ 574}#
-                         (syntax->datum #{rest\ 574}#)
+                                ($sc-dispatch #{tmp\ 4206}# (quote ()))))
+                             #{args\ 4204}#))))
+                 (#{req\ 4100}# #{orig-args\ 4099}# (quote ())))))
+           (#{chi-simple-lambda\ 3841}#
+             (lambda (#{e\ 4232}#
+                      #{r\ 4233}#
+                      #{w\ 4234}#
+                      #{s\ 4235}#
+                      #{mod\ 4236}#
+                      #{req\ 4237}#
+                      #{rest\ 4238}#
+                      #{docstring\ 4239}#
+                      #{body\ 4240}#)
+               (let ((#{ids\ 4241}#
+                       (if #{rest\ 4238}#
+                         (append #{req\ 4237}# (list #{rest\ 4238}#))
+                         #{req\ 4237}#)))
+                 (let ((#{vars\ 4242}#
+                         (map #{gen-var\ 3845}# #{ids\ 4241}#)))
+                   (let ((#{labels\ 4243}#
+                           (#{gen-labels\ 3801}# #{ids\ 4241}#)))
+                     (#{build-simple-lambda\ 3769}#
+                       #{s\ 4235}#
+                       (map syntax->datum #{req\ 4237}#)
+                       (if #{rest\ 4238}#
+                         (syntax->datum #{rest\ 4238}#)
                          #f)
-                       #{vars\ 578}#
-                       #{docstring\ 575}#
-                       (#{chi-body\ 171}#
-                         #{body\ 576}#
-                         (#{source-wrap\ 160}#
-                           #{e\ 568}#
-                           #{w\ 570}#
-                           #{s\ 571}#
-                           #{mod\ 572}#)
-                         (#{extend-var-env\ 126}#
-                           #{labels\ 579}#
-                           #{vars\ 578}#
-                           #{r\ 569}#)
-                         (#{make-binding-wrap\ 148}#
-                           #{ids\ 577}#
-                           #{labels\ 579}#
-                           #{w\ 570}#)
-                         #{mod\ 572}#)))))))
-           (#{lambda-formals\ 176}#
-             (lambda (#{orig-args\ 580}#)
-               (letrec ((#{check\ 582}#
-                          (lambda (#{req\ 583}# #{rest\ 584}#)
-                            (if (#{distinct-bound-ids?\ 157}#
-                                  (if #{rest\ 584}#
-                                    (cons #{rest\ 584}# #{req\ 583}#)
-                                    #{req\ 583}#))
-                              (values #{req\ 583}# #f #{rest\ 584}# #f)
+                       #{vars\ 4242}#
+                       #{docstring\ 4239}#
+                       (#{chi-body\ 3835}#
+                         #{body\ 4240}#
+                         (#{source-wrap\ 3824}#
+                           #{e\ 4232}#
+                           #{w\ 4234}#
+                           #{s\ 4235}#
+                           #{mod\ 4236}#)
+                         (#{extend-var-env\ 3790}#
+                           #{labels\ 4243}#
+                           #{vars\ 4242}#
+                           #{r\ 4233}#)
+                         (#{make-binding-wrap\ 3812}#
+                           #{ids\ 4241}#
+                           #{labels\ 4243}#
+                           #{w\ 4234}#)
+                         #{mod\ 4236}#)))))))
+           (#{lambda-formals\ 3840}#
+             (lambda (#{orig-args\ 4244}#)
+               (letrec ((#{check\ 4246}#
+                          (lambda (#{req\ 4247}# #{rest\ 4248}#)
+                            (if (#{distinct-bound-ids?\ 3821}#
+                                  (if #{rest\ 4248}#
+                                    (cons #{rest\ 4248}# #{req\ 4247}#)
+                                    #{req\ 4247}#))
+                              (values #{req\ 4247}# #f #{rest\ 4248}# #f)
                               (syntax-violation
                                 'lambda
                                 "duplicate identifier in argument list"
-                                #{orig-args\ 580}#))))
-                        (#{req\ 581}#
-                          (lambda (#{args\ 585}# #{rreq\ 586}#)
-                            ((lambda (#{tmp\ 587}#)
-                               ((lambda (#{tmp\ 588}#)
-                                  (if #{tmp\ 588}#
+                                #{orig-args\ 4244}#))))
+                        (#{req\ 4245}#
+                          (lambda (#{args\ 4249}# #{rreq\ 4250}#)
+                            ((lambda (#{tmp\ 4251}#)
+                               ((lambda (#{tmp\ 4252}#)
+                                  (if #{tmp\ 4252}#
                                     (apply (lambda ()
-                                             (#{check\ 582}#
-                                               (reverse #{rreq\ 586}#)
+                                             (#{check\ 4246}#
+                                               (reverse #{rreq\ 4250}#)
                                                #f))
-                                           #{tmp\ 588}#)
-                                    ((lambda (#{tmp\ 589}#)
-                                       (if (if #{tmp\ 589}#
-                                             (apply (lambda (#{a\ 590}#
-                                                             #{b\ 591}#)
-                                                      (#{id?\ 131}#
-                                                        #{a\ 590}#))
-                                                    #{tmp\ 589}#)
+                                           #{tmp\ 4252}#)
+                                    ((lambda (#{tmp\ 4253}#)
+                                       (if (if #{tmp\ 4253}#
+                                             (apply (lambda (#{a\ 4254}#
+                                                             #{b\ 4255}#)
+                                                      (#{id?\ 3795}#
+                                                        #{a\ 4254}#))
+                                                    #{tmp\ 4253}#)
                                              #f)
-                                         (apply (lambda (#{a\ 592}# #{b\ 593}#)
-                                                  (#{req\ 581}#
-                                                    #{b\ 593}#
-                                                    (cons #{a\ 592}#
-                                                          #{rreq\ 586}#)))
-                                                #{tmp\ 589}#)
-                                         ((lambda (#{tmp\ 594}#)
-                                            (if (if #{tmp\ 594}#
-                                                  (apply (lambda (#{r\ 595}#)
-                                                           (#{id?\ 131}#
-                                                             #{r\ 595}#))
-                                                         #{tmp\ 594}#)
+                                         (apply (lambda (#{a\ 4256}#
+                                                         #{b\ 4257}#)
+                                                  (#{req\ 4245}#
+                                                    #{b\ 4257}#
+                                                    (cons #{a\ 4256}#
+                                                          #{rreq\ 4250}#)))
+                                                #{tmp\ 4253}#)
+                                         ((lambda (#{tmp\ 4258}#)
+                                            (if (if #{tmp\ 4258}#
+                                                  (apply (lambda (#{r\ 4259}#)
+                                                           (#{id?\ 3795}#
+                                                             #{r\ 4259}#))
+                                                         #{tmp\ 4258}#)
                                                   #f)
-                                              (apply (lambda (#{r\ 596}#)
-                                                       (#{check\ 582}#
+                                              (apply (lambda (#{r\ 4260}#)
+                                                       (#{check\ 4246}#
                                                          (reverse
-                                                           #{rreq\ 586}#)
-                                                         #{r\ 596}#))
-                                                     #{tmp\ 594}#)
-                                              ((lambda (#{else\ 597}#)
+                                                           #{rreq\ 4250}#)
+                                                         #{r\ 4260}#))
+                                                     #{tmp\ 4258}#)
+                                              ((lambda (#{else\ 4261}#)
                                                  (syntax-violation
                                                    'lambda
                                                    "invalid argument list"
-                                                   #{orig-args\ 580}#
-                                                   #{args\ 585}#))
-                                               #{tmp\ 587}#)))
-                                          (list #{tmp\ 587}#))))
+                                                   #{orig-args\ 4244}#
+                                                   #{args\ 4249}#))
+                                               #{tmp\ 4251}#)))
+                                          (list #{tmp\ 4251}#))))
                                      ($sc-dispatch
-                                       #{tmp\ 587}#
+                                       #{tmp\ 4251}#
                                        '(any . any)))))
-                                ($sc-dispatch #{tmp\ 587}# (quote ()))))
-                             #{args\ 585}#))))
-                 (#{req\ 581}# #{orig-args\ 580}# (quote ())))))
-           (#{ellipsis?\ 175}#
-             (lambda (#{x\ 598}#)
-               (if (#{nonsymbol-id?\ 130}# #{x\ 598}#)
-                 (#{free-id=?\ 154}#
-                   #{x\ 598}#
+                                ($sc-dispatch #{tmp\ 4251}# (quote ()))))
+                             #{args\ 4249}#))))
+                 (#{req\ 4245}# #{orig-args\ 4244}# (quote ())))))
+           (#{ellipsis?\ 3839}#
+             (lambda (#{x\ 4262}#)
+               (if (#{nonsymbol-id?\ 3794}# #{x\ 4262}#)
+                 (#{free-id=?\ 3818}#
+                   #{x\ 4262}#
                    '#(syntax-object
                       ...
                       ((top)
@@ -2307,1223 +2318,1243 @@
                          ("i" "i")))
                       (hygiene guile)))
                  #f)))
-           (#{chi-void\ 174}#
-             (lambda () (#{build-void\ 95}# #f)))
-           (#{eval-local-transformer\ 173}#
-             (lambda (#{expanded\ 599}# #{mod\ 600}#)
-               (let ((#{p\ 601}# (#{local-eval-hook\ 91}#
-                                   #{expanded\ 599}#
-                                   #{mod\ 600}#)))
-                 (if (procedure? #{p\ 601}#)
-                   #{p\ 601}#
+           (#{chi-void\ 3838}#
+             (lambda () (#{build-void\ 3759}# #f)))
+           (#{eval-local-transformer\ 3837}#
+             (lambda (#{expanded\ 4263}# #{mod\ 4264}#)
+               (let ((#{p\ 4265}#
+                       (#{local-eval-hook\ 3755}#
+                         #{expanded\ 4263}#
+                         #{mod\ 4264}#)))
+                 (if (procedure? #{p\ 4265}#)
+                   (cons #{p\ 4265}# (module-name (current-module)))
                    (syntax-violation
                      #f
                      "nonprocedure transformer"
-                     #{p\ 601}#)))))
-           (#{chi-local-syntax\ 172}#
-             (lambda (#{rec?\ 602}#
-                      #{e\ 603}#
-                      #{r\ 604}#
-                      #{w\ 605}#
-                      #{s\ 606}#
-                      #{mod\ 607}#
-                      #{k\ 608}#)
-               ((lambda (#{tmp\ 609}#)
-                  ((lambda (#{tmp\ 610}#)
-                     (if #{tmp\ 610}#
-                       (apply (lambda (#{_\ 611}#
-                                       #{id\ 612}#
-                                       #{val\ 613}#
-                                       #{e1\ 614}#
-                                       #{e2\ 615}#)
-                                (let ((#{ids\ 616}# #{id\ 612}#))
-                                  (if (not (#{valid-bound-ids?\ 156}#
-                                             #{ids\ 616}#))
+                     #{p\ 4265}#)))))
+           (#{chi-local-syntax\ 3836}#
+             (lambda (#{rec?\ 4266}#
+                      #{e\ 4267}#
+                      #{r\ 4268}#
+                      #{w\ 4269}#
+                      #{s\ 4270}#
+                      #{mod\ 4271}#
+                      #{k\ 4272}#)
+               ((lambda (#{tmp\ 4273}#)
+                  ((lambda (#{tmp\ 4274}#)
+                     (if #{tmp\ 4274}#
+                       (apply (lambda (#{_\ 4275}#
+                                       #{id\ 4276}#
+                                       #{val\ 4277}#
+                                       #{e1\ 4278}#
+                                       #{e2\ 4279}#)
+                                (let ((#{ids\ 4280}# #{id\ 4276}#))
+                                  (if (not (#{valid-bound-ids?\ 3820}#
+                                             #{ids\ 4280}#))
                                     (syntax-violation
                                       #f
                                       "duplicate bound keyword"
-                                      #{e\ 603}#)
-                                    (let ((#{labels\ 618}#
-                                            (#{gen-labels\ 137}#
-                                              #{ids\ 616}#)))
-                                      (let ((#{new-w\ 619}#
-                                              (#{make-binding-wrap\ 148}#
-                                                #{ids\ 616}#
-                                                #{labels\ 618}#
-                                                #{w\ 605}#)))
-                                        (#{k\ 608}# (cons #{e1\ 614}#
-                                                          #{e2\ 615}#)
-                                                    (#{extend-env\ 125}#
-                                                      #{labels\ 618}#
-                                                      (let ((#{w\ 621}# (if 
#{rec?\ 602}#
-                                                                          
#{new-w\ 619}#
-                                                                          #{w\ 
605}#))
-                                                            (#{trans-r\ 622}#
-                                                              
(#{macros-only-env\ 127}#
-                                                                #{r\ 604}#)))
-                                                        (map (lambda (#{x\ 
623}#)
-                                                               (cons 'macro
-                                                                     
(#{eval-local-transformer\ 173}#
-                                                                       (#{chi\ 
167}#
-                                                                         #{x\ 
623}#
-                                                                         
#{trans-r\ 622}#
-                                                                         #{w\ 
621}#
-                                                                         
#{mod\ 607}#)
-                                                                       #{mod\ 
607}#)))
-                                                             #{val\ 613}#))
-                                                      #{r\ 604}#)
-                                                    #{new-w\ 619}#
-                                                    #{s\ 606}#
-                                                    #{mod\ 607}#))))))
-                              #{tmp\ 610}#)
-                       ((lambda (#{_\ 625}#)
+                                      #{e\ 4267}#)
+                                    (let ((#{labels\ 4282}#
+                                            (#{gen-labels\ 3801}#
+                                              #{ids\ 4280}#)))
+                                      (let ((#{new-w\ 4283}#
+                                              (#{make-binding-wrap\ 3812}#
+                                                #{ids\ 4280}#
+                                                #{labels\ 4282}#
+                                                #{w\ 4269}#)))
+                                        (#{k\ 4272}#
+                                          (cons #{e1\ 4278}# #{e2\ 4279}#)
+                                          (#{extend-env\ 3789}#
+                                            #{labels\ 4282}#
+                                            (let ((#{w\ 4285}#
+                                                    (if #{rec?\ 4266}#
+                                                      #{new-w\ 4283}#
+                                                      #{w\ 4269}#))
+                                                  (#{trans-r\ 4286}#
+                                                    (#{macros-only-env\ 3791}#
+                                                      #{r\ 4268}#)))
+                                              (map (lambda (#{x\ 4287}#)
+                                                     (cons 'macro
+                                                           
(#{eval-local-transformer\ 3837}#
+                                                             (#{chi\ 3831}#
+                                                               #{x\ 4287}#
+                                                               #{trans-r\ 
4286}#
+                                                               #{w\ 4285}#
+                                                               #{mod\ 4271}#)
+                                                             #{mod\ 4271}#)))
+                                                   #{val\ 4277}#))
+                                            #{r\ 4268}#)
+                                          #{new-w\ 4283}#
+                                          #{s\ 4270}#
+                                          #{mod\ 4271}#))))))
+                              #{tmp\ 4274}#)
+                       ((lambda (#{_\ 4289}#)
                           (syntax-violation
                             #f
                             "bad local syntax definition"
-                            (#{source-wrap\ 160}#
-                              #{e\ 603}#
-                              #{w\ 605}#
-                              #{s\ 606}#
-                              #{mod\ 607}#)))
-                        #{tmp\ 609}#)))
+                            (#{source-wrap\ 3824}#
+                              #{e\ 4267}#
+                              #{w\ 4269}#
+                              #{s\ 4270}#
+                              #{mod\ 4271}#)))
+                        #{tmp\ 4273}#)))
                    ($sc-dispatch
-                     #{tmp\ 609}#
+                     #{tmp\ 4273}#
                      '(any #(each (any any)) any . each-any))))
-                #{e\ 603}#)))
-           (#{chi-body\ 171}#
-             (lambda (#{body\ 626}#
-                      #{outer-form\ 627}#
-                      #{r\ 628}#
-                      #{w\ 629}#
-                      #{mod\ 630}#)
-               (let ((#{r\ 631}# (cons '("placeholder" placeholder)
-                                       #{r\ 628}#)))
-                 (let ((#{ribcage\ 632}#
-                         (#{make-ribcage\ 138}#
+                #{e\ 4267}#)))
+           (#{chi-body\ 3835}#
+             (lambda (#{body\ 4290}#
+                      #{outer-form\ 4291}#
+                      #{r\ 4292}#
+                      #{w\ 4293}#
+                      #{mod\ 4294}#)
+               (let ((#{r\ 4295}#
+                       (cons '("placeholder" placeholder)
+                             #{r\ 4292}#)))
+                 (let ((#{ribcage\ 4296}#
+                         (#{make-ribcage\ 3802}#
                            '()
                            '()
                            '())))
-                   (let ((#{w\ 633}# (#{make-wrap\ 133}#
-                                       (#{wrap-marks\ 134}# #{w\ 629}#)
-                                       (cons #{ribcage\ 632}#
-                                             (#{wrap-subst\ 135}#
-                                               #{w\ 629}#)))))
-                     (letrec ((#{parse\ 634}#
-                                (lambda (#{body\ 635}#
-                                         #{ids\ 636}#
-                                         #{labels\ 637}#
-                                         #{var-ids\ 638}#
-                                         #{vars\ 639}#
-                                         #{vals\ 640}#
-                                         #{bindings\ 641}#)
-                                  (if (null? #{body\ 635}#)
+                   (let ((#{w\ 4297}#
+                           (#{make-wrap\ 3797}#
+                             (#{wrap-marks\ 3798}# #{w\ 4293}#)
+                             (cons #{ribcage\ 4296}#
+                                   (#{wrap-subst\ 3799}# #{w\ 4293}#)))))
+                     (letrec ((#{parse\ 4298}#
+                                (lambda (#{body\ 4299}#
+                                         #{ids\ 4300}#
+                                         #{labels\ 4301}#
+                                         #{var-ids\ 4302}#
+                                         #{vars\ 4303}#
+                                         #{vals\ 4304}#
+                                         #{bindings\ 4305}#)
+                                  (if (null? #{body\ 4299}#)
                                     (syntax-violation
                                       #f
                                       "no expressions in body"
-                                      #{outer-form\ 627}#)
-                                    (let ((#{e\ 643}# (cdar #{body\ 635}#))
-                                          (#{er\ 644}# (caar #{body\ 635}#)))
+                                      #{outer-form\ 4291}#)
+                                    (let ((#{e\ 4307}# (cdar #{body\ 4299}#))
+                                          (#{er\ 4308}# (caar #{body\ 4299}#)))
                                       (call-with-values
                                         (lambda ()
-                                          (#{syntax-type\ 165}#
-                                            #{e\ 643}#
-                                            #{er\ 644}#
+                                          (#{syntax-type\ 3829}#
+                                            #{e\ 4307}#
+                                            #{er\ 4308}#
                                             '(())
-                                            (#{source-annotation\ 122}#
-                                              #{er\ 644}#)
-                                            #{ribcage\ 632}#
-                                            #{mod\ 630}#
+                                            (#{source-annotation\ 3786}#
+                                              #{er\ 4308}#)
+                                            #{ribcage\ 4296}#
+                                            #{mod\ 4294}#
                                             #f))
-                                        (lambda (#{type\ 645}#
-                                                 #{value\ 646}#
-                                                 #{e\ 647}#
-                                                 #{w\ 648}#
-                                                 #{s\ 649}#
-                                                 #{mod\ 650}#)
-                                          (if (memv #{type\ 645}#
+                                        (lambda (#{type\ 4309}#
+                                                 #{value\ 4310}#
+                                                 #{e\ 4311}#
+                                                 #{w\ 4312}#
+                                                 #{s\ 4313}#
+                                                 #{mod\ 4314}#)
+                                          (if (memv #{type\ 4309}#
                                                     '(define-form))
-                                            (let ((#{id\ 651}#
-                                                    (#{wrap\ 159}#
-                                                      #{value\ 646}#
-                                                      #{w\ 648}#
-                                                      #{mod\ 650}#))
-                                                  (#{label\ 652}#
-                                                    (#{gen-label\ 136}#)))
-                                              (let ((#{var\ 653}#
-                                                      (#{gen-var\ 181}#
-                                                        #{id\ 651}#)))
+                                            (let ((#{id\ 4315}#
+                                                    (#{wrap\ 3823}#
+                                                      #{value\ 4310}#
+                                                      #{w\ 4312}#
+                                                      #{mod\ 4314}#))
+                                                  (#{label\ 4316}#
+                                                    (#{gen-label\ 3800}#)))
+                                              (let ((#{var\ 4317}#
+                                                      (#{gen-var\ 3845}#
+                                                        #{id\ 4315}#)))
                                                 (begin
-                                                  (#{extend-ribcage!\ 147}#
-                                                    #{ribcage\ 632}#
-                                                    #{id\ 651}#
-                                                    #{label\ 652}#)
-                                                  (#{parse\ 634}#
-                                                    (cdr #{body\ 635}#)
-                                                    (cons #{id\ 651}#
-                                                          #{ids\ 636}#)
-                                                    (cons #{label\ 652}#
-                                                          #{labels\ 637}#)
-                                                    (cons #{id\ 651}#
-                                                          #{var-ids\ 638}#)
-                                                    (cons #{var\ 653}#
-                                                          #{vars\ 639}#)
-                                                    (cons (cons #{er\ 644}#
-                                                                (#{wrap\ 159}#
-                                                                  #{e\ 647}#
-                                                                  #{w\ 648}#
-                                                                  #{mod\ 
650}#))
-                                                          #{vals\ 640}#)
+                                                  (#{extend-ribcage!\ 3811}#
+                                                    #{ribcage\ 4296}#
+                                                    #{id\ 4315}#
+                                                    #{label\ 4316}#)
+                                                  (#{parse\ 4298}#
+                                                    (cdr #{body\ 4299}#)
+                                                    (cons #{id\ 4315}#
+                                                          #{ids\ 4300}#)
+                                                    (cons #{label\ 4316}#
+                                                          #{labels\ 4301}#)
+                                                    (cons #{id\ 4315}#
+                                                          #{var-ids\ 4302}#)
+                                                    (cons #{var\ 4317}#
+                                                          #{vars\ 4303}#)
+                                                    (cons (cons #{er\ 4308}#
+                                                                (#{wrap\ 3823}#
+                                                                  #{e\ 4311}#
+                                                                  #{w\ 4312}#
+                                                                  #{mod\ 
4314}#))
+                                                          #{vals\ 4304}#)
                                                     (cons (cons 'lexical
-                                                                #{var\ 653}#)
-                                                          #{bindings\ 
641}#)))))
-                                            (if (memv #{type\ 645}#
+                                                                #{var\ 4317}#)
+                                                          #{bindings\ 
4305}#)))))
+                                            (if (memv #{type\ 4309}#
                                                       '(define-syntax-form))
-                                              (let ((#{id\ 654}#
-                                                      (#{wrap\ 159}#
-                                                        #{value\ 646}#
-                                                        #{w\ 648}#
-                                                        #{mod\ 650}#))
-                                                    (#{label\ 655}#
-                                                      (#{gen-label\ 136}#)))
+                                              (let ((#{id\ 4318}#
+                                                      (#{wrap\ 3823}#
+                                                        #{value\ 4310}#
+                                                        #{w\ 4312}#
+                                                        #{mod\ 4314}#))
+                                                    (#{label\ 4319}#
+                                                      (#{gen-label\ 3800}#)))
                                                 (begin
-                                                  (#{extend-ribcage!\ 147}#
-                                                    #{ribcage\ 632}#
-                                                    #{id\ 654}#
-                                                    #{label\ 655}#)
-                                                  (#{parse\ 634}#
-                                                    (cdr #{body\ 635}#)
-                                                    (cons #{id\ 654}#
-                                                          #{ids\ 636}#)
-                                                    (cons #{label\ 655}#
-                                                          #{labels\ 637}#)
-                                                    #{var-ids\ 638}#
-                                                    #{vars\ 639}#
-                                                    #{vals\ 640}#
+                                                  (#{extend-ribcage!\ 3811}#
+                                                    #{ribcage\ 4296}#
+                                                    #{id\ 4318}#
+                                                    #{label\ 4319}#)
+                                                  (#{parse\ 4298}#
+                                                    (cdr #{body\ 4299}#)
+                                                    (cons #{id\ 4318}#
+                                                          #{ids\ 4300}#)
+                                                    (cons #{label\ 4319}#
+                                                          #{labels\ 4301}#)
+                                                    #{var-ids\ 4302}#
+                                                    #{vars\ 4303}#
+                                                    #{vals\ 4304}#
                                                     (cons (cons 'macro
-                                                                (cons #{er\ 
644}#
-                                                                      (#{wrap\ 
159}#
-                                                                        #{e\ 
647}#
-                                                                        #{w\ 
648}#
-                                                                        #{mod\ 
650}#)))
-                                                          #{bindings\ 641}#))))
-                                              (if (memv #{type\ 645}#
+                                                                (cons #{er\ 
4308}#
+                                                                      (#{wrap\ 
3823}#
+                                                                        #{e\ 
4311}#
+                                                                        #{w\ 
4312}#
+                                                                        #{mod\ 
4314}#)))
+                                                          #{bindings\ 
4305}#))))
+                                              (if (memv #{type\ 4309}#
                                                         '(begin-form))
-                                                ((lambda (#{tmp\ 656}#)
-                                                   ((lambda (#{tmp\ 657}#)
-                                                      (if #{tmp\ 657}#
-                                                        (apply (lambda (#{_\ 
658}#
-                                                                        #{e1\ 
659}#)
-                                                                 (#{parse\ 
634}#
-                                                                   (letrec 
((#{f\ 660}# (lambda (#{forms\ 661}#)
-                                                                               
           (if (null? #{forms\ 661}#)
-                                                                               
             (cdr #{body\ 635}#)
-                                                                               
             (cons (cons #{er\ 644}#
-                                                                               
                         (#{wrap\ 159}#
-                                                                               
                           (car #{forms\ 661}#)
-                                                                               
                           #{w\ 648}#
-                                                                               
                           #{mod\ 650}#))
-                                                                               
                   (#{f\ 660}# (cdr #{forms\ 661}#)))))))
-                                                                     (#{f\ 
660}# #{e1\ 659}#))
-                                                                   #{ids\ 636}#
-                                                                   #{labels\ 
637}#
-                                                                   #{var-ids\ 
638}#
-                                                                   #{vars\ 
639}#
-                                                                   #{vals\ 
640}#
-                                                                   #{bindings\ 
641}#))
-                                                               #{tmp\ 657}#)
+                                                ((lambda (#{tmp\ 4320}#)
+                                                   ((lambda (#{tmp\ 4321}#)
+                                                      (if #{tmp\ 4321}#
+                                                        (apply (lambda (#{_\ 
4322}#
+                                                                        #{e1\ 
4323}#)
+                                                                 (#{parse\ 
4298}#
+                                                                   (letrec 
((#{f\ 4324}#
+                                                                              
(lambda (#{forms\ 4325}#)
+                                                                               
 (if (null? #{forms\ 4325}#)
+                                                                               
   (cdr #{body\ 4299}#)
+                                                                               
   (cons (cons #{er\ 4308}#
+                                                                               
               (#{wrap\ 3823}#
+                                                                               
                 (car #{forms\ 4325}#)
+                                                                               
                 #{w\ 4312}#
+                                                                               
                 #{mod\ 4314}#))
+                                                                               
         (#{f\ 4324}#
+                                                                               
           (cdr #{forms\ 4325}#)))))))
+                                                                     (#{f\ 
4324}#
+                                                                       #{e1\ 
4323}#))
+                                                                   #{ids\ 
4300}#
+                                                                   #{labels\ 
4301}#
+                                                                   #{var-ids\ 
4302}#
+                                                                   #{vars\ 
4303}#
+                                                                   #{vals\ 
4304}#
+                                                                   #{bindings\ 
4305}#))
+                                                               #{tmp\ 4321}#)
                                                         (syntax-violation
                                                           #f
                                                           "source expression 
failed to match any pattern"
-                                                          #{tmp\ 656}#)))
+                                                          #{tmp\ 4320}#)))
                                                     ($sc-dispatch
-                                                      #{tmp\ 656}#
+                                                      #{tmp\ 4320}#
                                                       '(any . each-any))))
-                                                 #{e\ 647}#)
-                                                (if (memv #{type\ 645}#
+                                                 #{e\ 4311}#)
+                                                (if (memv #{type\ 4309}#
                                                           '(local-syntax-form))
-                                                  (#{chi-local-syntax\ 172}#
-                                                    #{value\ 646}#
-                                                    #{e\ 647}#
-                                                    #{er\ 644}#
-                                                    #{w\ 648}#
-                                                    #{s\ 649}#
-                                                    #{mod\ 650}#
-                                                    (lambda (#{forms\ 663}#
-                                                             #{er\ 664}#
-                                                             #{w\ 665}#
-                                                             #{s\ 666}#
-                                                             #{mod\ 667}#)
-                                                      (#{parse\ 634}#
-                                                        (letrec ((#{f\ 668}# 
(lambda (#{forms\ 669}#)
-                                                                               
(if (null? #{forms\ 669}#)
-                                                                               
  (cdr #{body\ 635}#)
-                                                                               
  (cons (cons #{er\ 664}#
-                                                                               
              (#{wrap\ 159}#
-                                                                               
                (car #{forms\ 669}#)
-                                                                               
                #{w\ 665}#
-                                                                               
                #{mod\ 667}#))
-                                                                               
        (#{f\ 668}# (cdr #{forms\ 669}#)))))))
-                                                          (#{f\ 668}# #{forms\ 
663}#))
-                                                        #{ids\ 636}#
-                                                        #{labels\ 637}#
-                                                        #{var-ids\ 638}#
-                                                        #{vars\ 639}#
-                                                        #{vals\ 640}#
-                                                        #{bindings\ 641}#)))
-                                                  (if (null? #{ids\ 636}#)
-                                                    (#{build-sequence\ 110}#
+                                                  (#{chi-local-syntax\ 3836}#
+                                                    #{value\ 4310}#
+                                                    #{e\ 4311}#
+                                                    #{er\ 4308}#
+                                                    #{w\ 4312}#
+                                                    #{s\ 4313}#
+                                                    #{mod\ 4314}#
+                                                    (lambda (#{forms\ 4327}#
+                                                             #{er\ 4328}#
+                                                             #{w\ 4329}#
+                                                             #{s\ 4330}#
+                                                             #{mod\ 4331}#)
+                                                      (#{parse\ 4298}#
+                                                        (letrec ((#{f\ 4332}#
+                                                                   (lambda 
(#{forms\ 4333}#)
+                                                                     (if 
(null? #{forms\ 4333}#)
+                                                                       (cdr 
#{body\ 4299}#)
+                                                                       (cons 
(cons #{er\ 4328}#
+                                                                               
    (#{wrap\ 3823}#
+                                                                               
      (car #{forms\ 4333}#)
+                                                                               
      #{w\ 4329}#
+                                                                               
      #{mod\ 4331}#))
+                                                                             
(#{f\ 4332}#
+                                                                               
(cdr #{forms\ 4333}#)))))))
+                                                          (#{f\ 4332}#
+                                                            #{forms\ 4327}#))
+                                                        #{ids\ 4300}#
+                                                        #{labels\ 4301}#
+                                                        #{var-ids\ 4302}#
+                                                        #{vars\ 4303}#
+                                                        #{vals\ 4304}#
+                                                        #{bindings\ 4305}#)))
+                                                  (if (null? #{ids\ 4300}#)
+                                                    (#{build-sequence\ 3774}#
                                                       #f
-                                                      (map (lambda (#{x\ 670}#)
-                                                             (#{chi\ 167}#
-                                                               (cdr #{x\ 670}#)
-                                                               (car #{x\ 670}#)
+                                                      (map (lambda (#{x\ 
4334}#)
+                                                             (#{chi\ 3831}#
+                                                               (cdr #{x\ 
4334}#)
+                                                               (car #{x\ 
4334}#)
                                                                '(())
-                                                               #{mod\ 650}#))
-                                                           (cons (cons #{er\ 
644}#
-                                                                       
(#{source-wrap\ 160}#
-                                                                         #{e\ 
647}#
-                                                                         #{w\ 
648}#
-                                                                         #{s\ 
649}#
-                                                                         
#{mod\ 650}#))
-                                                                 (cdr #{body\ 
635}#))))
+                                                               #{mod\ 4314}#))
+                                                           (cons (cons #{er\ 
4308}#
+                                                                       
(#{source-wrap\ 3824}#
+                                                                         #{e\ 
4311}#
+                                                                         #{w\ 
4312}#
+                                                                         #{s\ 
4313}#
+                                                                         
#{mod\ 4314}#))
+                                                                 (cdr #{body\ 
4299}#))))
                                                     (begin
-                                                      (if (not 
(#{valid-bound-ids?\ 156}#
-                                                                 #{ids\ 636}#))
+                                                      (if (not 
(#{valid-bound-ids?\ 3820}#
+                                                                 #{ids\ 
4300}#))
                                                         (syntax-violation
                                                           #f
                                                           "invalid or 
duplicate identifier in definition"
-                                                          #{outer-form\ 627}#))
-                                                      (letrec ((#{loop\ 671}#
-                                                                 (lambda 
(#{bs\ 672}#
-                                                                          
#{er-cache\ 673}#
-                                                                          
#{r-cache\ 674}#)
-                                                                   (if (not 
(null? #{bs\ 672}#))
-                                                                     (let 
((#{b\ 675}# (car #{bs\ 672}#)))
-                                                                       (if 
(eq? (car #{b\ 675}#)
+                                                          #{outer-form\ 
4291}#))
+                                                      (letrec ((#{loop\ 4335}#
+                                                                 (lambda 
(#{bs\ 4336}#
+                                                                          
#{er-cache\ 4337}#
+                                                                          
#{r-cache\ 4338}#)
+                                                                   (if (not 
(null? #{bs\ 4336}#))
+                                                                     (let 
((#{b\ 4339}#
+                                                                             
(car #{bs\ 4336}#)))
+                                                                       (if 
(eq? (car #{b\ 4339}#)
                                                                                
 'macro)
-                                                                         (let 
((#{er\ 676}#
-                                                                               
  (cadr #{b\ 675}#)))
-                                                                           
(let ((#{r-cache\ 677}#
-                                                                               
    (if (eq? #{er\ 676}#
-                                                                               
             #{er-cache\ 673}#)
-                                                                               
      #{r-cache\ 674}#
-                                                                               
      (#{macros-only-env\ 127}#
-                                                                               
        #{er\ 676}#))))
+                                                                         (let 
((#{er\ 4340}#
+                                                                               
  (cadr #{b\ 4339}#)))
+                                                                           
(let ((#{r-cache\ 4341}#
+                                                                               
    (if (eq? #{er\ 4340}#
+                                                                               
             #{er-cache\ 4337}#)
+                                                                               
      #{r-cache\ 4338}#
+                                                                               
      (#{macros-only-env\ 3791}#
+                                                                               
        #{er\ 4340}#))))
                                                                              
(begin
                                                                                
(set-cdr!
-                                                                               
  #{b\ 675}#
-                                                                               
  (#{eval-local-transformer\ 173}#
-                                                                               
    (#{chi\ 167}#
-                                                                               
      (cddr #{b\ 675}#)
-                                                                               
      #{r-cache\ 677}#
+                                                                               
  #{b\ 4339}#
+                                                                               
  (#{eval-local-transformer\ 3837}#
+                                                                               
    (#{chi\ 3831}#
+                                                                               
      (cddr #{b\ 4339}#)
+                                                                               
      #{r-cache\ 4341}#
                                                                                
      '(())
-                                                                               
      #{mod\ 650}#)
-                                                                               
    #{mod\ 650}#))
-                                                                               
(#{loop\ 671}#
-                                                                               
  (cdr #{bs\ 672}#)
-                                                                               
  #{er\ 676}#
-                                                                               
  #{r-cache\ 677}#))))
-                                                                         
(#{loop\ 671}#
-                                                                           
(cdr #{bs\ 672}#)
-                                                                           
#{er-cache\ 673}#
-                                                                           
#{r-cache\ 674}#)))))))
-                                                        (#{loop\ 671}#
-                                                          #{bindings\ 641}#
+                                                                               
      #{mod\ 4314}#)
+                                                                               
    #{mod\ 4314}#))
+                                                                               
(#{loop\ 4335}#
+                                                                               
  (cdr #{bs\ 4336}#)
+                                                                               
  #{er\ 4340}#
+                                                                               
  #{r-cache\ 4341}#))))
+                                                                         
(#{loop\ 4335}#
+                                                                           
(cdr #{bs\ 4336}#)
+                                                                           
#{er-cache\ 4337}#
+                                                                           
#{r-cache\ 4338}#)))))))
+                                                        (#{loop\ 4335}#
+                                                          #{bindings\ 4305}#
                                                           #f
                                                           #f))
                                                       (set-cdr!
-                                                        #{r\ 631}#
-                                                        (#{extend-env\ 125}#
-                                                          #{labels\ 637}#
-                                                          #{bindings\ 641}#
-                                                          (cdr #{r\ 631}#)))
-                                                      (#{build-letrec\ 113}#
+                                                        #{r\ 4295}#
+                                                        (#{extend-env\ 3789}#
+                                                          #{labels\ 4301}#
+                                                          #{bindings\ 4305}#
+                                                          (cdr #{r\ 4295}#)))
+                                                      (#{build-letrec\ 3777}#
                                                         #f
                                                         (map syntax->datum
-                                                             #{var-ids\ 638}#)
-                                                        #{vars\ 639}#
-                                                        (map (lambda (#{x\ 
678}#)
-                                                               (#{chi\ 167}#
-                                                                 (cdr #{x\ 
678}#)
-                                                                 (car #{x\ 
678}#)
+                                                             #{var-ids\ 4302}#)
+                                                        #{vars\ 4303}#
+                                                        (map (lambda (#{x\ 
4342}#)
+                                                               (#{chi\ 3831}#
+                                                                 (cdr #{x\ 
4342}#)
+                                                                 (car #{x\ 
4342}#)
                                                                  '(())
-                                                                 #{mod\ 650}#))
-                                                             #{vals\ 640}#)
-                                                        (#{build-sequence\ 
110}#
+                                                                 #{mod\ 
4314}#))
+                                                             #{vals\ 4304}#)
+                                                        (#{build-sequence\ 
3774}#
                                                           #f
-                                                          (map (lambda (#{x\ 
679}#)
-                                                                 (#{chi\ 167}#
-                                                                   (cdr #{x\ 
679}#)
-                                                                   (car #{x\ 
679}#)
+                                                          (map (lambda (#{x\ 
4343}#)
+                                                                 (#{chi\ 3831}#
+                                                                   (cdr #{x\ 
4343}#)
+                                                                   (car #{x\ 
4343}#)
                                                                    '(())
-                                                                   #{mod\ 
650}#))
-                                                               (cons (cons 
#{er\ 644}#
-                                                                           
(#{source-wrap\ 160}#
-                                                                             
#{e\ 647}#
-                                                                             
#{w\ 648}#
-                                                                             
#{s\ 649}#
-                                                                             
#{mod\ 650}#))
-                                                                     (cdr 
#{body\ 635}#))))))))))))))))))
-                       (#{parse\ 634}#
-                         (map (lambda (#{x\ 642}#)
-                                (cons #{r\ 631}#
-                                      (#{wrap\ 159}#
-                                        #{x\ 642}#
-                                        #{w\ 633}#
-                                        #{mod\ 630}#)))
-                              #{body\ 626}#)
+                                                                   #{mod\ 
4314}#))
+                                                               (cons (cons 
#{er\ 4308}#
+                                                                           
(#{source-wrap\ 3824}#
+                                                                             
#{e\ 4311}#
+                                                                             
#{w\ 4312}#
+                                                                             
#{s\ 4313}#
+                                                                             
#{mod\ 4314}#))
+                                                                     (cdr 
#{body\ 4299}#))))))))))))))))))
+                       (#{parse\ 4298}#
+                         (map (lambda (#{x\ 4306}#)
+                                (cons #{r\ 4295}#
+                                      (#{wrap\ 3823}#
+                                        #{x\ 4306}#
+                                        #{w\ 4297}#
+                                        #{mod\ 4294}#)))
+                              #{body\ 4290}#)
                          '()
                          '()
                          '()
                          '()
                          '()
                          '())))))))
-           (#{chi-macro\ 170}#
-             (lambda (#{p\ 680}#
-                      #{e\ 681}#
-                      #{r\ 682}#
-                      #{w\ 683}#
-                      #{rib\ 684}#
-                      #{mod\ 685}#)
-               (letrec ((#{rebuild-macro-output\ 686}#
-                          (lambda (#{x\ 687}# #{m\ 688}#)
-                            (if (pair? #{x\ 687}#)
-                              (cons (#{rebuild-macro-output\ 686}#
-                                      (car #{x\ 687}#)
-                                      #{m\ 688}#)
-                                    (#{rebuild-macro-output\ 686}#
-                                      (cdr #{x\ 687}#)
-                                      #{m\ 688}#))
-                              (if (#{syntax-object?\ 115}# #{x\ 687}#)
-                                (let ((#{w\ 689}# (#{syntax-object-wrap\ 117}#
-                                                    #{x\ 687}#)))
-                                  (let ((#{ms\ 690}#
-                                          (#{wrap-marks\ 134}# #{w\ 689}#))
-                                        (#{s\ 691}# (#{wrap-subst\ 135}#
-                                                      #{w\ 689}#)))
-                                    (if (if (pair? #{ms\ 690}#)
-                                          (eq? (car #{ms\ 690}#) #f)
+           (#{chi-macro\ 3834}#
+             (lambda (#{p\ 4344}#
+                      #{e\ 4345}#
+                      #{r\ 4346}#
+                      #{w\ 4347}#
+                      #{rib\ 4348}#
+                      #{mod\ 4349}#)
+               (letrec ((#{rebuild-macro-output\ 4350}#
+                          (lambda (#{x\ 4351}# #{m\ 4352}#)
+                            (if (pair? #{x\ 4351}#)
+                              (cons (#{rebuild-macro-output\ 4350}#
+                                      (car #{x\ 4351}#)
+                                      #{m\ 4352}#)
+                                    (#{rebuild-macro-output\ 4350}#
+                                      (cdr #{x\ 4351}#)
+                                      #{m\ 4352}#))
+                              (if (#{syntax-object?\ 3779}# #{x\ 4351}#)
+                                (let ((#{w\ 4353}#
+                                        (#{syntax-object-wrap\ 3781}#
+                                          #{x\ 4351}#)))
+                                  (let ((#{ms\ 4354}#
+                                          (#{wrap-marks\ 3798}# #{w\ 4353}#))
+                                        (#{s\ 4355}#
+                                          (#{wrap-subst\ 3799}# #{w\ 4353}#)))
+                                    (if (if (pair? #{ms\ 4354}#)
+                                          (eq? (car #{ms\ 4354}#) #f)
                                           #f)
-                                      (#{make-syntax-object\ 114}#
-                                        (#{syntax-object-expression\ 116}#
-                                          #{x\ 687}#)
-                                        (#{make-wrap\ 133}#
-                                          (cdr #{ms\ 690}#)
-                                          (if #{rib\ 684}#
-                                            (cons #{rib\ 684}#
-                                                  (cdr #{s\ 691}#))
-                                            (cdr #{s\ 691}#)))
-                                        (#{syntax-object-module\ 118}#
-                                          #{x\ 687}#))
-                                      (#{make-syntax-object\ 114}#
-                                        (#{syntax-object-expression\ 116}#
-                                          #{x\ 687}#)
-                                        (#{make-wrap\ 133}#
-                                          (cons #{m\ 688}# #{ms\ 690}#)
-                                          (if #{rib\ 684}#
-                                            (cons #{rib\ 684}#
+                                      (#{make-syntax-object\ 3778}#
+                                        (#{syntax-object-expression\ 3780}#
+                                          #{x\ 4351}#)
+                                        (#{make-wrap\ 3797}#
+                                          (cdr #{ms\ 4354}#)
+                                          (if #{rib\ 4348}#
+                                            (cons #{rib\ 4348}#
+                                                  (cdr #{s\ 4355}#))
+                                            (cdr #{s\ 4355}#)))
+                                        (#{syntax-object-module\ 3782}#
+                                          #{x\ 4351}#))
+                                      (#{make-syntax-object\ 3778}#
+                                        (#{syntax-object-expression\ 3780}#
+                                          #{x\ 4351}#)
+                                        (#{make-wrap\ 3797}#
+                                          (cons #{m\ 4352}# #{ms\ 4354}#)
+                                          (if #{rib\ 4348}#
+                                            (cons #{rib\ 4348}#
                                                   (cons 'shift
-                                                        #{s\ 691}#))
-                                            (cons (quote shift) #{s\ 691}#)))
-                                        (let ((#{pmod\ 692}#
-                                                (procedure-module #{p\ 680}#)))
-                                          (if #{pmod\ 692}#
-                                            (cons 'hygiene
-                                                  (module-name #{pmod\ 692}#))
-                                            '(hygiene guile)))))))
-                                (if (vector? #{x\ 687}#)
-                                  (let ((#{n\ 693}# (vector-length
-                                                      #{x\ 687}#)))
-                                    (let ((#{v\ 694}# (make-vector
-                                                        #{n\ 693}#)))
-                                      (letrec ((#{loop\ 695}#
-                                                 (lambda (#{i\ 696}#)
-                                                   (if (#{fx=\ 88}#
-                                                         #{i\ 696}#
-                                                         #{n\ 693}#)
+                                                        #{s\ 4355}#))
+                                            (cons (quote shift) #{s\ 4355}#)))
+                                        (cons 'hygiene
+                                              (cdr #{p\ 4344}#))))))
+                                (if (vector? #{x\ 4351}#)
+                                  (let ((#{n\ 4356}#
+                                          (vector-length #{x\ 4351}#)))
+                                    (let ((#{v\ 4357}#
+                                            (make-vector #{n\ 4356}#)))
+                                      (letrec ((#{loop\ 4358}#
+                                                 (lambda (#{i\ 4359}#)
+                                                   (if (#{fx=\ 3752}#
+                                                         #{i\ 4359}#
+                                                         #{n\ 4356}#)
                                                      (begin
                                                        (if #f #f)
-                                                       #{v\ 694}#)
+                                                       #{v\ 4357}#)
                                                      (begin
                                                        (vector-set!
-                                                         #{v\ 694}#
-                                                         #{i\ 696}#
-                                                         
(#{rebuild-macro-output\ 686}#
+                                                         #{v\ 4357}#
+                                                         #{i\ 4359}#
+                                                         
(#{rebuild-macro-output\ 4350}#
                                                            (vector-ref
-                                                             #{x\ 687}#
-                                                             #{i\ 696}#)
-                                                           #{m\ 688}#))
-                                                       (#{loop\ 695}#
-                                                         (#{fx+\ 86}#
-                                                           #{i\ 696}#
+                                                             #{x\ 4351}#
+                                                             #{i\ 4359}#)
+                                                           #{m\ 4352}#))
+                                                       (#{loop\ 4358}#
+                                                         (#{fx+\ 3750}#
+                                                           #{i\ 4359}#
                                                            1)))))))
-                                        (#{loop\ 695}# 0))))
-                                  (if (symbol? #{x\ 687}#)
+                                        (#{loop\ 4358}# 0))))
+                                  (if (symbol? #{x\ 4351}#)
                                     (syntax-violation
                                       #f
                                       "encountered raw symbol in macro output"
-                                      (#{source-wrap\ 160}#
-                                        #{e\ 681}#
-                                        #{w\ 683}#
-                                        (#{wrap-subst\ 135}# #{w\ 683}#)
-                                        #{mod\ 685}#)
-                                      #{x\ 687}#)
-                                    #{x\ 687}#)))))))
-                 (#{rebuild-macro-output\ 686}#
-                   (#{p\ 680}# (#{wrap\ 159}#
-                                 #{e\ 681}#
-                                 (#{anti-mark\ 146}# #{w\ 683}#)
-                                 #{mod\ 685}#))
+                                      (#{source-wrap\ 3824}#
+                                        #{e\ 4345}#
+                                        #{w\ 4347}#
+                                        (#{wrap-subst\ 3799}# #{w\ 4347}#)
+                                        #{mod\ 4349}#)
+                                      #{x\ 4351}#)
+                                    #{x\ 4351}#)))))))
+                 (#{rebuild-macro-output\ 4350}#
+                   ((car #{p\ 4344}#)
+                    (#{wrap\ 3823}#
+                      #{e\ 4345}#
+                      (#{anti-mark\ 3810}# #{w\ 4347}#)
+                      #{mod\ 4349}#))
                    (string #\m)))))
-           (#{chi-application\ 169}#
-             (lambda (#{x\ 697}#
-                      #{e\ 698}#
-                      #{r\ 699}#
-                      #{w\ 700}#
-                      #{s\ 701}#
-                      #{mod\ 702}#)
-               ((lambda (#{tmp\ 703}#)
-                  ((lambda (#{tmp\ 704}#)
-                     (if #{tmp\ 704}#
-                       (apply (lambda (#{e0\ 705}# #{e1\ 706}#)
-                                (#{build-application\ 96}#
-                                  #{s\ 701}#
-                                  #{x\ 697}#
-                                  (map (lambda (#{e\ 707}#)
-                                         (#{chi\ 167}#
-                                           #{e\ 707}#
-                                           #{r\ 699}#
-                                           #{w\ 700}#
-                                           #{mod\ 702}#))
-                                       #{e1\ 706}#)))
-                              #{tmp\ 704}#)
+           (#{chi-application\ 3833}#
+             (lambda (#{x\ 4360}#
+                      #{e\ 4361}#
+                      #{r\ 4362}#
+                      #{w\ 4363}#
+                      #{s\ 4364}#
+                      #{mod\ 4365}#)
+               ((lambda (#{tmp\ 4366}#)
+                  ((lambda (#{tmp\ 4367}#)
+                     (if #{tmp\ 4367}#
+                       (apply (lambda (#{e0\ 4368}# #{e1\ 4369}#)
+                                (#{build-application\ 3760}#
+                                  #{s\ 4364}#
+                                  #{x\ 4360}#
+                                  (map (lambda (#{e\ 4370}#)
+                                         (#{chi\ 3831}#
+                                           #{e\ 4370}#
+                                           #{r\ 4362}#
+                                           #{w\ 4363}#
+                                           #{mod\ 4365}#))
+                                       #{e1\ 4369}#)))
+                              #{tmp\ 4367}#)
                        (syntax-violation
                          #f
                          "source expression failed to match any pattern"
-                         #{tmp\ 703}#)))
+                         #{tmp\ 4366}#)))
                    ($sc-dispatch
-                     #{tmp\ 703}#
+                     #{tmp\ 4366}#
                      '(any . each-any))))
-                #{e\ 698}#)))
-           (#{chi-expr\ 168}#
-             (lambda (#{type\ 709}#
-                      #{value\ 710}#
-                      #{e\ 711}#
-                      #{r\ 712}#
-                      #{w\ 713}#
-                      #{s\ 714}#
-                      #{mod\ 715}#)
-               (if (memv #{type\ 709}# (quote (lexical)))
-                 (#{build-lexical-reference\ 98}#
+                #{e\ 4361}#)))
+           (#{chi-expr\ 3832}#
+             (lambda (#{type\ 4372}#
+                      #{value\ 4373}#
+                      #{e\ 4374}#
+                      #{r\ 4375}#
+                      #{w\ 4376}#
+                      #{s\ 4377}#
+                      #{mod\ 4378}#)
+               (if (memv #{type\ 4372}# (quote (lexical)))
+                 (#{build-lexical-reference\ 3762}#
                    'value
-                   #{s\ 714}#
-                   #{e\ 711}#
-                   #{value\ 710}#)
-                 (if (memv #{type\ 709}# (quote (core core-form)))
-                   (#{value\ 710}#
-                     #{e\ 711}#
-                     #{r\ 712}#
-                     #{w\ 713}#
-                     #{s\ 714}#
-                     #{mod\ 715}#)
-                   (if (memv #{type\ 709}# (quote (module-ref)))
+                   #{s\ 4377}#
+                   #{e\ 4374}#
+                   #{value\ 4373}#)
+                 (if (memv #{type\ 4372}# (quote (core core-form)))
+                   (#{value\ 4373}#
+                     #{e\ 4374}#
+                     #{r\ 4375}#
+                     #{w\ 4376}#
+                     #{s\ 4377}#
+                     #{mod\ 4378}#)
+                   (if (memv #{type\ 4372}# (quote (module-ref)))
                      (call-with-values
-                       (lambda () (#{value\ 710}# #{e\ 711}#))
-                       (lambda (#{id\ 716}# #{mod\ 717}#)
-                         (#{build-global-reference\ 101}#
-                           #{s\ 714}#
-                           #{id\ 716}#
-                           #{mod\ 717}#)))
-                     (if (memv #{type\ 709}# (quote (lexical-call)))
-                       (#{chi-application\ 169}#
-                         (#{build-lexical-reference\ 98}#
+                       (lambda () (#{value\ 4373}# #{e\ 4374}#))
+                       (lambda (#{id\ 4379}# #{mod\ 4380}#)
+                         (#{build-global-reference\ 3765}#
+                           #{s\ 4377}#
+                           #{id\ 4379}#
+                           #{mod\ 4380}#)))
+                     (if (memv #{type\ 4372}# (quote (lexical-call)))
+                       (#{chi-application\ 3833}#
+                         (#{build-lexical-reference\ 3762}#
                            'fun
-                           (#{source-annotation\ 122}# (car #{e\ 711}#))
-                           (car #{e\ 711}#)
-                           #{value\ 710}#)
-                         #{e\ 711}#
-                         #{r\ 712}#
-                         #{w\ 713}#
-                         #{s\ 714}#
-                         #{mod\ 715}#)
-                       (if (memv #{type\ 709}# (quote (global-call)))
-                         (#{chi-application\ 169}#
-                           (#{build-global-reference\ 101}#
-                             (#{source-annotation\ 122}# (car #{e\ 711}#))
-                             (if (#{syntax-object?\ 115}# #{value\ 710}#)
-                               (#{syntax-object-expression\ 116}#
-                                 #{value\ 710}#)
-                               #{value\ 710}#)
-                             (if (#{syntax-object?\ 115}# #{value\ 710}#)
-                               (#{syntax-object-module\ 118}# #{value\ 710}#)
-                               #{mod\ 715}#))
-                           #{e\ 711}#
-                           #{r\ 712}#
-                           #{w\ 713}#
-                           #{s\ 714}#
-                           #{mod\ 715}#)
-                         (if (memv #{type\ 709}# (quote (constant)))
-                           (#{build-data\ 109}#
-                             #{s\ 714}#
-                             (#{strip\ 180}#
-                               (#{source-wrap\ 160}#
-                                 #{e\ 711}#
-                                 #{w\ 713}#
-                                 #{s\ 714}#
-                                 #{mod\ 715}#)
+                           (#{source-annotation\ 3786}# (car #{e\ 4374}#))
+                           (car #{e\ 4374}#)
+                           #{value\ 4373}#)
+                         #{e\ 4374}#
+                         #{r\ 4375}#
+                         #{w\ 4376}#
+                         #{s\ 4377}#
+                         #{mod\ 4378}#)
+                       (if (memv #{type\ 4372}# (quote (global-call)))
+                         (#{chi-application\ 3833}#
+                           (#{build-global-reference\ 3765}#
+                             (#{source-annotation\ 3786}# (car #{e\ 4374}#))
+                             (if (#{syntax-object?\ 3779}# #{value\ 4373}#)
+                               (#{syntax-object-expression\ 3780}#
+                                 #{value\ 4373}#)
+                               #{value\ 4373}#)
+                             (if (#{syntax-object?\ 3779}# #{value\ 4373}#)
+                               (#{syntax-object-module\ 3782}# #{value\ 4373}#)
+                               #{mod\ 4378}#))
+                           #{e\ 4374}#
+                           #{r\ 4375}#
+                           #{w\ 4376}#
+                           #{s\ 4377}#
+                           #{mod\ 4378}#)
+                         (if (memv #{type\ 4372}# (quote (constant)))
+                           (#{build-data\ 3773}#
+                             #{s\ 4377}#
+                             (#{strip\ 3844}#
+                               (#{source-wrap\ 3824}#
+                                 #{e\ 4374}#
+                                 #{w\ 4376}#
+                                 #{s\ 4377}#
+                                 #{mod\ 4378}#)
                                '(())))
-                           (if (memv #{type\ 709}# (quote (global)))
-                             (#{build-global-reference\ 101}#
-                               #{s\ 714}#
-                               #{value\ 710}#
-                               #{mod\ 715}#)
-                             (if (memv #{type\ 709}# (quote (call)))
-                               (#{chi-application\ 169}#
-                                 (#{chi\ 167}#
-                                   (car #{e\ 711}#)
-                                   #{r\ 712}#
-                                   #{w\ 713}#
-                                   #{mod\ 715}#)
-                                 #{e\ 711}#
-                                 #{r\ 712}#
-                                 #{w\ 713}#
-                                 #{s\ 714}#
-                                 #{mod\ 715}#)
-                               (if (memv #{type\ 709}# (quote (begin-form)))
-                                 ((lambda (#{tmp\ 718}#)
-                                    ((lambda (#{tmp\ 719}#)
-                                       (if #{tmp\ 719}#
-                                         (apply (lambda (#{_\ 720}#
-                                                         #{e1\ 721}#
-                                                         #{e2\ 722}#)
-                                                  (#{chi-sequence\ 161}#
-                                                    (cons #{e1\ 721}#
-                                                          #{e2\ 722}#)
-                                                    #{r\ 712}#
-                                                    #{w\ 713}#
-                                                    #{s\ 714}#
-                                                    #{mod\ 715}#))
-                                                #{tmp\ 719}#)
+                           (if (memv #{type\ 4372}# (quote (global)))
+                             (#{build-global-reference\ 3765}#
+                               #{s\ 4377}#
+                               #{value\ 4373}#
+                               #{mod\ 4378}#)
+                             (if (memv #{type\ 4372}# (quote (call)))
+                               (#{chi-application\ 3833}#
+                                 (#{chi\ 3831}#
+                                   (car #{e\ 4374}#)
+                                   #{r\ 4375}#
+                                   #{w\ 4376}#
+                                   #{mod\ 4378}#)
+                                 #{e\ 4374}#
+                                 #{r\ 4375}#
+                                 #{w\ 4376}#
+                                 #{s\ 4377}#
+                                 #{mod\ 4378}#)
+                               (if (memv #{type\ 4372}# (quote (begin-form)))
+                                 ((lambda (#{tmp\ 4381}#)
+                                    ((lambda (#{tmp\ 4382}#)
+                                       (if #{tmp\ 4382}#
+                                         (apply (lambda (#{_\ 4383}#
+                                                         #{e1\ 4384}#
+                                                         #{e2\ 4385}#)
+                                                  (#{chi-sequence\ 3825}#
+                                                    (cons #{e1\ 4384}#
+                                                          #{e2\ 4385}#)
+                                                    #{r\ 4375}#
+                                                    #{w\ 4376}#
+                                                    #{s\ 4377}#
+                                                    #{mod\ 4378}#))
+                                                #{tmp\ 4382}#)
                                          (syntax-violation
                                            #f
                                            "source expression failed to match 
any pattern"
-                                           #{tmp\ 718}#)))
+                                           #{tmp\ 4381}#)))
                                      ($sc-dispatch
-                                       #{tmp\ 718}#
+                                       #{tmp\ 4381}#
                                        '(any any . each-any))))
-                                  #{e\ 711}#)
-                                 (if (memv #{type\ 709}#
+                                  #{e\ 4374}#)
+                                 (if (memv #{type\ 4372}#
                                            '(local-syntax-form))
-                                   (#{chi-local-syntax\ 172}#
-                                     #{value\ 710}#
-                                     #{e\ 711}#
-                                     #{r\ 712}#
-                                     #{w\ 713}#
-                                     #{s\ 714}#
-                                     #{mod\ 715}#
-                                     #{chi-sequence\ 161}#)
-                                   (if (memv #{type\ 709}#
+                                   (#{chi-local-syntax\ 3836}#
+                                     #{value\ 4373}#
+                                     #{e\ 4374}#
+                                     #{r\ 4375}#
+                                     #{w\ 4376}#
+                                     #{s\ 4377}#
+                                     #{mod\ 4378}#
+                                     #{chi-sequence\ 3825}#)
+                                   (if (memv #{type\ 4372}#
                                              '(eval-when-form))
-                                     ((lambda (#{tmp\ 724}#)
-                                        ((lambda (#{tmp\ 725}#)
-                                           (if #{tmp\ 725}#
-                                             (apply (lambda (#{_\ 726}#
-                                                             #{x\ 727}#
-                                                             #{e1\ 728}#
-                                                             #{e2\ 729}#)
-                                                      (let ((#{when-list\ 730}#
-                                                              
(#{chi-when-list\ 164}#
-                                                                #{e\ 711}#
-                                                                #{x\ 727}#
-                                                                #{w\ 713}#)))
+                                     ((lambda (#{tmp\ 4387}#)
+                                        ((lambda (#{tmp\ 4388}#)
+                                           (if #{tmp\ 4388}#
+                                             (apply (lambda (#{_\ 4389}#
+                                                             #{x\ 4390}#
+                                                             #{e1\ 4391}#
+                                                             #{e2\ 4392}#)
+                                                      (let ((#{when-list\ 
4393}#
+                                                              
(#{chi-when-list\ 3828}#
+                                                                #{e\ 4374}#
+                                                                #{x\ 4390}#
+                                                                #{w\ 4376}#)))
                                                         (if (memq 'eval
-                                                                  #{when-list\ 
730}#)
-                                                          (#{chi-sequence\ 
161}#
-                                                            (cons #{e1\ 728}#
-                                                                  #{e2\ 729}#)
-                                                            #{r\ 712}#
-                                                            #{w\ 713}#
-                                                            #{s\ 714}#
-                                                            #{mod\ 715}#)
-                                                          (#{chi-void\ 
174}#))))
-                                                    #{tmp\ 725}#)
+                                                                  #{when-list\ 
4393}#)
+                                                          (#{chi-sequence\ 
3825}#
+                                                            (cons #{e1\ 4391}#
+                                                                  #{e2\ 4392}#)
+                                                            #{r\ 4375}#
+                                                            #{w\ 4376}#
+                                                            #{s\ 4377}#
+                                                            #{mod\ 4378}#)
+                                                          (#{chi-void\ 
3838}#))))
+                                                    #{tmp\ 4388}#)
                                              (syntax-violation
                                                #f
                                                "source expression failed to 
match any pattern"
-                                               #{tmp\ 724}#)))
+                                               #{tmp\ 4387}#)))
                                          ($sc-dispatch
-                                           #{tmp\ 724}#
+                                           #{tmp\ 4387}#
                                            '(any each-any any . each-any))))
-                                      #{e\ 711}#)
-                                     (if (memv #{type\ 709}#
+                                      #{e\ 4374}#)
+                                     (if (memv #{type\ 4372}#
                                                '(define-form
                                                   define-syntax-form))
                                        (syntax-violation
                                          #f
                                          "definition in expression context"
-                                         #{e\ 711}#
-                                         (#{wrap\ 159}#
-                                           #{value\ 710}#
-                                           #{w\ 713}#
-                                           #{mod\ 715}#))
-                                       (if (memv #{type\ 709}#
+                                         #{e\ 4374}#
+                                         (#{wrap\ 3823}#
+                                           #{value\ 4373}#
+                                           #{w\ 4376}#
+                                           #{mod\ 4378}#))
+                                       (if (memv #{type\ 4372}#
                                                  '(syntax))
                                          (syntax-violation
                                            #f
                                            "reference to pattern variable 
outside syntax form"
-                                           (#{source-wrap\ 160}#
-                                             #{e\ 711}#
-                                             #{w\ 713}#
-                                             #{s\ 714}#
-                                             #{mod\ 715}#))
-                                         (if (memv #{type\ 709}#
+                                           (#{source-wrap\ 3824}#
+                                             #{e\ 4374}#
+                                             #{w\ 4376}#
+                                             #{s\ 4377}#
+                                             #{mod\ 4378}#))
+                                         (if (memv #{type\ 4372}#
                                                    '(displaced-lexical))
                                            (syntax-violation
                                              #f
                                              "reference to identifier outside 
its scope"
-                                             (#{source-wrap\ 160}#
-                                               #{e\ 711}#
-                                               #{w\ 713}#
-                                               #{s\ 714}#
-                                               #{mod\ 715}#))
+                                             (#{source-wrap\ 3824}#
+                                               #{e\ 4374}#
+                                               #{w\ 4376}#
+                                               #{s\ 4377}#
+                                               #{mod\ 4378}#))
                                            (syntax-violation
                                              #f
                                              "unexpected syntax"
-                                             (#{source-wrap\ 160}#
-                                               #{e\ 711}#
-                                               #{w\ 713}#
-                                               #{s\ 714}#
-                                               #{mod\ 715}#))))))))))))))))))
-           (#{chi\ 167}#
-             (lambda (#{e\ 733}# #{r\ 734}# #{w\ 735}# #{mod\ 736}#)
+                                             (#{source-wrap\ 3824}#
+                                               #{e\ 4374}#
+                                               #{w\ 4376}#
+                                               #{s\ 4377}#
+                                               #{mod\ 4378}#))))))))))))))))))
+           (#{chi\ 3831}#
+             (lambda (#{e\ 4396}#
+                      #{r\ 4397}#
+                      #{w\ 4398}#
+                      #{mod\ 4399}#)
                (call-with-values
                  (lambda ()
-                   (#{syntax-type\ 165}#
-                     #{e\ 733}#
-                     #{r\ 734}#
-                     #{w\ 735}#
-                     (#{source-annotation\ 122}# #{e\ 733}#)
+                   (#{syntax-type\ 3829}#
+                     #{e\ 4396}#
+                     #{r\ 4397}#
+                     #{w\ 4398}#
+                     (#{source-annotation\ 3786}# #{e\ 4396}#)
                      #f
-                     #{mod\ 736}#
+                     #{mod\ 4399}#
                      #f))
-                 (lambda (#{type\ 737}#
-                          #{value\ 738}#
-                          #{e\ 739}#
-                          #{w\ 740}#
-                          #{s\ 741}#
-                          #{mod\ 742}#)
-                   (#{chi-expr\ 168}#
-                     #{type\ 737}#
-                     #{value\ 738}#
-                     #{e\ 739}#
-                     #{r\ 734}#
-                     #{w\ 740}#
-                     #{s\ 741}#
-                     #{mod\ 742}#)))))
-           (#{chi-top\ 166}#
-             (lambda (#{e\ 743}#
-                      #{r\ 744}#
-                      #{w\ 745}#
-                      #{m\ 746}#
-                      #{esew\ 747}#
-                      #{mod\ 748}#)
+                 (lambda (#{type\ 4400}#
+                          #{value\ 4401}#
+                          #{e\ 4402}#
+                          #{w\ 4403}#
+                          #{s\ 4404}#
+                          #{mod\ 4405}#)
+                   (#{chi-expr\ 3832}#
+                     #{type\ 4400}#
+                     #{value\ 4401}#
+                     #{e\ 4402}#
+                     #{r\ 4397}#
+                     #{w\ 4403}#
+                     #{s\ 4404}#
+                     #{mod\ 4405}#)))))
+           (#{chi-top\ 3830}#
+             (lambda (#{e\ 4406}#
+                      #{r\ 4407}#
+                      #{w\ 4408}#
+                      #{m\ 4409}#
+                      #{esew\ 4410}#
+                      #{mod\ 4411}#)
                (call-with-values
                  (lambda ()
-                   (#{syntax-type\ 165}#
-                     #{e\ 743}#
-                     #{r\ 744}#
-                     #{w\ 745}#
-                     (#{source-annotation\ 122}# #{e\ 743}#)
+                   (#{syntax-type\ 3829}#
+                     #{e\ 4406}#
+                     #{r\ 4407}#
+                     #{w\ 4408}#
+                     (#{source-annotation\ 3786}# #{e\ 4406}#)
                      #f
-                     #{mod\ 748}#
+                     #{mod\ 4411}#
                      #f))
-                 (lambda (#{type\ 756}#
-                          #{value\ 757}#
-                          #{e\ 758}#
-                          #{w\ 759}#
-                          #{s\ 760}#
-                          #{mod\ 761}#)
-                   (if (memv #{type\ 756}# (quote (begin-form)))
-                     ((lambda (#{tmp\ 762}#)
-                        ((lambda (#{tmp\ 763}#)
-                           (if #{tmp\ 763}#
-                             (apply (lambda (#{_\ 764}#) (#{chi-void\ 174}#))
-                                    #{tmp\ 763}#)
-                             ((lambda (#{tmp\ 765}#)
-                                (if #{tmp\ 765}#
-                                  (apply (lambda (#{_\ 766}#
-                                                  #{e1\ 767}#
-                                                  #{e2\ 768}#)
-                                           (#{chi-top-sequence\ 162}#
-                                             (cons #{e1\ 767}# #{e2\ 768}#)
-                                             #{r\ 744}#
-                                             #{w\ 759}#
-                                             #{s\ 760}#
-                                             #{m\ 746}#
-                                             #{esew\ 747}#
-                                             #{mod\ 761}#))
-                                         #{tmp\ 765}#)
+                 (lambda (#{type\ 4419}#
+                          #{value\ 4420}#
+                          #{e\ 4421}#
+                          #{w\ 4422}#
+                          #{s\ 4423}#
+                          #{mod\ 4424}#)
+                   (if (memv #{type\ 4419}# (quote (begin-form)))
+                     ((lambda (#{tmp\ 4425}#)
+                        ((lambda (#{tmp\ 4426}#)
+                           (if #{tmp\ 4426}#
+                             (apply (lambda (#{_\ 4427}#) (#{chi-void\ 3838}#))
+                                    #{tmp\ 4426}#)
+                             ((lambda (#{tmp\ 4428}#)
+                                (if #{tmp\ 4428}#
+                                  (apply (lambda (#{_\ 4429}#
+                                                  #{e1\ 4430}#
+                                                  #{e2\ 4431}#)
+                                           (#{chi-top-sequence\ 3826}#
+                                             (cons #{e1\ 4430}# #{e2\ 4431}#)
+                                             #{r\ 4407}#
+                                             #{w\ 4422}#
+                                             #{s\ 4423}#
+                                             #{m\ 4409}#
+                                             #{esew\ 4410}#
+                                             #{mod\ 4424}#))
+                                         #{tmp\ 4428}#)
                                   (syntax-violation
                                     #f
                                     "source expression failed to match any 
pattern"
-                                    #{tmp\ 762}#)))
+                                    #{tmp\ 4425}#)))
                               ($sc-dispatch
-                                #{tmp\ 762}#
+                                #{tmp\ 4425}#
                                 '(any any . each-any)))))
-                         ($sc-dispatch #{tmp\ 762}# (quote (any)))))
-                      #{e\ 758}#)
-                     (if (memv #{type\ 756}# (quote (local-syntax-form)))
-                       (#{chi-local-syntax\ 172}#
-                         #{value\ 757}#
-                         #{e\ 758}#
-                         #{r\ 744}#
-                         #{w\ 759}#
-                         #{s\ 760}#
-                         #{mod\ 761}#
-                         (lambda (#{body\ 770}#
-                                  #{r\ 771}#
-                                  #{w\ 772}#
-                                  #{s\ 773}#
-                                  #{mod\ 774}#)
-                           (#{chi-top-sequence\ 162}#
-                             #{body\ 770}#
-                             #{r\ 771}#
-                             #{w\ 772}#
-                             #{s\ 773}#
-                             #{m\ 746}#
-                             #{esew\ 747}#
-                             #{mod\ 774}#)))
-                       (if (memv #{type\ 756}# (quote (eval-when-form)))
-                         ((lambda (#{tmp\ 775}#)
-                            ((lambda (#{tmp\ 776}#)
-                               (if #{tmp\ 776}#
-                                 (apply (lambda (#{_\ 777}#
-                                                 #{x\ 778}#
-                                                 #{e1\ 779}#
-                                                 #{e2\ 780}#)
-                                          (let ((#{when-list\ 781}#
-                                                  (#{chi-when-list\ 164}#
-                                                    #{e\ 758}#
-                                                    #{x\ 778}#
-                                                    #{w\ 759}#))
-                                                (#{body\ 782}#
-                                                  (cons #{e1\ 779}#
-                                                        #{e2\ 780}#)))
-                                            (if (eq? #{m\ 746}# (quote e))
+                         ($sc-dispatch #{tmp\ 4425}# (quote (any)))))
+                      #{e\ 4421}#)
+                     (if (memv #{type\ 4419}# (quote (local-syntax-form)))
+                       (#{chi-local-syntax\ 3836}#
+                         #{value\ 4420}#
+                         #{e\ 4421}#
+                         #{r\ 4407}#
+                         #{w\ 4422}#
+                         #{s\ 4423}#
+                         #{mod\ 4424}#
+                         (lambda (#{body\ 4433}#
+                                  #{r\ 4434}#
+                                  #{w\ 4435}#
+                                  #{s\ 4436}#
+                                  #{mod\ 4437}#)
+                           (#{chi-top-sequence\ 3826}#
+                             #{body\ 4433}#
+                             #{r\ 4434}#
+                             #{w\ 4435}#
+                             #{s\ 4436}#
+                             #{m\ 4409}#
+                             #{esew\ 4410}#
+                             #{mod\ 4437}#)))
+                       (if (memv #{type\ 4419}# (quote (eval-when-form)))
+                         ((lambda (#{tmp\ 4438}#)
+                            ((lambda (#{tmp\ 4439}#)
+                               (if #{tmp\ 4439}#
+                                 (apply (lambda (#{_\ 4440}#
+                                                 #{x\ 4441}#
+                                                 #{e1\ 4442}#
+                                                 #{e2\ 4443}#)
+                                          (let ((#{when-list\ 4444}#
+                                                  (#{chi-when-list\ 3828}#
+                                                    #{e\ 4421}#
+                                                    #{x\ 4441}#
+                                                    #{w\ 4422}#))
+                                                (#{body\ 4445}#
+                                                  (cons #{e1\ 4442}#
+                                                        #{e2\ 4443}#)))
+                                            (if (eq? #{m\ 4409}# (quote e))
                                               (if (memq 'eval
-                                                        #{when-list\ 781}#)
-                                                (#{chi-top-sequence\ 162}#
-                                                  #{body\ 782}#
-                                                  #{r\ 744}#
-                                                  #{w\ 759}#
-                                                  #{s\ 760}#
+                                                        #{when-list\ 4444}#)
+                                                (#{chi-top-sequence\ 3826}#
+                                                  #{body\ 4445}#
+                                                  #{r\ 4407}#
+                                                  #{w\ 4422}#
+                                                  #{s\ 4423}#
                                                   'e
                                                   '(eval)
-                                                  #{mod\ 761}#)
-                                                (#{chi-void\ 174}#))
+                                                  #{mod\ 4424}#)
+                                                (#{chi-void\ 3838}#))
                                               (if (memq 'load
-                                                        #{when-list\ 781}#)
-                                                (if (let ((#{t\ 785}# (memq 
'compile
-                                                                            
#{when-list\ 781}#)))
-                                                      (if #{t\ 785}#
-                                                        #{t\ 785}#
-                                                        (if (eq? #{m\ 746}#
+                                                        #{when-list\ 4444}#)
+                                                (if (let ((#{t\ 4448}#
+                                                            (memq 'compile
+                                                                  #{when-list\ 
4444}#)))
+                                                      (if #{t\ 4448}#
+                                                        #{t\ 4448}#
+                                                        (if (eq? #{m\ 4409}#
                                                                  'c&e)
                                                           (memq 'eval
-                                                                #{when-list\ 
781}#)
+                                                                #{when-list\ 
4444}#)
                                                           #f)))
-                                                  (#{chi-top-sequence\ 162}#
-                                                    #{body\ 782}#
-                                                    #{r\ 744}#
-                                                    #{w\ 759}#
-                                                    #{s\ 760}#
+                                                  (#{chi-top-sequence\ 3826}#
+                                                    #{body\ 4445}#
+                                                    #{r\ 4407}#
+                                                    #{w\ 4422}#
+                                                    #{s\ 4423}#
                                                     'c&e
                                                     '(compile load)
-                                                    #{mod\ 761}#)
-                                                  (if (memq #{m\ 746}#
+                                                    #{mod\ 4424}#)
+                                                  (if (memq #{m\ 4409}#
                                                             '(c c&e))
-                                                    (#{chi-top-sequence\ 162}#
-                                                      #{body\ 782}#
-                                                      #{r\ 744}#
-                                                      #{w\ 759}#
-                                                      #{s\ 760}#
+                                                    (#{chi-top-sequence\ 3826}#
+                                                      #{body\ 4445}#
+                                                      #{r\ 4407}#
+                                                      #{w\ 4422}#
+                                                      #{s\ 4423}#
                                                       'c
                                                       '(load)
-                                                      #{mod\ 761}#)
-                                                    (#{chi-void\ 174}#)))
-                                                (if (let ((#{t\ 786}# (memq 
'compile
-                                                                            
#{when-list\ 781}#)))
-                                                      (if #{t\ 786}#
-                                                        #{t\ 786}#
-                                                        (if (eq? #{m\ 746}#
+                                                      #{mod\ 4424}#)
+                                                    (#{chi-void\ 3838}#)))
+                                                (if (let ((#{t\ 4449}#
+                                                            (memq 'compile
+                                                                  #{when-list\ 
4444}#)))
+                                                      (if #{t\ 4449}#
+                                                        #{t\ 4449}#
+                                                        (if (eq? #{m\ 4409}#
                                                                  'c&e)
                                                           (memq 'eval
-                                                                #{when-list\ 
781}#)
+                                                                #{when-list\ 
4444}#)
                                                           #f)))
                                                   (begin
-                                                    (#{top-level-eval-hook\ 
90}#
-                                                      (#{chi-top-sequence\ 
162}#
-                                                        #{body\ 782}#
-                                                        #{r\ 744}#
-                                                        #{w\ 759}#
-                                                        #{s\ 760}#
+                                                    (#{top-level-eval-hook\ 
3754}#
+                                                      (#{chi-top-sequence\ 
3826}#
+                                                        #{body\ 4445}#
+                                                        #{r\ 4407}#
+                                                        #{w\ 4422}#
+                                                        #{s\ 4423}#
                                                         'e
                                                         '(eval)
-                                                        #{mod\ 761}#)
-                                                      #{mod\ 761}#)
-                                                    (#{chi-void\ 174}#))
-                                                  (#{chi-void\ 174}#))))))
-                                        #{tmp\ 776}#)
+                                                        #{mod\ 4424}#)
+                                                      #{mod\ 4424}#)
+                                                    (#{chi-void\ 3838}#))
+                                                  (#{chi-void\ 3838}#))))))
+                                        #{tmp\ 4439}#)
                                  (syntax-violation
                                    #f
                                    "source expression failed to match any 
pattern"
-                                   #{tmp\ 775}#)))
+                                   #{tmp\ 4438}#)))
                              ($sc-dispatch
-                               #{tmp\ 775}#
+                               #{tmp\ 4438}#
                                '(any each-any any . each-any))))
-                          #{e\ 758}#)
-                         (if (memv #{type\ 756}# (quote (define-syntax-form)))
-                           (let ((#{n\ 787}# (#{id-var-name\ 153}#
-                                               #{value\ 757}#
-                                               #{w\ 759}#))
-                                 (#{r\ 788}# (#{macros-only-env\ 127}#
-                                               #{r\ 744}#)))
-                             (if (memv #{m\ 746}# (quote (c)))
-                               (if (memq (quote compile) #{esew\ 747}#)
-                                 (let ((#{e\ 789}# (#{chi-install-global\ 163}#
-                                                     #{n\ 787}#
-                                                     (#{chi\ 167}#
-                                                       #{e\ 758}#
-                                                       #{r\ 788}#
-                                                       #{w\ 759}#
-                                                       #{mod\ 761}#))))
+                          #{e\ 4421}#)
+                         (if (memv #{type\ 4419}#
+                                   '(define-syntax-form))
+                           (let ((#{n\ 4450}#
+                                   (#{id-var-name\ 3817}#
+                                     #{value\ 4420}#
+                                     #{w\ 4422}#))
+                                 (#{r\ 4451}#
+                                   (#{macros-only-env\ 3791}# #{r\ 4407}#)))
+                             (if (memv #{m\ 4409}# (quote (c)))
+                               (if (memq (quote compile) #{esew\ 4410}#)
+                                 (let ((#{e\ 4452}#
+                                         (#{chi-install-global\ 3827}#
+                                           #{n\ 4450}#
+                                           (#{chi\ 3831}#
+                                             #{e\ 4421}#
+                                             #{r\ 4451}#
+                                             #{w\ 4422}#
+                                             #{mod\ 4424}#))))
                                    (begin
-                                     (#{top-level-eval-hook\ 90}#
-                                       #{e\ 789}#
-                                       #{mod\ 761}#)
-                                     (if (memq (quote load) #{esew\ 747}#)
-                                       #{e\ 789}#
-                                       (#{chi-void\ 174}#))))
-                                 (if (memq (quote load) #{esew\ 747}#)
-                                   (#{chi-install-global\ 163}#
-                                     #{n\ 787}#
-                                     (#{chi\ 167}#
-                                       #{e\ 758}#
-                                       #{r\ 788}#
-                                       #{w\ 759}#
-                                       #{mod\ 761}#))
-                                   (#{chi-void\ 174}#)))
-                               (if (memv #{m\ 746}# (quote (c&e)))
-                                 (let ((#{e\ 790}# (#{chi-install-global\ 163}#
-                                                     #{n\ 787}#
-                                                     (#{chi\ 167}#
-                                                       #{e\ 758}#
-                                                       #{r\ 788}#
-                                                       #{w\ 759}#
-                                                       #{mod\ 761}#))))
+                                     (#{top-level-eval-hook\ 3754}#
+                                       #{e\ 4452}#
+                                       #{mod\ 4424}#)
+                                     (if (memq (quote load) #{esew\ 4410}#)
+                                       #{e\ 4452}#
+                                       (#{chi-void\ 3838}#))))
+                                 (if (memq (quote load) #{esew\ 4410}#)
+                                   (#{chi-install-global\ 3827}#
+                                     #{n\ 4450}#
+                                     (#{chi\ 3831}#
+                                       #{e\ 4421}#
+                                       #{r\ 4451}#
+                                       #{w\ 4422}#
+                                       #{mod\ 4424}#))
+                                   (#{chi-void\ 3838}#)))
+                               (if (memv #{m\ 4409}# (quote (c&e)))
+                                 (let ((#{e\ 4453}#
+                                         (#{chi-install-global\ 3827}#
+                                           #{n\ 4450}#
+                                           (#{chi\ 3831}#
+                                             #{e\ 4421}#
+                                             #{r\ 4451}#
+                                             #{w\ 4422}#
+                                             #{mod\ 4424}#))))
                                    (begin
-                                     (#{top-level-eval-hook\ 90}#
-                                       #{e\ 790}#
-                                       #{mod\ 761}#)
-                                     #{e\ 790}#))
+                                     (#{top-level-eval-hook\ 3754}#
+                                       #{e\ 4453}#
+                                       #{mod\ 4424}#)
+                                     #{e\ 4453}#))
                                  (begin
-                                   (if (memq (quote eval) #{esew\ 747}#)
-                                     (#{top-level-eval-hook\ 90}#
-                                       (#{chi-install-global\ 163}#
-                                         #{n\ 787}#
-                                         (#{chi\ 167}#
-                                           #{e\ 758}#
-                                           #{r\ 788}#
-                                           #{w\ 759}#
-                                           #{mod\ 761}#))
-                                       #{mod\ 761}#))
-                                   (#{chi-void\ 174}#)))))
-                           (if (memv #{type\ 756}# (quote (define-form)))
-                             (let ((#{n\ 791}# (#{id-var-name\ 153}#
-                                                 #{value\ 757}#
-                                                 #{w\ 759}#)))
-                               (let ((#{type\ 792}#
-                                       (#{binding-type\ 123}#
-                                         (#{lookup\ 128}#
-                                           #{n\ 791}#
-                                           #{r\ 744}#
-                                           #{mod\ 761}#))))
-                                 (if (memv #{type\ 792}#
+                                   (if (memq (quote eval) #{esew\ 4410}#)
+                                     (#{top-level-eval-hook\ 3754}#
+                                       (#{chi-install-global\ 3827}#
+                                         #{n\ 4450}#
+                                         (#{chi\ 3831}#
+                                           #{e\ 4421}#
+                                           #{r\ 4451}#
+                                           #{w\ 4422}#
+                                           #{mod\ 4424}#))
+                                       #{mod\ 4424}#))
+                                   (#{chi-void\ 3838}#)))))
+                           (if (memv #{type\ 4419}# (quote (define-form)))
+                             (let ((#{n\ 4454}#
+                                     (#{id-var-name\ 3817}#
+                                       #{value\ 4420}#
+                                       #{w\ 4422}#)))
+                               (let ((#{type\ 4455}#
+                                       (#{binding-type\ 3787}#
+                                         (#{lookup\ 3792}#
+                                           #{n\ 4454}#
+                                           #{r\ 4407}#
+                                           #{mod\ 4424}#))))
+                                 (if (memv #{type\ 4455}#
                                            '(global core macro module-ref))
                                    (begin
                                      (if (if (not (module-local-variable
                                                     (current-module)
-                                                    #{n\ 791}#))
+                                                    #{n\ 4454}#))
                                            (current-module)
                                            #f)
-                                       (let ((#{old\ 793}#
+                                       (let ((#{old\ 4456}#
                                                (module-variable
                                                  (current-module)
-                                                 #{n\ 791}#)))
+                                                 #{n\ 4454}#)))
                                          (module-define!
                                            (current-module)
-                                           #{n\ 791}#
-                                           (if (variable? #{old\ 793}#)
-                                             (variable-ref #{old\ 793}#)
+                                           #{n\ 4454}#
+                                           (if (variable? #{old\ 4456}#)
+                                             (variable-ref #{old\ 4456}#)
                                              #f))))
-                                     (let ((#{x\ 794}# 
(#{build-global-definition\ 104}#
-                                                         #{s\ 760}#
-                                                         #{n\ 791}#
-                                                         (#{chi\ 167}#
-                                                           #{e\ 758}#
-                                                           #{r\ 744}#
-                                                           #{w\ 759}#
-                                                           #{mod\ 761}#))))
+                                     (let ((#{x\ 4457}#
+                                             (#{build-global-definition\ 3768}#
+                                               #{s\ 4423}#
+                                               #{n\ 4454}#
+                                               (#{chi\ 3831}#
+                                                 #{e\ 4421}#
+                                                 #{r\ 4407}#
+                                                 #{w\ 4422}#
+                                                 #{mod\ 4424}#))))
                                        (begin
-                                         (if (eq? #{m\ 746}# (quote c&e))
-                                           (#{top-level-eval-hook\ 90}#
-                                             #{x\ 794}#
-                                             #{mod\ 761}#))
-                                         #{x\ 794}#)))
-                                   (if (memv #{type\ 792}#
+                                         (if (eq? #{m\ 4409}# (quote c&e))
+                                           (#{top-level-eval-hook\ 3754}#
+                                             #{x\ 4457}#
+                                             #{mod\ 4424}#))
+                                         #{x\ 4457}#)))
+                                   (if (memv #{type\ 4455}#
                                              '(displaced-lexical))
                                      (syntax-violation
                                        #f
                                        "identifier out of context"
-                                       #{e\ 758}#
-                                       (#{wrap\ 159}#
-                                         #{value\ 757}#
-                                         #{w\ 759}#
-                                         #{mod\ 761}#))
+                                       #{e\ 4421}#
+                                       (#{wrap\ 3823}#
+                                         #{value\ 4420}#
+                                         #{w\ 4422}#
+                                         #{mod\ 4424}#))
                                      (syntax-violation
                                        #f
                                        "cannot define keyword at top level"
-                                       #{e\ 758}#
-                                       (#{wrap\ 159}#
-                                         #{value\ 757}#
-                                         #{w\ 759}#
-                                         #{mod\ 761}#))))))
-                             (let ((#{x\ 795}# (#{chi-expr\ 168}#
-                                                 #{type\ 756}#
-                                                 #{value\ 757}#
-                                                 #{e\ 758}#
-                                                 #{r\ 744}#
-                                                 #{w\ 759}#
-                                                 #{s\ 760}#
-                                                 #{mod\ 761}#)))
+                                       #{e\ 4421}#
+                                       (#{wrap\ 3823}#
+                                         #{value\ 4420}#
+                                         #{w\ 4422}#
+                                         #{mod\ 4424}#))))))
+                             (let ((#{x\ 4458}#
+                                     (#{chi-expr\ 3832}#
+                                       #{type\ 4419}#
+                                       #{value\ 4420}#
+                                       #{e\ 4421}#
+                                       #{r\ 4407}#
+                                       #{w\ 4422}#
+                                       #{s\ 4423}#
+                                       #{mod\ 4424}#)))
                                (begin
-                                 (if (eq? #{m\ 746}# (quote c&e))
-                                   (#{top-level-eval-hook\ 90}#
-                                     #{x\ 795}#
-                                     #{mod\ 761}#))
-                                 #{x\ 795}#)))))))))))
-           (#{syntax-type\ 165}#
-             (lambda (#{e\ 796}#
-                      #{r\ 797}#
-                      #{w\ 798}#
-                      #{s\ 799}#
-                      #{rib\ 800}#
-                      #{mod\ 801}#
-                      #{for-car?\ 802}#)
-               (if (symbol? #{e\ 796}#)
-                 (let ((#{n\ 803}# (#{id-var-name\ 153}#
-                                     #{e\ 796}#
-                                     #{w\ 798}#)))
-                   (let ((#{b\ 804}# (#{lookup\ 128}#
-                                       #{n\ 803}#
-                                       #{r\ 797}#
-                                       #{mod\ 801}#)))
-                     (let ((#{type\ 805}#
-                             (#{binding-type\ 123}# #{b\ 804}#)))
-                       (if (memv #{type\ 805}# (quote (lexical)))
+                                 (if (eq? #{m\ 4409}# (quote c&e))
+                                   (#{top-level-eval-hook\ 3754}#
+                                     #{x\ 4458}#
+                                     #{mod\ 4424}#))
+                                 #{x\ 4458}#)))))))))))
+           (#{syntax-type\ 3829}#
+             (lambda (#{e\ 4459}#
+                      #{r\ 4460}#
+                      #{w\ 4461}#
+                      #{s\ 4462}#
+                      #{rib\ 4463}#
+                      #{mod\ 4464}#
+                      #{for-car?\ 4465}#)
+               (if (symbol? #{e\ 4459}#)
+                 (let ((#{n\ 4466}#
+                         (#{id-var-name\ 3817}# #{e\ 4459}# #{w\ 4461}#)))
+                   (let ((#{b\ 4467}#
+                           (#{lookup\ 3792}#
+                             #{n\ 4466}#
+                             #{r\ 4460}#
+                             #{mod\ 4464}#)))
+                     (let ((#{type\ 4468}#
+                             (#{binding-type\ 3787}# #{b\ 4467}#)))
+                       (if (memv #{type\ 4468}# (quote (lexical)))
                          (values
-                           #{type\ 805}#
-                           (#{binding-value\ 124}# #{b\ 804}#)
-                           #{e\ 796}#
-                           #{w\ 798}#
-                           #{s\ 799}#
-                           #{mod\ 801}#)
-                         (if (memv #{type\ 805}# (quote (global)))
+                           #{type\ 4468}#
+                           (#{binding-value\ 3788}# #{b\ 4467}#)
+                           #{e\ 4459}#
+                           #{w\ 4461}#
+                           #{s\ 4462}#
+                           #{mod\ 4464}#)
+                         (if (memv #{type\ 4468}# (quote (global)))
                            (values
-                             #{type\ 805}#
-                             #{n\ 803}#
-                             #{e\ 796}#
-                             #{w\ 798}#
-                             #{s\ 799}#
-                             #{mod\ 801}#)
-                           (if (memv #{type\ 805}# (quote (macro)))
-                             (if #{for-car?\ 802}#
+                             #{type\ 4468}#
+                             #{n\ 4466}#
+                             #{e\ 4459}#
+                             #{w\ 4461}#
+                             #{s\ 4462}#
+                             #{mod\ 4464}#)
+                           (if (memv #{type\ 4468}# (quote (macro)))
+                             (if #{for-car?\ 4465}#
                                (values
-                                 #{type\ 805}#
-                                 (#{binding-value\ 124}# #{b\ 804}#)
-                                 #{e\ 796}#
-                                 #{w\ 798}#
-                                 #{s\ 799}#
-                                 #{mod\ 801}#)
-                               (#{syntax-type\ 165}#
-                                 (#{chi-macro\ 170}#
-                                   (#{binding-value\ 124}# #{b\ 804}#)
-                                   #{e\ 796}#
-                                   #{r\ 797}#
-                                   #{w\ 798}#
-                                   #{rib\ 800}#
-                                   #{mod\ 801}#)
-                                 #{r\ 797}#
+                                 #{type\ 4468}#
+                                 (#{binding-value\ 3788}# #{b\ 4467}#)
+                                 #{e\ 4459}#
+                                 #{w\ 4461}#
+                                 #{s\ 4462}#
+                                 #{mod\ 4464}#)
+                               (#{syntax-type\ 3829}#
+                                 (#{chi-macro\ 3834}#
+                                   (#{binding-value\ 3788}# #{b\ 4467}#)
+                                   #{e\ 4459}#
+                                   #{r\ 4460}#
+                                   #{w\ 4461}#
+                                   #{rib\ 4463}#
+                                   #{mod\ 4464}#)
+                                 #{r\ 4460}#
                                  '(())
-                                 #{s\ 799}#
-                                 #{rib\ 800}#
-                                 #{mod\ 801}#
+                                 #{s\ 4462}#
+                                 #{rib\ 4463}#
+                                 #{mod\ 4464}#
                                  #f))
                              (values
-                               #{type\ 805}#
-                               (#{binding-value\ 124}# #{b\ 804}#)
-                               #{e\ 796}#
-                               #{w\ 798}#
-                               #{s\ 799}#
-                               #{mod\ 801}#)))))))
-                 (if (pair? #{e\ 796}#)
-                   (let ((#{first\ 806}# (car #{e\ 796}#)))
+                               #{type\ 4468}#
+                               (#{binding-value\ 3788}# #{b\ 4467}#)
+                               #{e\ 4459}#
+                               #{w\ 4461}#
+                               #{s\ 4462}#
+                               #{mod\ 4464}#)))))))
+                 (if (pair? #{e\ 4459}#)
+                   (let ((#{first\ 4469}# (car #{e\ 4459}#)))
                      (call-with-values
                        (lambda ()
-                         (#{syntax-type\ 165}#
-                           #{first\ 806}#
-                           #{r\ 797}#
-                           #{w\ 798}#
-                           #{s\ 799}#
-                           #{rib\ 800}#
-                           #{mod\ 801}#
+                         (#{syntax-type\ 3829}#
+                           #{first\ 4469}#
+                           #{r\ 4460}#
+                           #{w\ 4461}#
+                           #{s\ 4462}#
+                           #{rib\ 4463}#
+                           #{mod\ 4464}#
                            #t))
-                       (lambda (#{ftype\ 807}#
-                                #{fval\ 808}#
-                                #{fe\ 809}#
-                                #{fw\ 810}#
-                                #{fs\ 811}#
-                                #{fmod\ 812}#)
-                         (if (memv #{ftype\ 807}# (quote (lexical)))
+                       (lambda (#{ftype\ 4470}#
+                                #{fval\ 4471}#
+                                #{fe\ 4472}#
+                                #{fw\ 4473}#
+                                #{fs\ 4474}#
+                                #{fmod\ 4475}#)
+                         (if (memv #{ftype\ 4470}# (quote (lexical)))
                            (values
                              'lexical-call
-                             #{fval\ 808}#
-                             #{e\ 796}#
-                             #{w\ 798}#
-                             #{s\ 799}#
-                             #{mod\ 801}#)
-                           (if (memv #{ftype\ 807}# (quote (global)))
+                             #{fval\ 4471}#
+                             #{e\ 4459}#
+                             #{w\ 4461}#
+                             #{s\ 4462}#
+                             #{mod\ 4464}#)
+                           (if (memv #{ftype\ 4470}# (quote (global)))
                              (values
                                'global-call
-                               (#{make-syntax-object\ 114}#
-                                 #{fval\ 808}#
-                                 #{w\ 798}#
-                                 #{fmod\ 812}#)
-                               #{e\ 796}#
-                               #{w\ 798}#
-                               #{s\ 799}#
-                               #{mod\ 801}#)
-                             (if (memv #{ftype\ 807}# (quote (macro)))
-                               (#{syntax-type\ 165}#
-                                 (#{chi-macro\ 170}#
-                                   #{fval\ 808}#
-                                   #{e\ 796}#
-                                   #{r\ 797}#
-                                   #{w\ 798}#
-                                   #{rib\ 800}#
-                                   #{mod\ 801}#)
-                                 #{r\ 797}#
+                               (#{make-syntax-object\ 3778}#
+                                 #{fval\ 4471}#
+                                 #{w\ 4461}#
+                                 #{fmod\ 4475}#)
+                               #{e\ 4459}#
+                               #{w\ 4461}#
+                               #{s\ 4462}#
+                               #{mod\ 4464}#)
+                             (if (memv #{ftype\ 4470}# (quote (macro)))
+                               (#{syntax-type\ 3829}#
+                                 (#{chi-macro\ 3834}#
+                                   #{fval\ 4471}#
+                                   #{e\ 4459}#
+                                   #{r\ 4460}#
+                                   #{w\ 4461}#
+                                   #{rib\ 4463}#
+                                   #{mod\ 4464}#)
+                                 #{r\ 4460}#
                                  '(())
-                                 #{s\ 799}#
-                                 #{rib\ 800}#
-                                 #{mod\ 801}#
-                                 #{for-car?\ 802}#)
-                               (if (memv #{ftype\ 807}# (quote (module-ref)))
+                                 #{s\ 4462}#
+                                 #{rib\ 4463}#
+                                 #{mod\ 4464}#
+                                 #{for-car?\ 4465}#)
+                               (if (memv #{ftype\ 4470}# (quote (module-ref)))
                                  (call-with-values
-                                   (lambda () (#{fval\ 808}# #{e\ 796}#))
-                                   (lambda (#{sym\ 813}# #{mod\ 814}#)
-                                     (#{syntax-type\ 165}#
-                                       #{sym\ 813}#
-                                       #{r\ 797}#
-                                       #{w\ 798}#
-                                       #{s\ 799}#
-                                       #{rib\ 800}#
-                                       #{mod\ 814}#
-                                       #{for-car?\ 802}#)))
-                                 (if (memv #{ftype\ 807}# (quote (core)))
+                                   (lambda () (#{fval\ 4471}# #{e\ 4459}#))
+                                   (lambda (#{sym\ 4476}# #{mod\ 4477}#)
+                                     (#{syntax-type\ 3829}#
+                                       #{sym\ 4476}#
+                                       #{r\ 4460}#
+                                       #{w\ 4461}#
+                                       #{s\ 4462}#
+                                       #{rib\ 4463}#
+                                       #{mod\ 4477}#
+                                       #{for-car?\ 4465}#)))
+                                 (if (memv #{ftype\ 4470}# (quote (core)))
                                    (values
                                      'core-form
-                                     #{fval\ 808}#
-                                     #{e\ 796}#
-                                     #{w\ 798}#
-                                     #{s\ 799}#
-                                     #{mod\ 801}#)
-                                   (if (memv #{ftype\ 807}#
+                                     #{fval\ 4471}#
+                                     #{e\ 4459}#
+                                     #{w\ 4461}#
+                                     #{s\ 4462}#
+                                     #{mod\ 4464}#)
+                                   (if (memv #{ftype\ 4470}#
                                              '(local-syntax))
                                      (values
                                        'local-syntax-form
-                                       #{fval\ 808}#
-                                       #{e\ 796}#
-                                       #{w\ 798}#
-                                       #{s\ 799}#
-                                       #{mod\ 801}#)
-                                     (if (memv #{ftype\ 807}# (quote (begin)))
+                                       #{fval\ 4471}#
+                                       #{e\ 4459}#
+                                       #{w\ 4461}#
+                                       #{s\ 4462}#
+                                       #{mod\ 4464}#)
+                                     (if (memv #{ftype\ 4470}# (quote (begin)))
                                        (values
                                          'begin-form
                                          #f
-                                         #{e\ 796}#
-                                         #{w\ 798}#
-                                         #{s\ 799}#
-                                         #{mod\ 801}#)
-                                       (if (memv #{ftype\ 807}#
+                                         #{e\ 4459}#
+                                         #{w\ 4461}#
+                                         #{s\ 4462}#
+                                         #{mod\ 4464}#)
+                                       (if (memv #{ftype\ 4470}#
                                                  '(eval-when))
                                          (values
                                            'eval-when-form
                                            #f
-                                           #{e\ 796}#
-                                           #{w\ 798}#
-                                           #{s\ 799}#
-                                           #{mod\ 801}#)
-                                         (if (memv #{ftype\ 807}#
+                                           #{e\ 4459}#
+                                           #{w\ 4461}#
+                                           #{s\ 4462}#
+                                           #{mod\ 4464}#)
+                                         (if (memv #{ftype\ 4470}#
                                                    '(define))
-                                           ((lambda (#{tmp\ 815}#)
-                                              ((lambda (#{tmp\ 816}#)
-                                                 (if (if #{tmp\ 816}#
-                                                       (apply (lambda (#{_\ 
817}#
-                                                                       #{name\ 
818}#
-                                                                       #{val\ 
819}#)
-                                                                (#{id?\ 131}#
-                                                                  #{name\ 
818}#))
-                                                              #{tmp\ 816}#)
+                                           ((lambda (#{tmp\ 4478}#)
+                                              ((lambda (#{tmp\ 4479}#)
+                                                 (if (if #{tmp\ 4479}#
+                                                       (apply (lambda (#{_\ 
4480}#
+                                                                       #{name\ 
4481}#
+                                                                       #{val\ 
4482}#)
+                                                                (#{id?\ 3795}#
+                                                                  #{name\ 
4481}#))
+                                                              #{tmp\ 4479}#)
                                                        #f)
-                                                   (apply (lambda (#{_\ 820}#
-                                                                   #{name\ 
821}#
-                                                                   #{val\ 
822}#)
+                                                   (apply (lambda (#{_\ 4483}#
+                                                                   #{name\ 
4484}#
+                                                                   #{val\ 
4485}#)
                                                             (values
                                                               'define-form
-                                                              #{name\ 821}#
-                                                              #{val\ 822}#
-                                                              #{w\ 798}#
-                                                              #{s\ 799}#
-                                                              #{mod\ 801}#))
-                                                          #{tmp\ 816}#)
-                                                   ((lambda (#{tmp\ 823}#)
-                                                      (if (if #{tmp\ 823}#
-                                                            (apply (lambda 
(#{_\ 824}#
-                                                                            
#{name\ 825}#
-                                                                            
#{args\ 826}#
-                                                                            
#{e1\ 827}#
-                                                                            
#{e2\ 828}#)
-                                                                     (if 
(#{id?\ 131}#
-                                                                           
#{name\ 825}#)
-                                                                       
(#{valid-bound-ids?\ 156}#
-                                                                         
(#{lambda-var-list\ 182}#
-                                                                           
#{args\ 826}#))
+                                                              #{name\ 4484}#
+                                                              #{val\ 4485}#
+                                                              #{w\ 4461}#
+                                                              #{s\ 4462}#
+                                                              #{mod\ 4464}#))
+                                                          #{tmp\ 4479}#)
+                                                   ((lambda (#{tmp\ 4486}#)
+                                                      (if (if #{tmp\ 4486}#
+                                                            (apply (lambda 
(#{_\ 4487}#
+                                                                            
#{name\ 4488}#
+                                                                            
#{args\ 4489}#
+                                                                            
#{e1\ 4490}#
+                                                                            
#{e2\ 4491}#)
+                                                                     (if 
(#{id?\ 3795}#
+                                                                           
#{name\ 4488}#)
+                                                                       
(#{valid-bound-ids?\ 3820}#
+                                                                         
(#{lambda-var-list\ 3846}#
+                                                                           
#{args\ 4489}#))
                                                                        #f))
-                                                                   #{tmp\ 
823}#)
+                                                                   #{tmp\ 
4486}#)
                                                             #f)
-                                                        (apply (lambda (#{_\ 
829}#
-                                                                        
#{name\ 830}#
-                                                                        
#{args\ 831}#
-                                                                        #{e1\ 
832}#
-                                                                        #{e2\ 
833}#)
+                                                        (apply (lambda (#{_\ 
4492}#
+                                                                        
#{name\ 4493}#
+                                                                        
#{args\ 4494}#
+                                                                        #{e1\ 
4495}#
+                                                                        #{e2\ 
4496}#)
                                                                  (values
                                                                    'define-form
-                                                                   (#{wrap\ 
159}#
-                                                                     #{name\ 
830}#
-                                                                     #{w\ 798}#
-                                                                     #{mod\ 
801}#)
-                                                                   
(#{decorate-source\ 94}#
+                                                                   (#{wrap\ 
3823}#
+                                                                     #{name\ 
4493}#
+                                                                     #{w\ 
4461}#
+                                                                     #{mod\ 
4464}#)
+                                                                   
(#{decorate-source\ 3758}#
                                                                      (cons 
'#(syntax-object
                                                                               
lambda
                                                                               
((top)
@@ -3973,33 +4004,33 @@
                                                                                
   "i")))
                                                                               
(hygiene
                                                                                
 guile))
-                                                                           
(#{wrap\ 159}#
-                                                                             
(cons #{args\ 831}#
-                                                                               
    (cons #{e1\ 832}#
-                                                                               
          #{e2\ 833}#))
-                                                                             
#{w\ 798}#
-                                                                             
#{mod\ 801}#))
-                                                                     #{s\ 
799}#)
+                                                                           
(#{wrap\ 3823}#
+                                                                             
(cons #{args\ 4494}#
+                                                                               
    (cons #{e1\ 4495}#
+                                                                               
          #{e2\ 4496}#))
+                                                                             
#{w\ 4461}#
+                                                                             
#{mod\ 4464}#))
+                                                                     #{s\ 
4462}#)
                                                                    '(())
-                                                                   #{s\ 799}#
-                                                                   #{mod\ 
801}#))
-                                                               #{tmp\ 823}#)
-                                                        ((lambda (#{tmp\ 835}#)
-                                                           (if (if #{tmp\ 835}#
-                                                                 (apply 
(lambda (#{_\ 836}#
-                                                                               
  #{name\ 837}#)
-                                                                          
(#{id?\ 131}#
-                                                                            
#{name\ 837}#))
-                                                                        #{tmp\ 
835}#)
+                                                                   #{s\ 4462}#
+                                                                   #{mod\ 
4464}#))
+                                                               #{tmp\ 4486}#)
+                                                        ((lambda (#{tmp\ 
4498}#)
+                                                           (if (if #{tmp\ 
4498}#
+                                                                 (apply 
(lambda (#{_\ 4499}#
+                                                                               
  #{name\ 4500}#)
+                                                                          
(#{id?\ 3795}#
+                                                                            
#{name\ 4500}#))
+                                                                        #{tmp\ 
4498}#)
                                                                  #f)
-                                                             (apply (lambda 
(#{_\ 838}#
-                                                                             
#{name\ 839}#)
+                                                             (apply (lambda 
(#{_\ 4501}#
+                                                                             
#{name\ 4502}#)
                                                                       (values
                                                                         
'define-form
-                                                                        
(#{wrap\ 159}#
-                                                                          
#{name\ 839}#
-                                                                          #{w\ 
798}#
-                                                                          
#{mod\ 801}#)
+                                                                        
(#{wrap\ 3823}#
+                                                                          
#{name\ 4502}#
+                                                                          #{w\ 
4461}#
+                                                                          
#{mod\ 4464}#)
                                                                         
'(#(syntax-object
                                                                             if
                                                                             
((top)
@@ -5321,3624 +5352,3584 @@
                                                                             
(hygiene
                                                                               
guile)))
                                                                         '(())
-                                                                        #{s\ 
799}#
-                                                                        #{mod\ 
801}#))
-                                                                    #{tmp\ 
835}#)
+                                                                        #{s\ 
4462}#
+                                                                        #{mod\ 
4464}#))
+                                                                    #{tmp\ 
4498}#)
                                                              (syntax-violation
                                                                #f
                                                                "source 
expression failed to match any pattern"
-                                                               #{tmp\ 815}#)))
+                                                               #{tmp\ 4478}#)))
                                                          ($sc-dispatch
-                                                           #{tmp\ 815}#
+                                                           #{tmp\ 4478}#
                                                            '(any any)))))
                                                     ($sc-dispatch
-                                                      #{tmp\ 815}#
+                                                      #{tmp\ 4478}#
                                                       '(any (any . any)
                                                             any
                                                             .
                                                             each-any)))))
                                                ($sc-dispatch
-                                                 #{tmp\ 815}#
+                                                 #{tmp\ 4478}#
                                                  '(any any any))))
-                                            #{e\ 796}#)
-                                           (if (memv #{ftype\ 807}#
+                                            #{e\ 4459}#)
+                                           (if (memv #{ftype\ 4470}#
                                                      '(define-syntax))
-                                             ((lambda (#{tmp\ 840}#)
-                                                ((lambda (#{tmp\ 841}#)
-                                                   (if (if #{tmp\ 841}#
-                                                         (apply (lambda (#{_\ 
842}#
-                                                                         
#{name\ 843}#
-                                                                         
#{val\ 844}#)
-                                                                  (#{id?\ 131}#
-                                                                    #{name\ 
843}#))
-                                                                #{tmp\ 841}#)
+                                             ((lambda (#{tmp\ 4503}#)
+                                                ((lambda (#{tmp\ 4504}#)
+                                                   (if (if #{tmp\ 4504}#
+                                                         (apply (lambda (#{_\ 
4505}#
+                                                                         
#{name\ 4506}#
+                                                                         
#{val\ 4507}#)
+                                                                  (#{id?\ 
3795}#
+                                                                    #{name\ 
4506}#))
+                                                                #{tmp\ 4504}#)
                                                          #f)
-                                                     (apply (lambda (#{_\ 845}#
-                                                                     #{name\ 
846}#
-                                                                     #{val\ 
847}#)
+                                                     (apply (lambda (#{_\ 
4508}#
+                                                                     #{name\ 
4509}#
+                                                                     #{val\ 
4510}#)
                                                               (values
                                                                 
'define-syntax-form
-                                                                #{name\ 846}#
-                                                                #{val\ 847}#
-                                                                #{w\ 798}#
-                                                                #{s\ 799}#
-                                                                #{mod\ 801}#))
-                                                            #{tmp\ 841}#)
+                                                                #{name\ 4509}#
+                                                                #{val\ 4510}#
+                                                                #{w\ 4461}#
+                                                                #{s\ 4462}#
+                                                                #{mod\ 4464}#))
+                                                            #{tmp\ 4504}#)
                                                      (syntax-violation
                                                        #f
                                                        "source expression 
failed to match any pattern"
-                                                       #{tmp\ 840}#)))
+                                                       #{tmp\ 4503}#)))
                                                  ($sc-dispatch
-                                                   #{tmp\ 840}#
+                                                   #{tmp\ 4503}#
                                                    '(any any any))))
-                                              #{e\ 796}#)
+                                              #{e\ 4459}#)
                                              (values
                                                'call
                                                #f
-                                               #{e\ 796}#
-                                               #{w\ 798}#
-                                               #{s\ 799}#
-                                               #{mod\ 801}#))))))))))))))
-                   (if (#{syntax-object?\ 115}# #{e\ 796}#)
-                     (#{syntax-type\ 165}#
-                       (#{syntax-object-expression\ 116}# #{e\ 796}#)
-                       #{r\ 797}#
-                       (#{join-wraps\ 150}#
-                         #{w\ 798}#
-                         (#{syntax-object-wrap\ 117}# #{e\ 796}#))
-                       #{s\ 799}#
-                       #{rib\ 800}#
-                       (let ((#{t\ 848}# (#{syntax-object-module\ 118}#
-                                           #{e\ 796}#)))
-                         (if #{t\ 848}# #{t\ 848}# #{mod\ 801}#))
-                       #{for-car?\ 802}#)
-                     (if (self-evaluating? #{e\ 796}#)
+                                               #{e\ 4459}#
+                                               #{w\ 4461}#
+                                               #{s\ 4462}#
+                                               #{mod\ 4464}#))))))))))))))
+                   (if (#{syntax-object?\ 3779}# #{e\ 4459}#)
+                     (#{syntax-type\ 3829}#
+                       (#{syntax-object-expression\ 3780}# #{e\ 4459}#)
+                       #{r\ 4460}#
+                       (#{join-wraps\ 3814}#
+                         #{w\ 4461}#
+                         (#{syntax-object-wrap\ 3781}# #{e\ 4459}#))
+                       #{s\ 4462}#
+                       #{rib\ 4463}#
+                       (let ((#{t\ 4511}#
+                               (#{syntax-object-module\ 3782}# #{e\ 4459}#)))
+                         (if #{t\ 4511}# #{t\ 4511}# #{mod\ 4464}#))
+                       #{for-car?\ 4465}#)
+                     (if (self-evaluating? #{e\ 4459}#)
                        (values
                          'constant
                          #f
-                         #{e\ 796}#
-                         #{w\ 798}#
-                         #{s\ 799}#
-                         #{mod\ 801}#)
+                         #{e\ 4459}#
+                         #{w\ 4461}#
+                         #{s\ 4462}#
+                         #{mod\ 4464}#)
                        (values
                          'other
                          #f
-                         #{e\ 796}#
-                         #{w\ 798}#
-                         #{s\ 799}#
-                         #{mod\ 801}#)))))))
-           (#{chi-when-list\ 164}#
-             (lambda (#{e\ 849}# #{when-list\ 850}# #{w\ 851}#)
-               (letrec ((#{f\ 852}# (lambda (#{when-list\ 853}#
-                                             #{situations\ 854}#)
-                                      (if (null? #{when-list\ 853}#)
-                                        #{situations\ 854}#
-                                        (#{f\ 852}# (cdr #{when-list\ 853}#)
-                                                    (cons (let ((#{x\ 855}# 
(car #{when-list\ 853}#)))
-                                                            (if (#{free-id=?\ 
154}#
-                                                                  #{x\ 855}#
-                                                                  
'#(syntax-object
-                                                                     compile
-                                                                     ((top)
-                                                                      #(ribcage
-                                                                        ()
-                                                                        ()
-                                                                        ())
-                                                                      #(ribcage
-                                                                        ()
-                                                                        ()
-                                                                        ())
-                                                                      #(ribcage
-                                                                        ()
-                                                                        ()
-                                                                        ())
-                                                                      #(ribcage
-                                                                        #(x)
-                                                                        
#((top))
-                                                                        #("i"))
-                                                                      #(ribcage
-                                                                        ()
-                                                                        ()
-                                                                        ())
-                                                                      #(ribcage
-                                                                        #(f
-                                                                          
when-list
-                                                                          
situations)
-                                                                        #((top)
-                                                                          (top)
-                                                                          
(top))
-                                                                        #("i"
-                                                                          "i"
-                                                                          "i"))
-                                                                      #(ribcage
-                                                                        ()
-                                                                        ()
-                                                                        ())
-                                                                      #(ribcage
-                                                                        #(e
-                                                                          
when-list
-                                                                          w)
-                                                                        #((top)
-                                                                          (top)
-                                                                          
(top))
-                                                                        #("i"
-                                                                          "i"
-                                                                          "i"))
-                                                                      #(ribcage
-                                                                        
(lambda-var-list
-                                                                          
gen-var
-                                                                          strip
-                                                                          
chi-lambda-case
-                                                                          
lambda*-formals
-                                                                          
chi-simple-lambda
-                                                                          
lambda-formals
-                                                                          
ellipsis?
-                                                                          
chi-void
-                                                                          
eval-local-transformer
-                                                                          
chi-local-syntax
-                                                                          
chi-body
-                                                                          
chi-macro
-                                                                          
chi-application
-                                                                          
chi-expr
-                                                                          chi
-                                                                          
chi-top
-                                                                          
syntax-type
-                                                                          
chi-when-list
-                                                                          
chi-install-global
-                                                                          
chi-top-sequence
-                                                                          
chi-sequence
-                                                                          
source-wrap
-                                                                          wrap
-                                                                          
bound-id-member?
-                                                                          
distinct-bound-ids?
-                                                                          
valid-bound-ids?
-                                                                          
bound-id=?
-                                                                          
free-id=?
-                                                                          
id-var-name
-                                                                          
same-marks?
-                                                                          
join-marks
-                                                                          
join-wraps
-                                                                          
smart-append
-                                                                          
make-binding-wrap
-                                                                          
extend-ribcage!
-                                                                          
make-empty-ribcage
-                                                                          
new-mark
-                                                                          
anti-mark
-                                                                          
the-anti-mark
-                                                                          
top-marked?
-                                                                          
top-wrap
-                                                                          
empty-wrap
-                                                                          
set-ribcage-labels!
-                                                                          
set-ribcage-marks!
-                                                                          
set-ribcage-symnames!
-                                                                          
ribcage-labels
-                                                                          
ribcage-marks
-                                                                          
ribcage-symnames
-                                                                          
ribcage?
-                                                                          
make-ribcage
-                                                                          
gen-labels
-                                                                          
gen-label
-                                                                          
make-rename
-                                                                          
rename-marks
-                                                                          
rename-new
-                                                                          
rename-old
-                                                                          
subst-rename?
-                                                                          
wrap-subst
-                                                                          
wrap-marks
-                                                                          
make-wrap
-                                                                          
id-sym-name&marks
-                                                                          
id-sym-name
-                                                                          id?
-                                                                          
nonsymbol-id?
-                                                                          
global-extend
-                                                                          
lookup
-                                                                          
macros-only-env
-                                                                          
extend-var-env
-                                                                          
extend-env
-                                                                          
null-env
-                                                                          
binding-value
-                                                                          
binding-type
-                                                                          
make-binding
-                                                                          
arg-check
-                                                                          
source-annotation
-                                                                          
no-source
-                                                                          
set-syntax-object-module!
-                                                                          
set-syntax-object-wrap!
-                                                                          
set-syntax-object-expression!
-                                                                          
syntax-object-module
-                                                                          
syntax-object-wrap
-                                                                          
syntax-object-expression
-                                                                          
syntax-object?
-                                                                          
make-syntax-object
-                                                                          
build-lexical-var
-                                                                          
build-letrec
-                                                                          
build-named-let
-                                                                          
build-let
-                                                                          
build-sequence
-                                                                          
build-data
-                                                                          
build-primref
-                                                                          
build-lambda-case
-                                                                          
build-case-lambda
-                                                                          
build-simple-lambda
-                                                                          
build-global-definition
-                                                                          
maybe-name-value!
-                                                                          
build-global-assignment
-                                                                          
build-global-reference
-                                                                          
analyze-variable
-                                                                          
build-lexical-assignment
-                                                                          
build-lexical-reference
-                                                                          
build-conditional
-                                                                          
build-application
-                                                                          
build-void
-                                                                          
decorate-source
-                                                                          
get-global-definition-hook
-                                                                          
put-global-definition-hook
-                                                                          
gensym-hook
-                                                                          
local-eval-hook
-                                                                          
top-level-eval-hook
-                                                                          fx<
-                                                                          fx=
-                                                                          fx-
-                                                                          fx+
-                                                                          
*mode*
-                                                                          
noexpand)
-                                                                        ((top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top)
-                                                                         (top))
-                                                                        ("i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"
-                                                                         "i"))
-                                                                      #(ribcage
-                                                                        
(define-structure
-                                                                          
and-map*)
-                                                                        ((top)
-                                                                         (top))
-                                                                        ("i"
-                                                                         "i")))
-                                                                     (hygiene
-                                                                       guile)))
-                                                              'compile
-                                                              (if 
(#{free-id=?\ 154}#
-                                                                    #{x\ 855}#
-                                                                    
'#(syntax-object
-                                                                       load
-                                                                       ((top)
-                                                                        
#(ribcage
-                                                                          ()
-                                                                          ()
-                                                                          ())
-                                                                        
#(ribcage
-                                                                          ()
-                                                                          ()
-                                                                          ())
-                                                                        
#(ribcage
-                                                                          ()
-                                                                          ()
-                                                                          ())
-                                                                        
#(ribcage
-                                                                          #(x)
-                                                                          
#((top))
-                                                                          
#("i"))
-                                                                        
#(ribcage
-                                                                          ()
-                                                                          ()
-                                                                          ())
-                                                                        
#(ribcage
-                                                                          #(f
-                                                                            
when-list
-                                                                            
situations)
-                                                                          
#((top)
-                                                                            
(top)
-                                                                            
(top))
-                                                                          #("i"
-                                                                            "i"
-                                                                            
"i"))
-                                                                        
#(ribcage
-                                                                          ()
-                                                                          ()
-                                                                          ())
-                                                                        
#(ribcage
-                                                                          #(e
-                                                                            
when-list
-                                                                            w)
-                                                                          
#((top)
-                                                                            
(top)
-                                                                            
(top))
-                                                                          #("i"
-                                                                            "i"
-                                                                            
"i"))
-                                                                        
#(ribcage
-                                                                          
(lambda-var-list
-                                                                            
gen-var
-                                                                            
strip
-                                                                            
chi-lambda-case
-                                                                            
lambda*-formals
-                                                                            
chi-simple-lambda
-                                                                            
lambda-formals
-                                                                            
ellipsis?
-                                                                            
chi-void
-                                                                            
eval-local-transformer
-                                                                            
chi-local-syntax
-                                                                            
chi-body
-                                                                            
chi-macro
-                                                                            
chi-application
-                                                                            
chi-expr
-                                                                            chi
-                                                                            
chi-top
-                                                                            
syntax-type
-                                                                            
chi-when-list
-                                                                            
chi-install-global
-                                                                            
chi-top-sequence
-                                                                            
chi-sequence
-                                                                            
source-wrap
-                                                                            
wrap
-                                                                            
bound-id-member?
-                                                                            
distinct-bound-ids?
-                                                                            
valid-bound-ids?
-                                                                            
bound-id=?
-                                                                            
free-id=?
-                                                                            
id-var-name
-                                                                            
same-marks?
-                                                                            
join-marks
-                                                                            
join-wraps
-                                                                            
smart-append
-                                                                            
make-binding-wrap
-                                                                            
extend-ribcage!
-                                                                            
make-empty-ribcage
-                                                                            
new-mark
-                                                                            
anti-mark
-                                                                            
the-anti-mark
-                                                                            
top-marked?
-                                                                            
top-wrap
-                                                                            
empty-wrap
-                                                                            
set-ribcage-labels!
-                                                                            
set-ribcage-marks!
-                                                                            
set-ribcage-symnames!
-                                                                            
ribcage-labels
-                                                                            
ribcage-marks
-                                                                            
ribcage-symnames
-                                                                            
ribcage?
-                                                                            
make-ribcage
-                                                                            
gen-labels
-                                                                            
gen-label
-                                                                            
make-rename
-                                                                            
rename-marks
-                                                                            
rename-new
-                                                                            
rename-old
-                                                                            
subst-rename?
-                                                                            
wrap-subst
-                                                                            
wrap-marks
-                                                                            
make-wrap
-                                                                            
id-sym-name&marks
-                                                                            
id-sym-name
-                                                                            id?
-                                                                            
nonsymbol-id?
-                                                                            
global-extend
-                                                                            
lookup
-                                                                            
macros-only-env
-                                                                            
extend-var-env
-                                                                            
extend-env
-                                                                            
null-env
-                                                                            
binding-value
-                                                                            
binding-type
-                                                                            
make-binding
-                                                                            
arg-check
-                                                                            
source-annotation
-                                                                            
no-source
-                                                                            
set-syntax-object-module!
-                                                                            
set-syntax-object-wrap!
-                                                                            
set-syntax-object-expression!
-                                                                            
syntax-object-module
-                                                                            
syntax-object-wrap
-                                                                            
syntax-object-expression
-                                                                            
syntax-object?
-                                                                            
make-syntax-object
-                                                                            
build-lexical-var
-                                                                            
build-letrec
-                                                                            
build-named-let
-                                                                            
build-let
-                                                                            
build-sequence
-                                                                            
build-data
-                                                                            
build-primref
-                                                                            
build-lambda-case
-                                                                            
build-case-lambda
-                                                                            
build-simple-lambda
-                                                                            
build-global-definition
-                                                                            
maybe-name-value!
-                                                                            
build-global-assignment
-                                                                            
build-global-reference
-                                                                            
analyze-variable
-                                                                            
build-lexical-assignment
-                                                                            
build-lexical-reference
-                                                                            
build-conditional
-                                                                            
build-application
-                                                                            
build-void
-                                                                            
decorate-source
-                                                                            
get-global-definition-hook
-                                                                            
put-global-definition-hook
-                                                                            
gensym-hook
-                                                                            
local-eval-hook
-                                                                            
top-level-eval-hook
-                                                                            fx<
-                                                                            fx=
-                                                                            fx-
-                                                                            fx+
-                                                                            
*mode*
-                                                                            
noexpand)
-                                                                          
((top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top)
-                                                                           
(top))
-                                                                          ("i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           "i"
-                                                                           
"i"))
-                                                                        
#(ribcage
-                                                                          
(define-structure
-                                                                            
and-map*)
-                                                                          
((top)
-                                                                           
(top))
-                                                                          ("i"
-                                                                           
"i")))
-                                                                       (hygiene
-                                                                         
guile)))
-                                                                'load
-                                                                (if 
(#{free-id=?\ 154}#
-                                                                      #{x\ 
855}#
-                                                                      
'#(syntax-object
-                                                                         eval
-                                                                         ((top)
-                                                                          
#(ribcage
-                                                                            ()
-                                                                            ()
-                                                                            ())
-                                                                          
#(ribcage
-                                                                            ()
-                                                                            ()
-                                                                            ())
-                                                                          
#(ribcage
-                                                                            ()
-                                                                            ()
-                                                                            ())
-                                                                          
#(ribcage
-                                                                            
#(x)
-                                                                            
#((top))
-                                                                            
#("i"))
-                                                                          
#(ribcage
-                                                                            ()
-                                                                            ()
-                                                                            ())
-                                                                          
#(ribcage
-                                                                            #(f
-                                                                              
when-list
-                                                                              
situations)
-                                                                            
#((top)
-                                                                              
(top)
-                                                                              
(top))
-                                                                            
#("i"
-                                                                              
"i"
-                                                                              
"i"))
-                                                                          
#(ribcage
-                                                                            ()
-                                                                            ()
-                                                                            ())
-                                                                          
#(ribcage
-                                                                            #(e
-                                                                              
when-list
-                                                                              
w)
-                                                                            
#((top)
-                                                                              
(top)
-                                                                              
(top))
-                                                                            
#("i"
-                                                                              
"i"
-                                                                              
"i"))
-                                                                          
#(ribcage
-                                                                            
(lambda-var-list
-                                                                              
gen-var
-                                                                              
strip
-                                                                              
chi-lambda-case
-                                                                              
lambda*-formals
-                                                                              
chi-simple-lambda
-                                                                              
lambda-formals
-                                                                              
ellipsis?
-                                                                              
chi-void
-                                                                              
eval-local-transformer
-                                                                              
chi-local-syntax
-                                                                              
chi-body
-                                                                              
chi-macro
-                                                                              
chi-application
-                                                                              
chi-expr
-                                                                              
chi
-                                                                              
chi-top
-                                                                              
syntax-type
-                                                                              
chi-when-list
-                                                                              
chi-install-global
-                                                                              
chi-top-sequence
-                                                                              
chi-sequence
-                                                                              
source-wrap
-                                                                              
wrap
-                                                                              
bound-id-member?
-                                                                              
distinct-bound-ids?
-                                                                              
valid-bound-ids?
-                                                                              
bound-id=?
-                                                                              
free-id=?
-                                                                              
id-var-name
-                                                                              
same-marks?
-                                                                              
join-marks
-                                                                              
join-wraps
-                                                                              
smart-append
-                                                                              
make-binding-wrap
-                                                                              
extend-ribcage!
-                                                                              
make-empty-ribcage
-                                                                              
new-mark
-                                                                              
anti-mark
-                                                                              
the-anti-mark
-                                                                              
top-marked?
-                                                                              
top-wrap
-                                                                              
empty-wrap
-                                                                              
set-ribcage-labels!
-                                                                              
set-ribcage-marks!
-                                                                              
set-ribcage-symnames!
-                                                                              
ribcage-labels
-                                                                              
ribcage-marks
-                                                                              
ribcage-symnames
-                                                                              
ribcage?
-                                                                              
make-ribcage
-                                                                              
gen-labels
-                                                                              
gen-label
-                                                                              
make-rename
-                                                                              
rename-marks
-                                                                              
rename-new
-                                                                              
rename-old
-                                                                              
subst-rename?
-                                                                              
wrap-subst
-                                                                              
wrap-marks
-                                                                              
make-wrap
-                                                                              
id-sym-name&marks
-                                                                              
id-sym-name
-                                                                              
id?
-                                                                              
nonsymbol-id?
-                                                                              
global-extend
-                                                                              
lookup
-                                                                              
macros-only-env
-                                                                              
extend-var-env
-                                                                              
extend-env
-                                                                              
null-env
-                                                                              
binding-value
-                                                                              
binding-type
-                                                                              
make-binding
-                                                                              
arg-check
-                                                                              
source-annotation
-                                                                              
no-source
-                                                                              
set-syntax-object-module!
-                                                                              
set-syntax-object-wrap!
-                                                                              
set-syntax-object-expression!
-                                                                              
syntax-object-module
-                                                                              
syntax-object-wrap
-                                                                              
syntax-object-expression
-                                                                              
syntax-object?
-                                                                              
make-syntax-object
-                                                                              
build-lexical-var
-                                                                              
build-letrec
-                                                                              
build-named-let
-                                                                              
build-let
-                                                                              
build-sequence
-                                                                              
build-data
-                                                                              
build-primref
-                                                                              
build-lambda-case
-                                                                              
build-case-lambda
-                                                                              
build-simple-lambda
-                                                                              
build-global-definition
-                                                                              
maybe-name-value!
-                                                                              
build-global-assignment
-                                                                              
build-global-reference
-                                                                              
analyze-variable
-                                                                              
build-lexical-assignment
-                                                                              
build-lexical-reference
-                                                                              
build-conditional
-                                                                              
build-application
-                                                                              
build-void
-                                                                              
decorate-source
-                                                                              
get-global-definition-hook
-                                                                              
put-global-definition-hook
-                                                                              
gensym-hook
-                                                                              
local-eval-hook
-                                                                              
top-level-eval-hook
-                                                                              
fx<
-                                                                              
fx=
-                                                                              
fx-
-                                                                              
fx+
-                                                                              
*mode*
-                                                                              
noexpand)
-                                                                            
((top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top)
-                                                                             
(top))
-                                                                            
("i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"
-                                                                             
"i"))
-                                                                          
#(ribcage
-                                                                            
(define-structure
-                                                                              
and-map*)
-                                                                            
((top)
-                                                                             
(top))
-                                                                            
("i"
-                                                                             
"i")))
-                                                                         
(hygiene
-                                                                           
guile)))
-                                                                  'eval
-                                                                  
(syntax-violation
-                                                                    'eval-when
-                                                                    "invalid 
situation"
-                                                                    #{e\ 849}#
-                                                                    (#{wrap\ 
159}#
-                                                                      #{x\ 
855}#
-                                                                      #{w\ 
851}#
-                                                                      #f))))))
-                                                          #{situations\ 
854}#))))))
-                 (#{f\ 852}# #{when-list\ 850}# (quote ())))))
-           (#{chi-install-global\ 163}#
-             (lambda (#{name\ 856}# #{e\ 857}#)
-               (#{build-global-definition\ 104}#
+                         #{e\ 4459}#
+                         #{w\ 4461}#
+                         #{s\ 4462}#
+                         #{mod\ 4464}#)))))))
+           (#{chi-when-list\ 3828}#
+             (lambda (#{e\ 4512}# #{when-list\ 4513}# #{w\ 4514}#)
+               (letrec ((#{f\ 4515}#
+                          (lambda (#{when-list\ 4516}# #{situations\ 4517}#)
+                            (if (null? #{when-list\ 4516}#)
+                              #{situations\ 4517}#
+                              (#{f\ 4515}#
+                                (cdr #{when-list\ 4516}#)
+                                (cons (let ((#{x\ 4518}#
+                                              (car #{when-list\ 4516}#)))
+                                        (if (#{free-id=?\ 3818}#
+                                              #{x\ 4518}#
+                                              '#(syntax-object
+                                                 compile
+                                                 ((top)
+                                                  #(ribcage () () ())
+                                                  #(ribcage () () ())
+                                                  #(ribcage () () ())
+                                                  #(ribcage
+                                                    #(x)
+                                                    #((top))
+                                                    #("i"))
+                                                  #(ribcage () () ())
+                                                  #(ribcage
+                                                    #(f when-list situations)
+                                                    #((top) (top) (top))
+                                                    #("i" "i" "i"))
+                                                  #(ribcage () () ())
+                                                  #(ribcage
+                                                    #(e when-list w)
+                                                    #((top) (top) (top))
+                                                    #("i" "i" "i"))
+                                                  #(ribcage
+                                                    (lambda-var-list
+                                                      gen-var
+                                                      strip
+                                                      chi-lambda-case
+                                                      lambda*-formals
+                                                      chi-simple-lambda
+                                                      lambda-formals
+                                                      ellipsis?
+                                                      chi-void
+                                                      eval-local-transformer
+                                                      chi-local-syntax
+                                                      chi-body
+                                                      chi-macro
+                                                      chi-application
+                                                      chi-expr
+                                                      chi
+                                                      chi-top
+                                                      syntax-type
+                                                      chi-when-list
+                                                      chi-install-global
+                                                      chi-top-sequence
+                                                      chi-sequence
+                                                      source-wrap
+                                                      wrap
+                                                      bound-id-member?
+                                                      distinct-bound-ids?
+                                                      valid-bound-ids?
+                                                      bound-id=?
+                                                      free-id=?
+                                                      id-var-name
+                                                      same-marks?
+                                                      join-marks
+                                                      join-wraps
+                                                      smart-append
+                                                      make-binding-wrap
+                                                      extend-ribcage!
+                                                      make-empty-ribcage
+                                                      new-mark
+                                                      anti-mark
+                                                      the-anti-mark
+                                                      top-marked?
+                                                      top-wrap
+                                                      empty-wrap
+                                                      set-ribcage-labels!
+                                                      set-ribcage-marks!
+                                                      set-ribcage-symnames!
+                                                      ribcage-labels
+                                                      ribcage-marks
+                                                      ribcage-symnames
+                                                      ribcage?
+                                                      make-ribcage
+                                                      gen-labels
+                                                      gen-label
+                                                      make-rename
+                                                      rename-marks
+                                                      rename-new
+                                                      rename-old
+                                                      subst-rename?
+                                                      wrap-subst
+                                                      wrap-marks
+                                                      make-wrap
+                                                      id-sym-name&marks
+                                                      id-sym-name
+                                                      id?
+                                                      nonsymbol-id?
+                                                      global-extend
+                                                      lookup
+                                                      macros-only-env
+                                                      extend-var-env
+                                                      extend-env
+                                                      null-env
+                                                      binding-value
+                                                      binding-type
+                                                      make-binding
+                                                      arg-check
+                                                      source-annotation
+                                                      no-source
+                                                      set-syntax-object-module!
+                                                      set-syntax-object-wrap!
+                                                      
set-syntax-object-expression!
+                                                      syntax-object-module
+                                                      syntax-object-wrap
+                                                      syntax-object-expression
+                                                      syntax-object?
+                                                      make-syntax-object
+                                                      build-lexical-var
+                                                      build-letrec
+                                                      build-named-let
+                                                      build-let
+                                                      build-sequence
+                                                      build-data
+                                                      build-primref
+                                                      build-lambda-case
+                                                      build-case-lambda
+                                                      build-simple-lambda
+                                                      build-global-definition
+                                                      maybe-name-value!
+                                                      build-global-assignment
+                                                      build-global-reference
+                                                      analyze-variable
+                                                      build-lexical-assignment
+                                                      build-lexical-reference
+                                                      build-conditional
+                                                      build-application
+                                                      build-void
+                                                      decorate-source
+                                                      
get-global-definition-hook
+                                                      
put-global-definition-hook
+                                                      gensym-hook
+                                                      local-eval-hook
+                                                      top-level-eval-hook
+                                                      fx<
+                                                      fx=
+                                                      fx-
+                                                      fx+
+                                                      *mode*
+                                                      noexpand)
+                                                    ((top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top)
+                                                     (top))
+                                                    ("i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"
+                                                     "i"))
+                                                  #(ribcage
+                                                    (define-structure and-map*)
+                                                    ((top) (top))
+                                                    ("i" "i")))
+                                                 (hygiene guile)))
+                                          'compile
+                                          (if (#{free-id=?\ 3818}#
+                                                #{x\ 4518}#
+                                                '#(syntax-object
+                                                   load
+                                                   ((top)
+                                                    #(ribcage () () ())
+                                                    #(ribcage () () ())
+                                                    #(ribcage () () ())
+                                                    #(ribcage
+                                                      #(x)
+                                                      #((top))
+                                                      #("i"))
+                                                    #(ribcage () () ())
+                                                    #(ribcage
+                                                      #(f when-list situations)
+                                                      #((top) (top) (top))
+                                                      #("i" "i" "i"))
+                                                    #(ribcage () () ())
+                                                    #(ribcage
+                                                      #(e when-list w)
+                                                      #((top) (top) (top))
+                                                      #("i" "i" "i"))
+                                                    #(ribcage
+                                                      (lambda-var-list
+                                                        gen-var
+                                                        strip
+                                                        chi-lambda-case
+                                                        lambda*-formals
+                                                        chi-simple-lambda
+                                                        lambda-formals
+                                                        ellipsis?
+                                                        chi-void
+                                                        eval-local-transformer
+                                                        chi-local-syntax
+                                                        chi-body
+                                                        chi-macro
+                                                        chi-application
+                                                        chi-expr
+                                                        chi
+                                                        chi-top
+                                                        syntax-type
+                                                        chi-when-list
+                                                        chi-install-global
+                                                        chi-top-sequence
+                                                        chi-sequence
+                                                        source-wrap
+                                                        wrap
+                                                        bound-id-member?
+                                                        distinct-bound-ids?
+                                                        valid-bound-ids?
+                                                        bound-id=?
+                                                        free-id=?
+                                                        id-var-name
+                                                        same-marks?
+                                                        join-marks
+                                                        join-wraps
+                                                        smart-append
+                                                        make-binding-wrap
+                                                        extend-ribcage!
+                                                        make-empty-ribcage
+                                                        new-mark
+                                                        anti-mark
+                                                        the-anti-mark
+                                                        top-marked?
+                                                        top-wrap
+                                                        empty-wrap
+                                                        set-ribcage-labels!
+                                                        set-ribcage-marks!
+                                                        set-ribcage-symnames!
+                                                        ribcage-labels
+                                                        ribcage-marks
+                                                        ribcage-symnames
+                                                        ribcage?
+                                                        make-ribcage
+                                                        gen-labels
+                                                        gen-label
+                                                        make-rename
+                                                        rename-marks
+                                                        rename-new
+                                                        rename-old
+                                                        subst-rename?
+                                                        wrap-subst
+                                                        wrap-marks
+                                                        make-wrap
+                                                        id-sym-name&marks
+                                                        id-sym-name
+                                                        id?
+                                                        nonsymbol-id?
+                                                        global-extend
+                                                        lookup
+                                                        macros-only-env
+                                                        extend-var-env
+                                                        extend-env
+                                                        null-env
+                                                        binding-value
+                                                        binding-type
+                                                        make-binding
+                                                        arg-check
+                                                        source-annotation
+                                                        no-source
+                                                        
set-syntax-object-module!
+                                                        set-syntax-object-wrap!
+                                                        
set-syntax-object-expression!
+                                                        syntax-object-module
+                                                        syntax-object-wrap
+                                                        
syntax-object-expression
+                                                        syntax-object?
+                                                        make-syntax-object
+                                                        build-lexical-var
+                                                        build-letrec
+                                                        build-named-let
+                                                        build-let
+                                                        build-sequence
+                                                        build-data
+                                                        build-primref
+                                                        build-lambda-case
+                                                        build-case-lambda
+                                                        build-simple-lambda
+                                                        build-global-definition
+                                                        maybe-name-value!
+                                                        build-global-assignment
+                                                        build-global-reference
+                                                        analyze-variable
+                                                        
build-lexical-assignment
+                                                        build-lexical-reference
+                                                        build-conditional
+                                                        build-application
+                                                        build-void
+                                                        decorate-source
+                                                        
get-global-definition-hook
+                                                        
put-global-definition-hook
+                                                        gensym-hook
+                                                        local-eval-hook
+                                                        top-level-eval-hook
+                                                        fx<
+                                                        fx=
+                                                        fx-
+                                                        fx+
+                                                        *mode*
+                                                        noexpand)
+                                                      ((top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top)
+                                                       (top))
+                                                      ("i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"
+                                                       "i"))
+                                                    #(ribcage
+                                                      (define-structure
+                                                        and-map*)
+                                                      ((top) (top))
+                                                      ("i" "i")))
+                                                   (hygiene guile)))
+                                            'load
+                                            (if (#{free-id=?\ 3818}#
+                                                  #{x\ 4518}#
+                                                  '#(syntax-object
+                                                     eval
+                                                     ((top)
+                                                      #(ribcage () () ())
+                                                      #(ribcage () () ())
+                                                      #(ribcage () () ())
+                                                      #(ribcage
+                                                        #(x)
+                                                        #((top))
+                                                        #("i"))
+                                                      #(ribcage () () ())
+                                                      #(ribcage
+                                                        #(f
+                                                          when-list
+                                                          situations)
+                                                        #((top) (top) (top))
+                                                        #("i" "i" "i"))
+                                                      #(ribcage () () ())
+                                                      #(ribcage
+                                                        #(e when-list w)
+                                                        #((top) (top) (top))
+                                                        #("i" "i" "i"))
+                                                      #(ribcage
+                                                        (lambda-var-list
+                                                          gen-var
+                                                          strip
+                                                          chi-lambda-case
+                                                          lambda*-formals
+                                                          chi-simple-lambda
+                                                          lambda-formals
+                                                          ellipsis?
+                                                          chi-void
+                                                          
eval-local-transformer
+                                                          chi-local-syntax
+                                                          chi-body
+                                                          chi-macro
+                                                          chi-application
+                                                          chi-expr
+                                                          chi
+                                                          chi-top
+                                                          syntax-type
+                                                          chi-when-list
+                                                          chi-install-global
+                                                          chi-top-sequence
+                                                          chi-sequence
+                                                          source-wrap
+                                                          wrap
+                                                          bound-id-member?
+                                                          distinct-bound-ids?
+                                                          valid-bound-ids?
+                                                          bound-id=?
+                                                          free-id=?
+                                                          id-var-name
+                                                          same-marks?
+                                                          join-marks
+                                                          join-wraps
+                                                          smart-append
+                                                          make-binding-wrap
+                                                          extend-ribcage!
+                                                          make-empty-ribcage
+                                                          new-mark
+                                                          anti-mark
+                                                          the-anti-mark
+                                                          top-marked?
+                                                          top-wrap
+                                                          empty-wrap
+                                                          set-ribcage-labels!
+                                                          set-ribcage-marks!
+                                                          set-ribcage-symnames!
+                                                          ribcage-labels
+                                                          ribcage-marks
+                                                          ribcage-symnames
+                                                          ribcage?
+                                                          make-ribcage
+                                                          gen-labels
+                                                          gen-label
+                                                          make-rename
+                                                          rename-marks
+                                                          rename-new
+                                                          rename-old
+                                                          subst-rename?
+                                                          wrap-subst
+                                                          wrap-marks
+                                                          make-wrap
+                                                          id-sym-name&marks
+                                                          id-sym-name
+                                                          id?
+                                                          nonsymbol-id?
+                                                          global-extend
+                                                          lookup
+                                                          macros-only-env
+                                                          extend-var-env
+                                                          extend-env
+                                                          null-env
+                                                          binding-value
+                                                          binding-type
+                                                          make-binding
+                                                          arg-check
+                                                          source-annotation
+                                                          no-source
+                                                          
set-syntax-object-module!
+                                                          
set-syntax-object-wrap!
+                                                          
set-syntax-object-expression!
+                                                          syntax-object-module
+                                                          syntax-object-wrap
+                                                          
syntax-object-expression
+                                                          syntax-object?
+                                                          make-syntax-object
+                                                          build-lexical-var
+                                                          build-letrec
+                                                          build-named-let
+                                                          build-let
+                                                          build-sequence
+                                                          build-data
+                                                          build-primref
+                                                          build-lambda-case
+                                                          build-case-lambda
+                                                          build-simple-lambda
+                                                          
build-global-definition
+                                                          maybe-name-value!
+                                                          
build-global-assignment
+                                                          
build-global-reference
+                                                          analyze-variable
+                                                          
build-lexical-assignment
+                                                          
build-lexical-reference
+                                                          build-conditional
+                                                          build-application
+                                                          build-void
+                                                          decorate-source
+                                                          
get-global-definition-hook
+                                                          
put-global-definition-hook
+                                                          gensym-hook
+                                                          local-eval-hook
+                                                          top-level-eval-hook
+                                                          fx<
+                                                          fx=
+                                                          fx-
+                                                          fx+
+                                                          *mode*
+                                                          noexpand)
+                                                        ((top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top)
+                                                         (top))
+                                                        ("i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"
+                                                         "i"))
+                                                      #(ribcage
+                                                        (define-structure
+                                                          and-map*)
+                                                        ((top) (top))
+                                                        ("i" "i")))
+                                                     (hygiene guile)))
+                                              'eval
+                                              (syntax-violation
+                                                'eval-when
+                                                "invalid situation"
+                                                #{e\ 4512}#
+                                                (#{wrap\ 3823}#
+                                                  #{x\ 4518}#
+                                                  #{w\ 4514}#
+                                                  #f))))))
+                                      #{situations\ 4517}#))))))
+                 (#{f\ 4515}# #{when-list\ 4513}# (quote ())))))
+           (#{chi-install-global\ 3827}#
+             (lambda (#{name\ 4519}# #{e\ 4520}#)
+               (#{build-global-definition\ 3768}#
                  #f
-                 #{name\ 856}#
-                 (if (let ((#{v\ 858}# (module-variable
-                                         (current-module)
-                                         #{name\ 856}#)))
-                       (if #{v\ 858}#
-                         (if (variable-bound? #{v\ 858}#)
-                           (if (macro? (variable-ref #{v\ 858}#))
-                             (not (eq? (macro-type (variable-ref #{v\ 858}#))
+                 #{name\ 4519}#
+                 (if (let ((#{v\ 4521}#
+                             (module-variable
+                               (current-module)
+                               #{name\ 4519}#)))
+                       (if #{v\ 4521}#
+                         (if (variable-bound? #{v\ 4521}#)
+                           (if (macro? (variable-ref #{v\ 4521}#))
+                             (not (eq? (macro-type (variable-ref #{v\ 4521}#))
                                        'syncase-macro))
                              #f)
                            #f)
                          #f))
-                   (#{build-application\ 96}#
+                   (#{build-application\ 3760}#
                      #f
-                     (#{build-primref\ 108}#
+                     (#{build-primref\ 3772}#
                        #f
                        'make-extended-syncase-macro)
-                     (list (#{build-application\ 96}#
+                     (list (#{build-application\ 3760}#
                              #f
-                             (#{build-primref\ 108}# #f (quote module-ref))
-                             (list (#{build-application\ 96}#
+                             (#{build-primref\ 3772}# #f (quote module-ref))
+                             (list (#{build-application\ 3760}#
                                      #f
-                                     (#{build-primref\ 108}#
+                                     (#{build-primref\ 3772}#
                                        #f
                                        'current-module)
                                      '())
-                                   (#{build-data\ 109}# #f #{name\ 856}#)))
-                           (#{build-data\ 109}# #f (quote macro))
-                           #{e\ 857}#))
-                   (#{build-application\ 96}#
+                                   (#{build-data\ 3773}# #f #{name\ 4519}#)))
+                           (#{build-data\ 3773}# #f (quote macro))
+                           (#{build-application\ 3760}#
+                             #f
+                             (#{build-primref\ 3772}# #f (quote cons))
+                             (list #{e\ 4520}#
+                                   (#{build-application\ 3760}#
+                                     #f
+                                     (#{build-primref\ 3772}#
+                                       #f
+                                       'module-name)
+                                     (list (#{build-application\ 3760}#
+                                             #f
+                                             (#{build-primref\ 3772}#
+                                               #f
+                                               'current-module)
+                                             '())))))))
+                   (#{build-application\ 3760}#
                      #f
-                     (#{build-primref\ 108}#
+                     (#{build-primref\ 3772}#
                        #f
                        'make-syncase-macro)
-                     (list (#{build-data\ 109}# #f (quote macro))
-                           #{e\ 857}#))))))
-           (#{chi-top-sequence\ 162}#
-             (lambda (#{body\ 859}#
-                      #{r\ 860}#
-                      #{w\ 861}#
-                      #{s\ 862}#
-                      #{m\ 863}#
-                      #{esew\ 864}#
-                      #{mod\ 865}#)
-               (#{build-sequence\ 110}#
-                 #{s\ 862}#
-                 (letrec ((#{dobody\ 866}#
-                            (lambda (#{body\ 867}#
-                                     #{r\ 868}#
-                                     #{w\ 869}#
-                                     #{m\ 870}#
-                                     #{esew\ 871}#
-                                     #{mod\ 872}#)
-                              (if (null? #{body\ 867}#)
+                     (list (#{build-data\ 3773}# #f (quote macro))
+                           (#{build-application\ 3760}#
+                             #f
+                             (#{build-primref\ 3772}# #f (quote cons))
+                             (list #{e\ 4520}#
+                                   (#{build-application\ 3760}#
+                                     #f
+                                     (#{build-primref\ 3772}#
+                                       #f
+                                       'module-name)
+                                     (list (#{build-application\ 3760}#
+                                             #f
+                                             (#{build-primref\ 3772}#
+                                               #f
+                                               'current-module)
+                                             '())))))))))))
+           (#{chi-top-sequence\ 3826}#
+             (lambda (#{body\ 4522}#
+                      #{r\ 4523}#
+                      #{w\ 4524}#
+                      #{s\ 4525}#
+                      #{m\ 4526}#
+                      #{esew\ 4527}#
+                      #{mod\ 4528}#)
+               (#{build-sequence\ 3774}#
+                 #{s\ 4525}#
+                 (letrec ((#{dobody\ 4529}#
+                            (lambda (#{body\ 4530}#
+                                     #{r\ 4531}#
+                                     #{w\ 4532}#
+                                     #{m\ 4533}#
+                                     #{esew\ 4534}#
+                                     #{mod\ 4535}#)
+                              (if (null? #{body\ 4530}#)
                                 '()
-                                (let ((#{first\ 873}#
-                                        (#{chi-top\ 166}#
-                                          (car #{body\ 867}#)
-                                          #{r\ 868}#
-                                          #{w\ 869}#
-                                          #{m\ 870}#
-                                          #{esew\ 871}#
-                                          #{mod\ 872}#)))
-                                  (cons #{first\ 873}#
-                                        (#{dobody\ 866}#
-                                          (cdr #{body\ 867}#)
-                                          #{r\ 868}#
-                                          #{w\ 869}#
-                                          #{m\ 870}#
-                                          #{esew\ 871}#
-                                          #{mod\ 872}#)))))))
-                   (#{dobody\ 866}#
-                     #{body\ 859}#
-                     #{r\ 860}#
-                     #{w\ 861}#
-                     #{m\ 863}#
-                     #{esew\ 864}#
-                     #{mod\ 865}#)))))
-           (#{chi-sequence\ 161}#
-             (lambda (#{body\ 874}#
-                      #{r\ 875}#
-                      #{w\ 876}#
-                      #{s\ 877}#
-                      #{mod\ 878}#)
-               (#{build-sequence\ 110}#
-                 #{s\ 877}#
-                 (letrec ((#{dobody\ 879}#
-                            (lambda (#{body\ 880}#
-                                     #{r\ 881}#
-                                     #{w\ 882}#
-                                     #{mod\ 883}#)
-                              (if (null? #{body\ 880}#)
+                                (let ((#{first\ 4536}#
+                                        (#{chi-top\ 3830}#
+                                          (car #{body\ 4530}#)
+                                          #{r\ 4531}#
+                                          #{w\ 4532}#
+                                          #{m\ 4533}#
+                                          #{esew\ 4534}#
+                                          #{mod\ 4535}#)))
+                                  (cons #{first\ 4536}#
+                                        (#{dobody\ 4529}#
+                                          (cdr #{body\ 4530}#)
+                                          #{r\ 4531}#
+                                          #{w\ 4532}#
+                                          #{m\ 4533}#
+                                          #{esew\ 4534}#
+                                          #{mod\ 4535}#)))))))
+                   (#{dobody\ 4529}#
+                     #{body\ 4522}#
+                     #{r\ 4523}#
+                     #{w\ 4524}#
+                     #{m\ 4526}#
+                     #{esew\ 4527}#
+                     #{mod\ 4528}#)))))
+           (#{chi-sequence\ 3825}#
+             (lambda (#{body\ 4537}#
+                      #{r\ 4538}#
+                      #{w\ 4539}#
+                      #{s\ 4540}#
+                      #{mod\ 4541}#)
+               (#{build-sequence\ 3774}#
+                 #{s\ 4540}#
+                 (letrec ((#{dobody\ 4542}#
+                            (lambda (#{body\ 4543}#
+                                     #{r\ 4544}#
+                                     #{w\ 4545}#
+                                     #{mod\ 4546}#)
+                              (if (null? #{body\ 4543}#)
                                 '()
-                                (let ((#{first\ 884}#
-                                        (#{chi\ 167}#
-                                          (car #{body\ 880}#)
-                                          #{r\ 881}#
-                                          #{w\ 882}#
-                                          #{mod\ 883}#)))
-                                  (cons #{first\ 884}#
-                                        (#{dobody\ 879}#
-                                          (cdr #{body\ 880}#)
-                                          #{r\ 881}#
-                                          #{w\ 882}#
-                                          #{mod\ 883}#)))))))
-                   (#{dobody\ 879}#
-                     #{body\ 874}#
-                     #{r\ 875}#
-                     #{w\ 876}#
-                     #{mod\ 878}#)))))
-           (#{source-wrap\ 160}#
-             (lambda (#{x\ 885}#
-                      #{w\ 886}#
-                      #{s\ 887}#
-                      #{defmod\ 888}#)
-               (#{wrap\ 159}#
-                 (#{decorate-source\ 94}# #{x\ 885}# #{s\ 887}#)
-                 #{w\ 886}#
-                 #{defmod\ 888}#)))
-           (#{wrap\ 159}#
-             (lambda (#{x\ 889}# #{w\ 890}# #{defmod\ 891}#)
-               (if (if (null? (#{wrap-marks\ 134}# #{w\ 890}#))
-                     (null? (#{wrap-subst\ 135}# #{w\ 890}#))
+                                (let ((#{first\ 4547}#
+                                        (#{chi\ 3831}#
+                                          (car #{body\ 4543}#)
+                                          #{r\ 4544}#
+                                          #{w\ 4545}#
+                                          #{mod\ 4546}#)))
+                                  (cons #{first\ 4547}#
+                                        (#{dobody\ 4542}#
+                                          (cdr #{body\ 4543}#)
+                                          #{r\ 4544}#
+                                          #{w\ 4545}#
+                                          #{mod\ 4546}#)))))))
+                   (#{dobody\ 4542}#
+                     #{body\ 4537}#
+                     #{r\ 4538}#
+                     #{w\ 4539}#
+                     #{mod\ 4541}#)))))
+           (#{source-wrap\ 3824}#
+             (lambda (#{x\ 4548}#
+                      #{w\ 4549}#
+                      #{s\ 4550}#
+                      #{defmod\ 4551}#)
+               (#{wrap\ 3823}#
+                 (#{decorate-source\ 3758}#
+                   #{x\ 4548}#
+                   #{s\ 4550}#)
+                 #{w\ 4549}#
+                 #{defmod\ 4551}#)))
+           (#{wrap\ 3823}#
+             (lambda (#{x\ 4552}# #{w\ 4553}# #{defmod\ 4554}#)
+               (if (if (null? (#{wrap-marks\ 3798}# #{w\ 4553}#))
+                     (null? (#{wrap-subst\ 3799}# #{w\ 4553}#))
                      #f)
-                 #{x\ 889}#
-                 (if (#{syntax-object?\ 115}# #{x\ 889}#)
-                   (#{make-syntax-object\ 114}#
-                     (#{syntax-object-expression\ 116}# #{x\ 889}#)
-                     (#{join-wraps\ 150}#
-                       #{w\ 890}#
-                       (#{syntax-object-wrap\ 117}# #{x\ 889}#))
-                     (#{syntax-object-module\ 118}# #{x\ 889}#))
-                   (if (null? #{x\ 889}#)
-                     #{x\ 889}#
-                     (#{make-syntax-object\ 114}#
-                       #{x\ 889}#
-                       #{w\ 890}#
-                       #{defmod\ 891}#))))))
-           (#{bound-id-member?\ 158}#
-             (lambda (#{x\ 892}# #{list\ 893}#)
-               (if (not (null? #{list\ 893}#))
-                 (let ((#{t\ 894}# (#{bound-id=?\ 155}#
-                                     #{x\ 892}#
-                                     (car #{list\ 893}#))))
-                   (if #{t\ 894}#
-                     #{t\ 894}#
-                     (#{bound-id-member?\ 158}#
-                       #{x\ 892}#
-                       (cdr #{list\ 893}#))))
+                 #{x\ 4552}#
+                 (if (#{syntax-object?\ 3779}# #{x\ 4552}#)
+                   (#{make-syntax-object\ 3778}#
+                     (#{syntax-object-expression\ 3780}# #{x\ 4552}#)
+                     (#{join-wraps\ 3814}#
+                       #{w\ 4553}#
+                       (#{syntax-object-wrap\ 3781}# #{x\ 4552}#))
+                     (#{syntax-object-module\ 3782}# #{x\ 4552}#))
+                   (if (null? #{x\ 4552}#)
+                     #{x\ 4552}#
+                     (#{make-syntax-object\ 3778}#
+                       #{x\ 4552}#
+                       #{w\ 4553}#
+                       #{defmod\ 4554}#))))))
+           (#{bound-id-member?\ 3822}#
+             (lambda (#{x\ 4555}# #{list\ 4556}#)
+               (if (not (null? #{list\ 4556}#))
+                 (let ((#{t\ 4557}#
+                         (#{bound-id=?\ 3819}#
+                           #{x\ 4555}#
+                           (car #{list\ 4556}#))))
+                   (if #{t\ 4557}#
+                     #{t\ 4557}#
+                     (#{bound-id-member?\ 3822}#
+                       #{x\ 4555}#
+                       (cdr #{list\ 4556}#))))
                  #f)))
-           (#{distinct-bound-ids?\ 157}#
-             (lambda (#{ids\ 895}#)
-               (letrec ((#{distinct?\ 896}#
-                          (lambda (#{ids\ 897}#)
-                            (let ((#{t\ 898}# (null? #{ids\ 897}#)))
-                              (if #{t\ 898}#
-                                #{t\ 898}#
-                                (if (not (#{bound-id-member?\ 158}#
-                                           (car #{ids\ 897}#)
-                                           (cdr #{ids\ 897}#)))
-                                  (#{distinct?\ 896}# (cdr #{ids\ 897}#))
+           (#{distinct-bound-ids?\ 3821}#
+             (lambda (#{ids\ 4558}#)
+               (letrec ((#{distinct?\ 4559}#
+                          (lambda (#{ids\ 4560}#)
+                            (let ((#{t\ 4561}# (null? #{ids\ 4560}#)))
+                              (if #{t\ 4561}#
+                                #{t\ 4561}#
+                                (if (not (#{bound-id-member?\ 3822}#
+                                           (car #{ids\ 4560}#)
+                                           (cdr #{ids\ 4560}#)))
+                                  (#{distinct?\ 4559}# (cdr #{ids\ 4560}#))
                                   #f))))))
-                 (#{distinct?\ 896}# #{ids\ 895}#))))
-           (#{valid-bound-ids?\ 156}#
-             (lambda (#{ids\ 899}#)
-               (if (letrec ((#{all-ids?\ 900}#
-                              (lambda (#{ids\ 901}#)
-                                (let ((#{t\ 902}# (null? #{ids\ 901}#)))
-                                  (if #{t\ 902}#
-                                    #{t\ 902}#
-                                    (if (#{id?\ 131}# (car #{ids\ 901}#))
-                                      (#{all-ids?\ 900}# (cdr #{ids\ 901}#))
+                 (#{distinct?\ 4559}# #{ids\ 4558}#))))
+           (#{valid-bound-ids?\ 3820}#
+             (lambda (#{ids\ 4562}#)
+               (if (letrec ((#{all-ids?\ 4563}#
+                              (lambda (#{ids\ 4564}#)
+                                (let ((#{t\ 4565}# (null? #{ids\ 4564}#)))
+                                  (if #{t\ 4565}#
+                                    #{t\ 4565}#
+                                    (if (#{id?\ 3795}# (car #{ids\ 4564}#))
+                                      (#{all-ids?\ 4563}# (cdr #{ids\ 4564}#))
                                       #f))))))
-                     (#{all-ids?\ 900}# #{ids\ 899}#))
-                 (#{distinct-bound-ids?\ 157}# #{ids\ 899}#)
+                     (#{all-ids?\ 4563}# #{ids\ 4562}#))
+                 (#{distinct-bound-ids?\ 3821}# #{ids\ 4562}#)
                  #f)))
-           (#{bound-id=?\ 155}#
-             (lambda (#{i\ 903}# #{j\ 904}#)
-               (if (if (#{syntax-object?\ 115}# #{i\ 903}#)
-                     (#{syntax-object?\ 115}# #{j\ 904}#)
+           (#{bound-id=?\ 3819}#
+             (lambda (#{i\ 4566}# #{j\ 4567}#)
+               (if (if (#{syntax-object?\ 3779}# #{i\ 4566}#)
+                     (#{syntax-object?\ 3779}# #{j\ 4567}#)
                      #f)
-                 (if (eq? (#{syntax-object-expression\ 116}# #{i\ 903}#)
-                          (#{syntax-object-expression\ 116}# #{j\ 904}#))
-                   (#{same-marks?\ 152}#
-                     (#{wrap-marks\ 134}#
-                       (#{syntax-object-wrap\ 117}# #{i\ 903}#))
-                     (#{wrap-marks\ 134}#
-                       (#{syntax-object-wrap\ 117}# #{j\ 904}#)))
+                 (if (eq? (#{syntax-object-expression\ 3780}# #{i\ 4566}#)
+                          (#{syntax-object-expression\ 3780}# #{j\ 4567}#))
+                   (#{same-marks?\ 3816}#
+                     (#{wrap-marks\ 3798}#
+                       (#{syntax-object-wrap\ 3781}# #{i\ 4566}#))
+                     (#{wrap-marks\ 3798}#
+                       (#{syntax-object-wrap\ 3781}# #{j\ 4567}#)))
                    #f)
-                 (eq? #{i\ 903}# #{j\ 904}#))))
-           (#{free-id=?\ 154}#
-             (lambda (#{i\ 905}# #{j\ 906}#)
-               (if (eq? (let ((#{x\ 907}# #{i\ 905}#))
-                          (if (#{syntax-object?\ 115}# #{x\ 907}#)
-                            (#{syntax-object-expression\ 116}# #{x\ 907}#)
-                            #{x\ 907}#))
-                        (let ((#{x\ 908}# #{j\ 906}#))
-                          (if (#{syntax-object?\ 115}# #{x\ 908}#)
-                            (#{syntax-object-expression\ 116}# #{x\ 908}#)
-                            #{x\ 908}#)))
-                 (eq? (#{id-var-name\ 153}# #{i\ 905}# (quote (())))
-                      (#{id-var-name\ 153}# #{j\ 906}# (quote (()))))
+                 (eq? #{i\ 4566}# #{j\ 4567}#))))
+           (#{free-id=?\ 3818}#
+             (lambda (#{i\ 4568}# #{j\ 4569}#)
+               (if (eq? (let ((#{x\ 4570}# #{i\ 4568}#))
+                          (if (#{syntax-object?\ 3779}# #{x\ 4570}#)
+                            (#{syntax-object-expression\ 3780}# #{x\ 4570}#)
+                            #{x\ 4570}#))
+                        (let ((#{x\ 4571}# #{j\ 4569}#))
+                          (if (#{syntax-object?\ 3779}# #{x\ 4571}#)
+                            (#{syntax-object-expression\ 3780}# #{x\ 4571}#)
+                            #{x\ 4571}#)))
+                 (eq? (#{id-var-name\ 3817}# #{i\ 4568}# (quote (())))
+                      (#{id-var-name\ 3817}# #{j\ 4569}# (quote (()))))
                  #f)))
-           (#{id-var-name\ 153}#
-             (lambda (#{id\ 909}# #{w\ 910}#)
-               (letrec ((#{search-vector-rib\ 913}#
-                          (lambda (#{sym\ 919}#
-                                   #{subst\ 920}#
-                                   #{marks\ 921}#
-                                   #{symnames\ 922}#
-                                   #{ribcage\ 923}#)
-                            (let ((#{n\ 924}# (vector-length
-                                                #{symnames\ 922}#)))
-                              (letrec ((#{f\ 925}# (lambda (#{i\ 926}#)
-                                                     (if (#{fx=\ 88}#
-                                                           #{i\ 926}#
-                                                           #{n\ 924}#)
-                                                       (#{search\ 911}#
-                                                         #{sym\ 919}#
-                                                         (cdr #{subst\ 920}#)
-                                                         #{marks\ 921}#)
-                                                       (if (if (eq? (vector-ref
-                                                                      
#{symnames\ 922}#
-                                                                      #{i\ 
926}#)
-                                                                    #{sym\ 
919}#)
-                                                             (#{same-marks?\ 
152}#
-                                                               #{marks\ 921}#
-                                                               (vector-ref
-                                                                 
(#{ribcage-marks\ 141}#
-                                                                   #{ribcage\ 
923}#)
-                                                                 #{i\ 926}#))
-                                                             #f)
-                                                         (values
-                                                           (vector-ref
-                                                             
(#{ribcage-labels\ 142}#
-                                                               #{ribcage\ 
923}#)
-                                                             #{i\ 926}#)
-                                                           #{marks\ 921}#)
-                                                         (#{f\ 925}# (#{fx+\ 
86}#
-                                                                       #{i\ 
926}#
-                                                                       1)))))))
-                                (#{f\ 925}# 0)))))
-                        (#{search-list-rib\ 912}#
-                          (lambda (#{sym\ 927}#
-                                   #{subst\ 928}#
-                                   #{marks\ 929}#
-                                   #{symnames\ 930}#
-                                   #{ribcage\ 931}#)
-                            (letrec ((#{f\ 932}# (lambda (#{symnames\ 933}#
-                                                          #{i\ 934}#)
-                                                   (if (null? #{symnames\ 
933}#)
-                                                     (#{search\ 911}#
-                                                       #{sym\ 927}#
-                                                       (cdr #{subst\ 928}#)
-                                                       #{marks\ 929}#)
-                                                     (if (if (eq? (car 
#{symnames\ 933}#)
-                                                                  #{sym\ 927}#)
-                                                           (#{same-marks?\ 
152}#
-                                                             #{marks\ 929}#
-                                                             (list-ref
-                                                               
(#{ribcage-marks\ 141}#
-                                                                 #{ribcage\ 
931}#)
-                                                               #{i\ 934}#))
-                                                           #f)
-                                                       (values
-                                                         (list-ref
-                                                           (#{ribcage-labels\ 
142}#
-                                                             #{ribcage\ 931}#)
-                                                           #{i\ 934}#)
-                                                         #{marks\ 929}#)
-                                                       (#{f\ 932}# (cdr 
#{symnames\ 933}#)
-                                                                   (#{fx+\ 86}#
-                                                                     #{i\ 934}#
-                                                                     1)))))))
-                              (#{f\ 932}# #{symnames\ 930}# 0))))
-                        (#{search\ 911}#
-                          (lambda (#{sym\ 935}# #{subst\ 936}# #{marks\ 937}#)
-                            (if (null? #{subst\ 936}#)
-                              (values #f #{marks\ 937}#)
-                              (let ((#{fst\ 938}# (car #{subst\ 936}#)))
-                                (if (eq? #{fst\ 938}# (quote shift))
-                                  (#{search\ 911}#
-                                    #{sym\ 935}#
-                                    (cdr #{subst\ 936}#)
-                                    (cdr #{marks\ 937}#))
-                                  (let ((#{symnames\ 939}#
-                                          (#{ribcage-symnames\ 140}#
-                                            #{fst\ 938}#)))
-                                    (if (vector? #{symnames\ 939}#)
-                                      (#{search-vector-rib\ 913}#
-                                        #{sym\ 935}#
-                                        #{subst\ 936}#
-                                        #{marks\ 937}#
-                                        #{symnames\ 939}#
-                                        #{fst\ 938}#)
-                                      (#{search-list-rib\ 912}#
-                                        #{sym\ 935}#
-                                        #{subst\ 936}#
-                                        #{marks\ 937}#
-                                        #{symnames\ 939}#
-                                        #{fst\ 938}#)))))))))
-                 (if (symbol? #{id\ 909}#)
-                   (let ((#{t\ 940}# (call-with-values
-                                       (lambda ()
-                                         (#{search\ 911}#
-                                           #{id\ 909}#
-                                           (#{wrap-subst\ 135}# #{w\ 910}#)
-                                           (#{wrap-marks\ 134}# #{w\ 910}#)))
-                                       (lambda (#{x\ 941}# . #{ignore\ 942}#)
-                                         #{x\ 941}#))))
-                     (if #{t\ 940}# #{t\ 940}# #{id\ 909}#))
-                   (if (#{syntax-object?\ 115}# #{id\ 909}#)
-                     (let ((#{id\ 943}#
-                             (#{syntax-object-expression\ 116}# #{id\ 909}#))
-                           (#{w1\ 944}#
-                             (#{syntax-object-wrap\ 117}# #{id\ 909}#)))
-                       (let ((#{marks\ 945}#
-                               (#{join-marks\ 151}#
-                                 (#{wrap-marks\ 134}# #{w\ 910}#)
-                                 (#{wrap-marks\ 134}# #{w1\ 944}#))))
+           (#{id-var-name\ 3817}#
+             (lambda (#{id\ 4572}# #{w\ 4573}#)
+               (letrec ((#{search-vector-rib\ 4576}#
+                          (lambda (#{sym\ 4582}#
+                                   #{subst\ 4583}#
+                                   #{marks\ 4584}#
+                                   #{symnames\ 4585}#
+                                   #{ribcage\ 4586}#)
+                            (let ((#{n\ 4587}#
+                                    (vector-length #{symnames\ 4585}#)))
+                              (letrec ((#{f\ 4588}#
+                                         (lambda (#{i\ 4589}#)
+                                           (if (#{fx=\ 3752}#
+                                                 #{i\ 4589}#
+                                                 #{n\ 4587}#)
+                                             (#{search\ 4574}#
+                                               #{sym\ 4582}#
+                                               (cdr #{subst\ 4583}#)
+                                               #{marks\ 4584}#)
+                                             (if (if (eq? (vector-ref
+                                                            #{symnames\ 4585}#
+                                                            #{i\ 4589}#)
+                                                          #{sym\ 4582}#)
+                                                   (#{same-marks?\ 3816}#
+                                                     #{marks\ 4584}#
+                                                     (vector-ref
+                                                       (#{ribcage-marks\ 3805}#
+                                                         #{ribcage\ 4586}#)
+                                                       #{i\ 4589}#))
+                                                   #f)
+                                               (values
+                                                 (vector-ref
+                                                   (#{ribcage-labels\ 3806}#
+                                                     #{ribcage\ 4586}#)
+                                                   #{i\ 4589}#)
+                                                 #{marks\ 4584}#)
+                                               (#{f\ 4588}#
+                                                 (#{fx+\ 3750}#
+                                                   #{i\ 4589}#
+                                                   1)))))))
+                                (#{f\ 4588}# 0)))))
+                        (#{search-list-rib\ 4575}#
+                          (lambda (#{sym\ 4590}#
+                                   #{subst\ 4591}#
+                                   #{marks\ 4592}#
+                                   #{symnames\ 4593}#
+                                   #{ribcage\ 4594}#)
+                            (letrec ((#{f\ 4595}#
+                                       (lambda (#{symnames\ 4596}# #{i\ 4597}#)
+                                         (if (null? #{symnames\ 4596}#)
+                                           (#{search\ 4574}#
+                                             #{sym\ 4590}#
+                                             (cdr #{subst\ 4591}#)
+                                             #{marks\ 4592}#)
+                                           (if (if (eq? (car #{symnames\ 
4596}#)
+                                                        #{sym\ 4590}#)
+                                                 (#{same-marks?\ 3816}#
+                                                   #{marks\ 4592}#
+                                                   (list-ref
+                                                     (#{ribcage-marks\ 3805}#
+                                                       #{ribcage\ 4594}#)
+                                                     #{i\ 4597}#))
+                                                 #f)
+                                             (values
+                                               (list-ref
+                                                 (#{ribcage-labels\ 3806}#
+                                                   #{ribcage\ 4594}#)
+                                                 #{i\ 4597}#)
+                                               #{marks\ 4592}#)
+                                             (#{f\ 4595}#
+                                               (cdr #{symnames\ 4596}#)
+                                               (#{fx+\ 3750}#
+                                                 #{i\ 4597}#
+                                                 1)))))))
+                              (#{f\ 4595}# #{symnames\ 4593}# 0))))
+                        (#{search\ 4574}#
+                          (lambda (#{sym\ 4598}#
+                                   #{subst\ 4599}#
+                                   #{marks\ 4600}#)
+                            (if (null? #{subst\ 4599}#)
+                              (values #f #{marks\ 4600}#)
+                              (let ((#{fst\ 4601}# (car #{subst\ 4599}#)))
+                                (if (eq? #{fst\ 4601}# (quote shift))
+                                  (#{search\ 4574}#
+                                    #{sym\ 4598}#
+                                    (cdr #{subst\ 4599}#)
+                                    (cdr #{marks\ 4600}#))
+                                  (let ((#{symnames\ 4602}#
+                                          (#{ribcage-symnames\ 3804}#
+                                            #{fst\ 4601}#)))
+                                    (if (vector? #{symnames\ 4602}#)
+                                      (#{search-vector-rib\ 4576}#
+                                        #{sym\ 4598}#
+                                        #{subst\ 4599}#
+                                        #{marks\ 4600}#
+                                        #{symnames\ 4602}#
+                                        #{fst\ 4601}#)
+                                      (#{search-list-rib\ 4575}#
+                                        #{sym\ 4598}#
+                                        #{subst\ 4599}#
+                                        #{marks\ 4600}#
+                                        #{symnames\ 4602}#
+                                        #{fst\ 4601}#)))))))))
+                 (if (symbol? #{id\ 4572}#)
+                   (let ((#{t\ 4603}#
+                           (call-with-values
+                             (lambda ()
+                               (#{search\ 4574}#
+                                 #{id\ 4572}#
+                                 (#{wrap-subst\ 3799}# #{w\ 4573}#)
+                                 (#{wrap-marks\ 3798}# #{w\ 4573}#)))
+                             (lambda (#{x\ 4604}# . #{ignore\ 4605}#)
+                               #{x\ 4604}#))))
+                     (if #{t\ 4603}# #{t\ 4603}# #{id\ 4572}#))
+                   (if (#{syntax-object?\ 3779}# #{id\ 4572}#)
+                     (let ((#{id\ 4606}#
+                             (#{syntax-object-expression\ 3780}# #{id\ 4572}#))
+                           (#{w1\ 4607}#
+                             (#{syntax-object-wrap\ 3781}# #{id\ 4572}#)))
+                       (let ((#{marks\ 4608}#
+                               (#{join-marks\ 3815}#
+                                 (#{wrap-marks\ 3798}# #{w\ 4573}#)
+                                 (#{wrap-marks\ 3798}# #{w1\ 4607}#))))
                          (call-with-values
                            (lambda ()
-                             (#{search\ 911}#
-                               #{id\ 943}#
-                               (#{wrap-subst\ 135}# #{w\ 910}#)
-                               #{marks\ 945}#))
-                           (lambda (#{new-id\ 946}# #{marks\ 947}#)
-                             (let ((#{t\ 948}# #{new-id\ 946}#))
-                               (if #{t\ 948}#
-                                 #{t\ 948}#
-                                 (let ((#{t\ 949}# (call-with-values
-                                                     (lambda ()
-                                                       (#{search\ 911}#
-                                                         #{id\ 943}#
-                                                         (#{wrap-subst\ 135}#
-                                                           #{w1\ 944}#)
-                                                         #{marks\ 947}#))
-                                                     (lambda (#{x\ 950}#
-                                                              .
-                                                              #{ignore\ 951}#)
-                                                       #{x\ 950}#))))
-                                   (if #{t\ 949}#
-                                     #{t\ 949}#
-                                     #{id\ 943}#))))))))
+                             (#{search\ 4574}#
+                               #{id\ 4606}#
+                               (#{wrap-subst\ 3799}# #{w\ 4573}#)
+                               #{marks\ 4608}#))
+                           (lambda (#{new-id\ 4609}# #{marks\ 4610}#)
+                             (let ((#{t\ 4611}# #{new-id\ 4609}#))
+                               (if #{t\ 4611}#
+                                 #{t\ 4611}#
+                                 (let ((#{t\ 4612}#
+                                         (call-with-values
+                                           (lambda ()
+                                             (#{search\ 4574}#
+                                               #{id\ 4606}#
+                                               (#{wrap-subst\ 3799}#
+                                                 #{w1\ 4607}#)
+                                               #{marks\ 4610}#))
+                                           (lambda (#{x\ 4613}#
+                                                    .
+                                                    #{ignore\ 4614}#)
+                                             #{x\ 4613}#))))
+                                   (if #{t\ 4612}#
+                                     #{t\ 4612}#
+                                     #{id\ 4606}#))))))))
                      (syntax-violation
                        'id-var-name
                        "invalid id"
-                       #{id\ 909}#))))))
-           (#{same-marks?\ 152}#
-             (lambda (#{x\ 952}# #{y\ 953}#)
-               (let ((#{t\ 954}# (eq? #{x\ 952}# #{y\ 953}#)))
-                 (if #{t\ 954}#
-                   #{t\ 954}#
-                   (if (not (null? #{x\ 952}#))
-                     (if (not (null? #{y\ 953}#))
-                       (if (eq? (car #{x\ 952}#) (car #{y\ 953}#))
-                         (#{same-marks?\ 152}#
-                           (cdr #{x\ 952}#)
-                           (cdr #{y\ 953}#))
+                       #{id\ 4572}#))))))
+           (#{same-marks?\ 3816}#
+             (lambda (#{x\ 4615}# #{y\ 4616}#)
+               (let ((#{t\ 4617}# (eq? #{x\ 4615}# #{y\ 4616}#)))
+                 (if #{t\ 4617}#
+                   #{t\ 4617}#
+                   (if (not (null? #{x\ 4615}#))
+                     (if (not (null? #{y\ 4616}#))
+                       (if (eq? (car #{x\ 4615}#) (car #{y\ 4616}#))
+                         (#{same-marks?\ 3816}#
+                           (cdr #{x\ 4615}#)
+                           (cdr #{y\ 4616}#))
                          #f)
                        #f)
                      #f)))))
-           (#{join-marks\ 151}#
-             (lambda (#{m1\ 955}# #{m2\ 956}#)
-               (#{smart-append\ 149}# #{m1\ 955}# #{m2\ 956}#)))
-           (#{join-wraps\ 150}#
-             (lambda (#{w1\ 957}# #{w2\ 958}#)
-               (let ((#{m1\ 959}# (#{wrap-marks\ 134}# #{w1\ 957}#))
-                     (#{s1\ 960}# (#{wrap-subst\ 135}# #{w1\ 957}#)))
-                 (if (null? #{m1\ 959}#)
-                   (if (null? #{s1\ 960}#)
-                     #{w2\ 958}#
-                     (#{make-wrap\ 133}#
-                       (#{wrap-marks\ 134}# #{w2\ 958}#)
-                       (#{smart-append\ 149}#
-                         #{s1\ 960}#
-                         (#{wrap-subst\ 135}# #{w2\ 958}#))))
-                   (#{make-wrap\ 133}#
-                     (#{smart-append\ 149}#
-                       #{m1\ 959}#
-                       (#{wrap-marks\ 134}# #{w2\ 958}#))
-                     (#{smart-append\ 149}#
-                       #{s1\ 960}#
-                       (#{wrap-subst\ 135}# #{w2\ 958}#)))))))
-           (#{smart-append\ 149}#
-             (lambda (#{m1\ 961}# #{m2\ 962}#)
-               (if (null? #{m2\ 962}#)
-                 #{m1\ 961}#
-                 (append #{m1\ 961}# #{m2\ 962}#))))
-           (#{make-binding-wrap\ 148}#
-             (lambda (#{ids\ 963}# #{labels\ 964}# #{w\ 965}#)
-               (if (null? #{ids\ 963}#)
-                 #{w\ 965}#
-                 (#{make-wrap\ 133}#
-                   (#{wrap-marks\ 134}# #{w\ 965}#)
-                   (cons (let ((#{labelvec\ 966}#
-                                 (list->vector #{labels\ 964}#)))
-                           (let ((#{n\ 967}# (vector-length
-                                               #{labelvec\ 966}#)))
-                             (let ((#{symnamevec\ 968}#
-                                     (make-vector #{n\ 967}#))
-                                   (#{marksvec\ 969}#
-                                     (make-vector #{n\ 967}#)))
+           (#{join-marks\ 3815}#
+             (lambda (#{m1\ 4618}# #{m2\ 4619}#)
+               (#{smart-append\ 3813}#
+                 #{m1\ 4618}#
+                 #{m2\ 4619}#)))
+           (#{join-wraps\ 3814}#
+             (lambda (#{w1\ 4620}# #{w2\ 4621}#)
+               (let ((#{m1\ 4622}#
+                       (#{wrap-marks\ 3798}# #{w1\ 4620}#))
+                     (#{s1\ 4623}#
+                       (#{wrap-subst\ 3799}# #{w1\ 4620}#)))
+                 (if (null? #{m1\ 4622}#)
+                   (if (null? #{s1\ 4623}#)
+                     #{w2\ 4621}#
+                     (#{make-wrap\ 3797}#
+                       (#{wrap-marks\ 3798}# #{w2\ 4621}#)
+                       (#{smart-append\ 3813}#
+                         #{s1\ 4623}#
+                         (#{wrap-subst\ 3799}# #{w2\ 4621}#))))
+                   (#{make-wrap\ 3797}#
+                     (#{smart-append\ 3813}#
+                       #{m1\ 4622}#
+                       (#{wrap-marks\ 3798}# #{w2\ 4621}#))
+                     (#{smart-append\ 3813}#
+                       #{s1\ 4623}#
+                       (#{wrap-subst\ 3799}# #{w2\ 4621}#)))))))
+           (#{smart-append\ 3813}#
+             (lambda (#{m1\ 4624}# #{m2\ 4625}#)
+               (if (null? #{m2\ 4625}#)
+                 #{m1\ 4624}#
+                 (append #{m1\ 4624}# #{m2\ 4625}#))))
+           (#{make-binding-wrap\ 3812}#
+             (lambda (#{ids\ 4626}# #{labels\ 4627}# #{w\ 4628}#)
+               (if (null? #{ids\ 4626}#)
+                 #{w\ 4628}#
+                 (#{make-wrap\ 3797}#
+                   (#{wrap-marks\ 3798}# #{w\ 4628}#)
+                   (cons (let ((#{labelvec\ 4629}#
+                                 (list->vector #{labels\ 4627}#)))
+                           (let ((#{n\ 4630}#
+                                   (vector-length #{labelvec\ 4629}#)))
+                             (let ((#{symnamevec\ 4631}#
+                                     (make-vector #{n\ 4630}#))
+                                   (#{marksvec\ 4632}#
+                                     (make-vector #{n\ 4630}#)))
                                (begin
-                                 (letrec ((#{f\ 970}# (lambda (#{ids\ 971}#
-                                                               #{i\ 972}#)
-                                                        (if (not (null? #{ids\ 
971}#))
-                                                          (call-with-values
-                                                            (lambda ()
-                                                              
(#{id-sym-name&marks\ 132}#
-                                                                (car #{ids\ 
971}#)
-                                                                #{w\ 965}#))
-                                                            (lambda 
(#{symname\ 973}#
-                                                                     #{marks\ 
974}#)
-                                                              (begin
-                                                                (vector-set!
-                                                                  
#{symnamevec\ 968}#
-                                                                  #{i\ 972}#
-                                                                  #{symname\ 
973}#)
-                                                                (vector-set!
-                                                                  #{marksvec\ 
969}#
-                                                                  #{i\ 972}#
-                                                                  #{marks\ 
974}#)
-                                                                (#{f\ 970}# 
(cdr #{ids\ 971}#)
-                                                                            
(#{fx+\ 86}#
-                                                                              
#{i\ 972}#
-                                                                              
1)))))))))
-                                   (#{f\ 970}# #{ids\ 963}# 0))
-                                 (#{make-ribcage\ 138}#
-                                   #{symnamevec\ 968}#
-                                   #{marksvec\ 969}#
-                                   #{labelvec\ 966}#)))))
-                         (#{wrap-subst\ 135}# #{w\ 965}#))))))
-           (#{extend-ribcage!\ 147}#
-             (lambda (#{ribcage\ 975}# #{id\ 976}# #{label\ 977}#)
+                                 (letrec ((#{f\ 4633}#
+                                            (lambda (#{ids\ 4634}# #{i\ 4635}#)
+                                              (if (not (null? #{ids\ 4634}#))
+                                                (call-with-values
+                                                  (lambda ()
+                                                    (#{id-sym-name&marks\ 
3796}#
+                                                      (car #{ids\ 4634}#)
+                                                      #{w\ 4628}#))
+                                                  (lambda (#{symname\ 4636}#
+                                                           #{marks\ 4637}#)
+                                                    (begin
+                                                      (vector-set!
+                                                        #{symnamevec\ 4631}#
+                                                        #{i\ 4635}#
+                                                        #{symname\ 4636}#)
+                                                      (vector-set!
+                                                        #{marksvec\ 4632}#
+                                                        #{i\ 4635}#
+                                                        #{marks\ 4637}#)
+                                                      (#{f\ 4633}#
+                                                        (cdr #{ids\ 4634}#)
+                                                        (#{fx+\ 3750}#
+                                                          #{i\ 4635}#
+                                                          1)))))))))
+                                   (#{f\ 4633}# #{ids\ 4626}# 0))
+                                 (#{make-ribcage\ 3802}#
+                                   #{symnamevec\ 4631}#
+                                   #{marksvec\ 4632}#
+                                   #{labelvec\ 4629}#)))))
+                         (#{wrap-subst\ 3799}# #{w\ 4628}#))))))
+           (#{extend-ribcage!\ 3811}#
+             (lambda (#{ribcage\ 4638}# #{id\ 4639}# #{label\ 4640}#)
                (begin
-                 (#{set-ribcage-symnames!\ 143}#
-                   #{ribcage\ 975}#
-                   (cons (#{syntax-object-expression\ 116}# #{id\ 976}#)
-                         (#{ribcage-symnames\ 140}# #{ribcage\ 975}#)))
-                 (#{set-ribcage-marks!\ 144}#
-                   #{ribcage\ 975}#
-                   (cons (#{wrap-marks\ 134}#
-                           (#{syntax-object-wrap\ 117}# #{id\ 976}#))
-                         (#{ribcage-marks\ 141}# #{ribcage\ 975}#)))
-                 (#{set-ribcage-labels!\ 145}#
-                   #{ribcage\ 975}#
-                   (cons #{label\ 977}#
-                         (#{ribcage-labels\ 142}# #{ribcage\ 975}#))))))
-           (#{anti-mark\ 146}#
-             (lambda (#{w\ 978}#)
-               (#{make-wrap\ 133}#
-                 (cons #f (#{wrap-marks\ 134}# #{w\ 978}#))
+                 (#{set-ribcage-symnames!\ 3807}#
+                   #{ribcage\ 4638}#
+                   (cons (#{syntax-object-expression\ 3780}# #{id\ 4639}#)
+                         (#{ribcage-symnames\ 3804}# #{ribcage\ 4638}#)))
+                 (#{set-ribcage-marks!\ 3808}#
+                   #{ribcage\ 4638}#
+                   (cons (#{wrap-marks\ 3798}#
+                           (#{syntax-object-wrap\ 3781}# #{id\ 4639}#))
+                         (#{ribcage-marks\ 3805}# #{ribcage\ 4638}#)))
+                 (#{set-ribcage-labels!\ 3809}#
+                   #{ribcage\ 4638}#
+                   (cons #{label\ 4640}#
+                         (#{ribcage-labels\ 3806}# #{ribcage\ 4638}#))))))
+           (#{anti-mark\ 3810}#
+             (lambda (#{w\ 4641}#)
+               (#{make-wrap\ 3797}#
+                 (cons #f (#{wrap-marks\ 3798}# #{w\ 4641}#))
                  (cons 'shift
-                       (#{wrap-subst\ 135}# #{w\ 978}#)))))
-           (#{set-ribcage-labels!\ 145}#
-             (lambda (#{x\ 979}# #{update\ 980}#)
-               (vector-set! #{x\ 979}# 3 #{update\ 980}#)))
-           (#{set-ribcage-marks!\ 144}#
-             (lambda (#{x\ 981}# #{update\ 982}#)
-               (vector-set! #{x\ 981}# 2 #{update\ 982}#)))
-           (#{set-ribcage-symnames!\ 143}#
-             (lambda (#{x\ 983}# #{update\ 984}#)
-               (vector-set! #{x\ 983}# 1 #{update\ 984}#)))
-           (#{ribcage-labels\ 142}#
-             (lambda (#{x\ 985}#) (vector-ref #{x\ 985}# 3)))
-           (#{ribcage-marks\ 141}#
-             (lambda (#{x\ 986}#) (vector-ref #{x\ 986}# 2)))
-           (#{ribcage-symnames\ 140}#
-             (lambda (#{x\ 987}#) (vector-ref #{x\ 987}# 1)))
-           (#{ribcage?\ 139}#
-             (lambda (#{x\ 988}#)
-               (if (vector? #{x\ 988}#)
-                 (if (= (vector-length #{x\ 988}#) 4)
-                   (eq? (vector-ref #{x\ 988}# 0) (quote ribcage))
+                       (#{wrap-subst\ 3799}# #{w\ 4641}#)))))
+           (#{set-ribcage-labels!\ 3809}#
+             (lambda (#{x\ 4642}# #{update\ 4643}#)
+               (vector-set! #{x\ 4642}# 3 #{update\ 4643}#)))
+           (#{set-ribcage-marks!\ 3808}#
+             (lambda (#{x\ 4644}# #{update\ 4645}#)
+               (vector-set! #{x\ 4644}# 2 #{update\ 4645}#)))
+           (#{set-ribcage-symnames!\ 3807}#
+             (lambda (#{x\ 4646}# #{update\ 4647}#)
+               (vector-set! #{x\ 4646}# 1 #{update\ 4647}#)))
+           (#{ribcage-labels\ 3806}#
+             (lambda (#{x\ 4648}#) (vector-ref #{x\ 4648}# 3)))
+           (#{ribcage-marks\ 3805}#
+             (lambda (#{x\ 4649}#) (vector-ref #{x\ 4649}# 2)))
+           (#{ribcage-symnames\ 3804}#
+             (lambda (#{x\ 4650}#) (vector-ref #{x\ 4650}# 1)))
+           (#{ribcage?\ 3803}#
+             (lambda (#{x\ 4651}#)
+               (if (vector? #{x\ 4651}#)
+                 (if (= (vector-length #{x\ 4651}#) 4)
+                   (eq? (vector-ref #{x\ 4651}# 0) (quote ribcage))
                    #f)
                  #f)))
-           (#{make-ribcage\ 138}#
-             (lambda (#{symnames\ 989}#
-                      #{marks\ 990}#
-                      #{labels\ 991}#)
+           (#{make-ribcage\ 3802}#
+             (lambda (#{symnames\ 4652}#
+                      #{marks\ 4653}#
+                      #{labels\ 4654}#)
                (vector
                  'ribcage
-                 #{symnames\ 989}#
-                 #{marks\ 990}#
-                 #{labels\ 991}#)))
-           (#{gen-labels\ 137}#
-             (lambda (#{ls\ 992}#)
-               (if (null? #{ls\ 992}#)
+                 #{symnames\ 4652}#
+                 #{marks\ 4653}#
+                 #{labels\ 4654}#)))
+           (#{gen-labels\ 3801}#
+             (lambda (#{ls\ 4655}#)
+               (if (null? #{ls\ 4655}#)
                  '()
-                 (cons (#{gen-label\ 136}#)
-                       (#{gen-labels\ 137}# (cdr #{ls\ 992}#))))))
-           (#{gen-label\ 136}# (lambda () (string #\i)))
-           (#{wrap-subst\ 135}# cdr)
-           (#{wrap-marks\ 134}# car)
-           (#{make-wrap\ 133}# cons)
-           (#{id-sym-name&marks\ 132}#
-             (lambda (#{x\ 993}# #{w\ 994}#)
-               (if (#{syntax-object?\ 115}# #{x\ 993}#)
+                 (cons (#{gen-label\ 3800}#)
+                       (#{gen-labels\ 3801}# (cdr #{ls\ 4655}#))))))
+           (#{gen-label\ 3800}# (lambda () (string #\i)))
+           (#{wrap-subst\ 3799}# cdr)
+           (#{wrap-marks\ 3798}# car)
+           (#{make-wrap\ 3797}# cons)
+           (#{id-sym-name&marks\ 3796}#
+             (lambda (#{x\ 4656}# #{w\ 4657}#)
+               (if (#{syntax-object?\ 3779}# #{x\ 4656}#)
                  (values
-                   (#{syntax-object-expression\ 116}# #{x\ 993}#)
-                   (#{join-marks\ 151}#
-                     (#{wrap-marks\ 134}# #{w\ 994}#)
-                     (#{wrap-marks\ 134}#
-                       (#{syntax-object-wrap\ 117}# #{x\ 993}#))))
+                   (#{syntax-object-expression\ 3780}# #{x\ 4656}#)
+                   (#{join-marks\ 3815}#
+                     (#{wrap-marks\ 3798}# #{w\ 4657}#)
+                     (#{wrap-marks\ 3798}#
+                       (#{syntax-object-wrap\ 3781}# #{x\ 4656}#))))
                  (values
-                   #{x\ 993}#
-                   (#{wrap-marks\ 134}# #{w\ 994}#)))))
-           (#{id?\ 131}#
-             (lambda (#{x\ 995}#)
-               (if (symbol? #{x\ 995}#)
+                   #{x\ 4656}#
+                   (#{wrap-marks\ 3798}# #{w\ 4657}#)))))
+           (#{id?\ 3795}#
+             (lambda (#{x\ 4658}#)
+               (if (symbol? #{x\ 4658}#)
                  #t
-                 (if (#{syntax-object?\ 115}# #{x\ 995}#)
+                 (if (#{syntax-object?\ 3779}# #{x\ 4658}#)
                    (symbol?
-                     (#{syntax-object-expression\ 116}# #{x\ 995}#))
+                     (#{syntax-object-expression\ 3780}# #{x\ 4658}#))
                    #f))))
-           (#{nonsymbol-id?\ 130}#
-             (lambda (#{x\ 996}#)
-               (if (#{syntax-object?\ 115}# #{x\ 996}#)
+           (#{nonsymbol-id?\ 3794}#
+             (lambda (#{x\ 4659}#)
+               (if (#{syntax-object?\ 3779}# #{x\ 4659}#)
                  (symbol?
-                   (#{syntax-object-expression\ 116}# #{x\ 996}#))
+                   (#{syntax-object-expression\ 3780}# #{x\ 4659}#))
                  #f)))
-           (#{global-extend\ 129}#
-             (lambda (#{type\ 997}# #{sym\ 998}# #{val\ 999}#)
-               (#{put-global-definition-hook\ 92}#
-                 #{sym\ 998}#
-                 #{type\ 997}#
-                 #{val\ 999}#)))
-           (#{lookup\ 128}#
-             (lambda (#{x\ 1000}# #{r\ 1001}# #{mod\ 1002}#)
-               (let ((#{t\ 1003}# (assq #{x\ 1000}# #{r\ 1001}#)))
-                 (if #{t\ 1003}#
-                   (cdr #{t\ 1003}#)
-