~ chicken-core (chicken-5) 7d098fe47808b9442634975b05fb2d8fe7399c6a
commit 7d098fe47808b9442634975b05fb2d8fe7399c6a Author: Evan Hanson <evhan@foldling.org> AuthorDate: Tue Oct 17 18:54:02 2017 +1300 Commit: Peter Bex <peter@more-magic.net> CommitDate: Wed Oct 18 14:05:17 2017 +0200 Move `require-extension-for-syntax' out of the default macro environment Also, update and sort the list of identifiers to be filtered when constructing the rnrs[-null] environments in eval.scm, which had gone out of date with recent changes (3a5150e0, 58bc3769 and a647d9ed). Signed-off-by: Peter Bex <peter@more-magic.net> diff --git a/chicken-syntax.scm b/chicken-syntax.scm index 3abda348..ca0dcdfb 100644 --- a/chicken-syntax.scm +++ b/chicken-syntax.scm @@ -1171,6 +1171,13 @@ (lambda (x r c) `(,(r 'import) ,@(cdr x))))) +(##sys#extend-macro-environment + 'require-extension-for-syntax + '() + (##sys#er-transformer + (lambda (x r c) + `(,(r 'begin-for-syntax) (,(r 'require-extension) ,@(cdr x)))))) + (##sys#macro-subset me0 ##sys#default-macro-environment))) diff --git a/eval.scm b/eval.scm index 983caa33..0426e644 100644 --- a/eval.scm +++ b/eval.scm @@ -828,18 +828,20 @@ (foldr (lambda (s r) (if (memq (car s) - '(import - import-syntax + '(cond-expand + define-interface + delay-force + export + functor + import import-for-syntax + import-syntax import-syntax-for-syntax - require-extension - require-extension-for-syntax - require-library - export + letrec* module - cond-expand - syntax - reexport)) + reexport + require-library + syntax)) r (cons s r))) '() diff --git a/expand.scm b/expand.scm index 2482c92c..b2044d9a 100644 --- a/expand.scm +++ b/expand.scm @@ -1612,12 +1612,6 @@ `(##core#require ,lib ,(module-requirement name))))) (cdr x)))))) -(##sys#extend-macro-environment - 'require-extension-for-syntax - '() - (##sys#er-transformer - (lambda (x r c) - `(,(r 'begin-for-syntax) (,(r 'require-extension) ,@(cdr x)))))) ;;; syntax-rulesTrap