summaryrefslogtreecommitdiff
path: root/module/language/scheme/expand.scm
AgeCommit message (Collapse)AuthorFilesLines
2009-04-24allow docstrings with internal definitionsAndy Wingo1-306/+0
* module/Makefile.am (SCHEME_LANG_SOURCES): * module/language/scheme/expand.scm: Remove expand.scm, we don't need it any more. * module/ice-9/psyntax.scm (build-lambda, chi-lambda-clause): Support docstrings with internal definitions. What are Scheme people thinking these days? * module/ice-9/psyntax-pp.scm: Regenerated.
2009-04-24ice-9 syncase now deprecated, wooAndy Wingo1-1/+0
Remove #:use-module (ice-9 syncase) from lots of places, as it's no longer needed.
2009-04-21commit some tweaks to expand.scm, likely obviated by syncase thoughAndy Wingo1-3/+3
* module/language/scheme/expand.scm (re-annotate, expand): A couple of speculative cases for dealing with syncase better -- but all of this code is likely to go.
2009-04-17serialize module information into syncase's output -- getting ready for hygieneAndy Wingo1-1/+1
* module/ice-9/Makefile.am: Replace annotate.scm with expand-support.scm. * module/ice-9/annotate.scm: Removed; subsumed into expand-support.scm. * module/ice-9/compile-psyntax.scm: Strip out expansion structures before writing to disk. * module/ice-9/expand-support.scm: New file. Provides annotation support, and other compound data types for use by the expander. Currently the only one that is used is the toplevel reference, <module-ref>, but we will record lexicals this way soon. * module/ice-9/psyntax-pp.scm: Regenerate. * module/ice-9/psyntax.scm (build-global-reference) (build-global-assignment): Instead of expanding out global references as symbols, expand them as <module-ref> structures, with space to record the module that they should be scoped against. This is in anticipation of us actually threading the module info through the syntax transformation, so that we can get hygiene with respect to modules. * module/ice-9/syncase.scm: Replace eval-when. Since sc-expand will give us something that isn't Scheme because we put the <module-ref> structures in it, strip that info whenever we actually do need scheme. * module/language/scheme/compile-ghil.scm (lookup-transformer): Strip expansion structures here too. * module/language/scheme/expand.scm (language): Swap annotate for expand-support. But this file will die soon, I think.
2009-03-06support source-level annotations in syncaseAndy Wingo1-5/+7
* module/ice-9/annotate.scm (<annotation>): Slightly more concise printing. (annotate): Don't create annotations if we have no source info. * module/ice-9/psyntax.scm (annotation?): Remove this definition, as we now provide annotation support. * module/ice-9/psyntax-pp.scm: Regenerated. * module/ice-9/syncase.scm: Use (ice-9 annotate). * module/language/scheme/expand.scm (eval-when): Define the eval-when transformer.
2009-03-06Replace eval-case with eval-whenAndy Wingo1-1/+5
* module/ice-9/boot-9.scm (eval-when): Replace eval-case with eval-when. Eval-when is *much* simpler, and more expressive to boot. Perhaps in the future we'll get 'visit and 'revisit too. * module/ice-9/deprecated.scm (eval-case): Provide mostly-working deprecated version of eval-case. * module/ice-9/boot-9.scm (defmacro, define-macro): Relax condition: we can make defmacros that are not at the toplevel now. But in the future we should replace this implementation of defmacros with one written in syntax-case. (define-module, use-modules, use-syntax): Allow at non-toplevel. (define-public, defmacro-public, export, re-export): Don't evaluate at compile-time, I can't see how that helps things. Allow `export' and `re-export' at non-toplevel. * module/ice-9/getopt-long.scm: * module/ice-9/i18n.scm: * module/oop/goops.scm: * module/oop/goops/compile.scm: * module/oop/goops/dispatch.scm: Switch to use eval-when, not eval-case. * module/language/scheme/compile-ghil.scm (eval-when): Replace eval-case transformer with eval-when transformer. Sooooo much simpler, and it will get better once we separate expansion from compilation. * module/language/scheme/expand.scm (quasiquote): Hm, expand quasiquote properly. Not hygienic. Syncase needed. (lambda): Handle internal defines with docstrings propertly.
2009-03-02fixups to expand.scmAndy Wingo1-15/+16
* module/language/scheme/expand.scm: Some changes to avoid unnecessary begins or empty lets, and properly handle internal defines (finally).
2009-03-02add separate expansion phase, to detwingle things a bitAndy Wingo1-0/+300
* module/language/scheme/expand.scm: New module, implements a separate expansion phase, not interleaved with compilation. * module/language/scheme/amatch.scm: Helper for expand.scm, it's pmatch with support for annotated source. * module/ice-9/Makefile.am (SOURCES): Add annotate.scm to build list -- early on because it will be used in the compiler. * module/ice-9/annotate.scm: Fix the printer, default to unstripped (whatever that is), and add a deannotator. * module/system/base/compile.scm (call-with-compile-error-catch): Fix for new representation of source locations. * module/Makefile.am (SCHEME_LANG_SOURCES): Add amatch and expand.