Summary
ir-macro-expander's compare + define-syntax + modules don't mix
Metadata
- Id: dbeaf2ef01f41c03d02d8004b34941293087ce6c
- Trac id: 1464
- Type: defect
- Reporter: megane
- Owner:
- Cc:
- Status: new
- Component: expander
- Estimated difficulty:
- Resolution:
- Priority: major
- Milestone: 6.0.0
- Version: 5.0.0
- Changetime: 2023-11-06 23:45:16 UTC
- Created: 2018-05-22 08:18:26 UTC
- Keywords:
Description
This snippet is supposed to print "it is x", but doesn't if there's a macro called `x` in the module.
module
m
(foo)
;; (import chicken scheme)
(import (chicken syntax) scheme)
;; (define-syntax x (ir-macro-transformer (lambda _ `(begin))))
;; (define (x) (begin)) ;; This is OK
(define-syntax foo
(ir-macro-transformer
(lambda (e inj cmp)
(apply
(lambda (a)
(if (cmp 'x a) "it is x" "fail"))
(cdr e))))))
(import m)
(print (foo x))