chicken-janitors
[Top][All Lists]
Advanced

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

#1701: Egg SRFI-37 - wrong result


From: Chicken Trac
Subject: #1701: Egg SRFI-37 - wrong result
Date: Mon, 06 Jul 2020 21:14:27 -0000

#1701: Egg SRFI-37 - wrong result
--------------------------------------------+------------------------
            Reporter:  Jeronimo Pellegrini  |       Type:  defect
              Status:  new                  |   Priority:  minor
           Milestone:  someday              |  Component:  extensions
             Version:  5.2.0                |   Keywords:
Estimated difficulty:                       |
--------------------------------------------+------------------------
 Egg srfi-37 seems to have a problem:


 {{{
 Type ,? for help.
 #;1> (import (srfi 37))
 ; loading /home/jeronimo/pkg/scheme/chicken/ROOT-git/lib/chicken-
 git/11/srfi-37.import.so ...
 ; loading /home/jeronimo/pkg/scheme/chicken/ROOT-git/lib/chicken-
 git/11/srfi-37.so ...
 #;2> (args-fold '("-I" "the-argument")
            (list (option '(#\I) #f #t
                          (lambda (opt name arg result)
                            (and (eqv? name #\I) arg))))
            (lambda args (error "unrecognized"))
            (lambda args #f)
            #f)
 #f
 #;4>
 }}}


 But it should have returned the argument value ("the-argument").

 If, instead of '("-I" "the-argument"), you pass it '("-Ithe-argument"),
 then it will correctly recognize -I's argument, "the-argument".

 Several implementations seem to do the same, so perhaps this is a bug in
 the reference implementation?

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