~ chicken-core (chicken-5) f5c0c3cd90fbadd5b22319b9aed61207f3499b9d
commit f5c0c3cd90fbadd5b22319b9aed61207f3499b9d Author: Peter Bex <peter@more-magic.net> AuthorDate: Tue Oct 31 21:00:39 2017 +0100 Commit: Evan Hanson <evhan@foldling.org> CommitDate: Thu Nov 9 18:35:07 2017 +1300 Add module hack so library.scm can refer to built-in core macros This is necessary because library.scm is defining some modules, from which it also uses macros. For "scheme" this is possible because it is built-in as a special case but for srfi-12/chicken.condition and chicken.base we can't import them from those libraries themselves. Currently we get by through the "chicken" module which contains secondary exports for all these macros because they used to be available from that module, but the "chicken" module will disappear soonish. This commit is in preparation for the drop of the "chicken" module, which can then be done once we make a prerelease snapshot containing this change We can then add the following import to library.scm: (import (chicken internal syntax)) Signed-off-by: Evan Hanson <evhan@foldling.org> diff --git a/modules.scm b/modules.scm index c1895127..bd03a241 100644 --- a/modules.scm +++ b/modules.scm @@ -1075,6 +1075,10 @@ (define-inline (se-subset names env) (map (cut assq <> env) names)) +;; Hack for library.scm to use macros from modules it defines itself. +(##sys#register-core-module + 'chicken.internal.syntax #f '() (##sys#macro-environment)) + (##sys#register-core-module 'chicken.module #f '() ##sys#chicken.module-macro-environment)Trap