The attached patch makes sure type-declaration macros in code evaluated at runtime must not assume they are executed in a compilation context. This was kindly contributed by megane and fixes #881.
cheers felix
>From 245fe856989e532c91a12eb8fb94e60e02f59508 Mon Sep 17 00:00:00 2001 From: felix <[email protected]> Date: Fri, 6 Jul 2012 08:45:47 +0200 Subject: [PATCH] type-declaration macros in code evaluated at runtime must not assume they are executed in a compilation context (contributed by megane) Signed-off-by: felix <[email protected]> --- chicken-syntax.scm | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chicken-syntax.scm b/chicken-syntax.scm index e9d2755..4c1161b 100644 --- a/chicken-syntax.scm +++ b/chicken-syntax.scm @@ -1165,7 +1165,7 @@ (##sys#er-transformer (lambda (x r c) (##sys#check-syntax ': x '(_ symbol _ . _)) - (if (memq #:csi ##sys#features) + (if (not (memq #:compiling ##sys#features)) '(##core#undefined) (let* ((type1 (##sys#strip-syntax (caddr x))) (name1 (cadr x))) @@ -1196,7 +1196,7 @@ 'define-specialization '() (##sys#er-transformer (lambda (x r c) - (cond ((memq #:csi ##sys#features) '(##core#undefined)) + (cond ((not (memq #:compiling ##sys#features)) '(##core#undefined)) (else (##sys#check-syntax 'define-specialization x '(_ (variable . #(_ 0)) _ . #(_ 0 1))) (let* ((head (cadr x)) @@ -1287,7 +1287,7 @@ (##sys#er-transformer (lambda (x r c) (##sys#check-syntax 'define-type x '(_ variable _)) - (cond ((memq #:csi ##sys#features) '(##core#undefined)) + (cond ((not (memq #:compiling ##sys#features)) '(##core#undefined)) (else (let ((name (##sys#strip-syntax (cadr x))) (%quote (r 'quote)) -- 1.6.0.4
_______________________________________________ Chicken-hackers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-hackers
