Skip to content

Instantly share code, notes, and snippets.

@ktakashi
Created March 26, 2015 08:12
Show Gist options
  • Save ktakashi/84cef509629786f249a3 to your computer and use it in GitHub Desktop.
Save ktakashi/84cef509629786f249a3 to your computer and use it in GitHub Desktop.
Assertion error on Gauche
(import (scheme base) (scheme write) (scheme cxr))
(cond-expand
(chibi (import (chibi)))
(gauche (import (gauche base)))
(sagittarius (import (sagittarius)))
(else (error "not supported")))
(define-syntax comp
(er-macro-transformer
(lambda (form rename compare)
(display (compare (cadr form) (caddr form))) (newline)
`(,(rename 'begin)))))
(define-syntax rename-it
(er-macro-transformer
(lambda (form rename compare)
(rename (cadr form)))))
(let ((a 1))
(comp (rename-it a) (rename-it a)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment