~ chicken-core (chicken-5) 5ed10c58f39e8f23d5ef52de35d57d426f902203


commit 5ed10c58f39e8f23d5ef52de35d57d426f902203
Author:     Evan Hanson <evhan@foldling.org>
AuthorDate: Fri Apr 19 18:27:25 2019 +1200
Commit:     Peter Bex <peter@more-magic.net>
CommitDate: Fri Apr 19 15:08:16 2019 +0200

    Pass full macro name to `##sys#compiler-syntax-hook'
    
    Previously, the unresolved macro name passed to the hook, meaning it
    didn't include a module namespace and it was impossible to differentiate
    two macros of the same name from different modules. This change just
    passes the fully-qualified name of the syntax to the hook instead so
    that reported compiler-syntax statistics ("-debug S") are more accurate.
    
    Signed-off-by: Peter Bex <peter@more-magic.net>

diff --git a/expand.scm b/expand.scm
index c5ec3bcb..277c035b 100644
--- a/expand.scm
+++ b/expand.scm
@@ -299,7 +299,7 @@
 			 (cond ((eq? result exp) (expand head exp head2))
 			       (else
 				(when ##sys#compiler-syntax-hook
-				  (##sys#compiler-syntax-hook head result))
+				  (##sys#compiler-syntax-hook head2 result))
 				(loop result))))))
 		    [else (expand head exp head2)] ) )
 	    (values exp #f) ) )
Trap