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 09:07:09 -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 sjamaan):

 Racket also complains like Gauche does:

 {{{
 > (require "match-it-racket.scm")
 > (match-foo foo)
 ; match-it-racket.scm:12:35: syntax-rules: variable used twice in pattern
 ;   at: ?whatever
 ;   in: (_ ?whatever ?whatever)
 }}}

 file:

 {{{
 #lang racket

 (provide match-foo)

 (define-syntax match-foo
   (syntax-rules ()
     ((_ ?input)
      (let-syntax ((match-identifier
                    (syntax-rules (foo)
                      ((_ foo foo) #t)
                      ((_ foo ?whatever) 'mismatch)
                      ((_ ?whatever ?whatever) #f))))
        (match-identifier foo ?input)))))
 }}}

--
Ticket URL: <https://bugs.call-cc.org/ticket/1441#comment:10>
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]