As of afd7867, we can make these values available to the other files that need to use them without making them part of the chicken.export module's public API by assigning directly to namespaced identifiers. --- core.scm | 4 ++-- expand.scm | 17 +++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/core.scm b/core.scm index 15f5f236..e6f3c399 100644 --- a/core.scm +++ b/core.scm @@ -525,7 +525,7 @@ output)) (define (canonicalize-body/ln ln body se cs?) - (fluid-let ((expansion-result-hook + (fluid-let ((chicken.expand#expansion-result-hook (handle-expansion-result ln))) (##sys#canonicalize-body body se cs?))) @@ -622,7 +622,7 @@ (let* ((name0 (lookup (car x) se)) (name (or (and (symbol? name0) (##sys#get name0 '##core#primitive)) name0)) (xexpanded - (fluid-let ((expansion-result-hook + (fluid-let ((chicken.expand#expansion-result-hook (handle-expansion-result ln))) (expand x se compiler-syntax-enabled)))) (cond ((not (eq? x xexpanded)) diff --git a/expand.scm b/expand.scm index ab60f3dc..32fc7c19 100644 --- a/expand.scm +++ b/expand.scm @@ -41,14 +41,7 @@ strip-syntax syntax-error er-macro-transformer - ir-macro-transformer - - ;; These must be exported or the compiler will assume they're never - ;; assigned to. - define-definition - define-syntax-definition - define-values-definition - expansion-result-hook) + ir-macro-transformer) (import scheme chicken chicken.condition @@ -953,6 +946,14 @@ (define ##sys#er-transformer er-macro-transformer) (define ##sys#ir-transformer ir-macro-transformer) + +;; Expose some internals for use in core.scm and chicken-syntax.scm: + +(define chicken.expand#define-definition define-definition) +(define chicken.expand#define-syntax-definition define-syntax-definition) +(define chicken.expand#define-values-definition define-values-definition) +(define chicken.expand#expansion-result-hook expansion-result-hook) + ) ; chicken.expand module -- 2.11.0 _______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers