chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-janitors] #1441: Macro keywords unexpectedly match against


From: Chicken Trac
Subject: Re: [Chicken-janitors] #1441: Macro keywords unexpectedly match against imported identifiers
Date: Sat, 24 Feb 2018 21:48:11 -0000

#1441: Macro keywords unexpectedly match against imported identifiers
-------------------------------------+-------------------------------------
            Reporter:  sjamaan       |      Owner:  sjamaan
                Type:  defect        |     Status:  new
            Priority:  major         |  Milestone:  4.14.0
           Component:  expander      |    Version:  4.13.0
          Resolution:                |   Keywords:  hygiene, syntax-rules,
Estimated difficulty:  hard          |  capture
-------------------------------------+-------------------------------------

Comment (by johnwcowan):

 Here's a simplified version without a module wrapping the `define-syntax`
 that still fails:

 {{{
 #;1> (define-syntax match-foo
    (syntax-rules ()
      ((_ ?input)
       (let-syntax ((match-identifier
                     (syntax-rules (foo)
                       ((_ foo foo) #t)
                       ((_ foo ?whatever) 'mismatch)
                       ((_ ?whatever ?whatever2) #f))))
         (match-identifier foo ?input)))))
 #;2> (module myfoo (foo)
   (import scheme)
   (define foo 1))
 #;3> (print (match-foo foo))
 #t
 #;4> (import myfoo)
 #;5> (print (match-foo foo))
 #f
 #;6>
 }}}

--
Ticket URL: <https://bugs.call-cc.org/ticket/1441#comment:13>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]