[plt-scheme] macro keyword conflicting with other imports?

From: ian barland (penguin flight instructor) (ian at cs.rice.edu)
Date: Wed Nov 10 15:34:14 EST 2004

Hi -- 
Is the following a bug?, and if not does anybody want to try to
explain it to me?  I'm puzzled...

(module my-macros mzscheme
  (provide run)

  ; A straightforward macro, expecting a keyword "fun":
  (define-syntax run
    (syntax-rules (fun)
      [(run fun n)
       (format "It's fun to run ~v." n)]))

(require my-macros)
(run fun 7)    ; As expected, => "It's fun to run 7."

; Now, a module that happens to export an identifier "fun":
(module some-lib mzscheme
  (provide fun)
  (define (fun) 'whee))

(require some-lib)
(run fun 8)    ; Unexpectedly (to me), => Error: run: bad syntax

(I'm using v208.)  Thanks in advance,

Posted on the users mailing list.