Summary

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

Metadata

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

Changes and comments

[2023-11-06 23:45:16 UTC] felix changed milestone from someday to 6.0.0