Skip to content

Instantly share code, notes, and snippets.

@shirok
Created December 15, 2021 21:28
Show Gist options
  • Save shirok/967613d09e3872384268b07190482aac to your computer and use it in GitHub Desktop.
Save shirok/967613d09e3872384268b07190482aac to your computer and use it in GitHub Desktop.
gosh> (define (double-y)
(let ((+y #f))
(set! +y (lambda (x) (+ x y)))
(let-syntax ((macro (er-macro-transformer
(lambda (form rename compare)
`(,(rename '+) ,(cadr form) ,(+y 0))))))
(display (macro y))
(newline))))
*** ERROR: [internal error] stray local variable: #(lvar +y #(5 #f) 2 1)
While compiling "(standard input)" at line 35: (er-macro-transformer (lambda (form rename compare) `(,(rename '+) ,(cadr form) ,(+y 0))))
While compiling "(standard input)" at line 32: (define (double-y) (let ((+y #f)) (set! +y (lambda (x) (+ x y))) (let-syntax ((macro (er-macro-transf ...
Stack Trace:
_______________________________________
0 (eval expr env)
at "/home/shiro/src/Gauche/src/../lib/gauche/interactive.scm":336
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment