Opened 6 years ago

Last modified 5 months ago

#1464 new defect

ir-macro-expander's compare + define-syntax + modules don't mix

Reported by: megane Owned by:
Priority: major Milestone: 6.0.0
Component: expander Version: 5.0.0
Keywords: Cc:
Estimated difficulty:

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))

Change History (1)

comment:1 Changed 5 months ago by felix winkelmann

Milestone: someday6.0.0
Note: See TracTickets for help on using tickets.