Hello,
csc enters an infinite loop attempting to expand the following:
(define-syntax make-alist
(syntax-rules ()
((make-alist (key val) ...)
(list (cons key val) ...))))
(display (caar (make-alist ("cons" cons))))
(newline)
Loading the file into csi prints "cons" as normal.
The behavior seems to be specific to the symbol "cons": csc and csi both
successfully expand all of the following:
---------------------------------------------------------
(define-syntax make-alist
(syntax-rules ()
((make-alist (key val) ...)
(list (cons key val) ...))))
(display (caar (make-alist ("cons" car))))
(newline)
----------------------------------------------------------
(define kons cons)
(define-syntax make-alist
(syntax-rules ()
((make-alist (key val) ...)
(list (kons key val) ...))))
(display (caar (make-alist ("cons" cons))))
(newline)
----------------------------------------------------------
(define kons cons)
(define-syntax make-alist
(syntax-rules ()
((make-alist (key val) ...)
(list (cons key val) ...))))
(display (caar (make-alist ("cons" kons))))
(newline)
----------------------------------------------------------
Chicken Version: 5.4.0 (compiled from release tarball)
OS: Alpine Linux x86_64
CC: GCC Alpine 13.2.1_git20240309 (using musl libc)