Custom Query (1630 matches)
Results (16 - 18 of 1630)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#1794 | duplicate | (r7rs) syntax-rules doesn't allow combining ellipsis and dotted tail | ||
Description |
According to the R7RS spec, the following should match: (define-syntax match-ellipsis-and-dotted-tail1 (syntax-rules () ((_ a ... . b) '(a ... b)))) (print (match-ellipsis-and-dotted-tail1 x y . z)) And this, too: (define-syntax match-ellipsis-and-dotted-tail2 (syntax-rules () ((_ (a) ... . (b)) '(a ... b)))) (print (match-ellipsis-and-dotted-tail2 (x) (y) z))
Both should print
Might be nice to support this in the core |
|||
#1793 | worksforme | r7rs incompatibility regarding identifier renames in macro expansion | ||
Description |
See this post: (let ([x 'outer]) (define-syntax m (syntax-rules () ((m a) (let ([a 'inner]) x)))) (m x)) ;; Should return 'outer, which we do (let ([x 'outer]) (define-syntax m (syntax-rules () ((m a) (begin (define a 'inner) x)))) (m x)) ;; Should return 'inner, which we don't
It makes sense, because the outer Not sure why this wouldn't be valid in R5RS though... |
|||
#1791 | worksforme | format-date reports bad argument count | ||
Description |
When I try to evaluate the following program with csi, I get an error % cat try.scm (import srfi-19-date srfi-19-io) (write (format-date "~Y-~m-~d" (current-date))) % csi try.scm CHICKEN (c) 2008-2020, The CHICKEN Team (c) 2000-2007, Felix L. Winkelmann Version 5.2.0 (rev 317468e4) macosx-unix-clang-x86-64 [ 64bit dload ptables ] Type ,? for help. ; loading try.scm ... ; loading /Data/tools/chicken-5.2.0/lib/chicken/11/srfi-19-date.import.so ... ; loading /Data/tools/chicken-5.2.0/lib/chicken/11/srfi-19-io.import.so ... ; loading /Data/tools/chicken-5.2.0/lib/chicken/11/srfi-19-date.so ... ; loading /Data/tools/chicken-5.2.0/lib/chicken/11/srfi-1.so ... [..blah...] ; loading /Data/tools/chicken-5.2.0/lib/chicken/11/exn-condition.so ... ; loading /Data/tools/chicken-5.2.0/lib/chicken/11/srfi-29-install.so ... Error: bad argument count - received 0 but expected 1: #<procedure (chicken.base#open-input-string string)> Call history: utf8-case-map.scm:117: loop utf8-case-map.scm:117: loop utf8-case-map.scm:117: loop utf8-case-map.scm:117: loop utf8-case-map.scm:117: loop utf8-case-map.scm:117: loop utf8-case-map.scm:117: loop utf8-case-map.scm:144: char-downcase-single utf8-case-map.scm:50: utf8-lolevel#write-utf8-char utf8-case-map.scm:224: loop <syntax> (write "date is ~a~%" (format-date "~Y-~m-~d" (current-date))) <syntax> (format-date "~Y-~m-~d" (current-date)) <syntax> (current-date) <eval> (write "date is ~a~%" (format-date "~Y-~m-~d" (current-date))) <eval> (format-date "~Y-~m-~d" (current-date)) <eval> (current-date) <-- If instead I compile it with csc and run it, then I get: % ./try Error: bad argument count - received 0 but expected 1: #<procedure (chicken.base#open-input-string string)> Call history: utf8-case-map.scm:222: utf8-lolevel#read-utf8-char utf8-case-map.scm:223: char-downcase-locale utf8-case-map.scm:215: char-downcase* utf8-case-map.scm:143: char-map-multi-case utf8-case-map.scm:117: loop utf8-case-map.scm:117: loop utf8-case-map.scm:117: loop utf8-case-map.scm:117: loop utf8-case-map.scm:117: loop utf8-case-map.scm:117: loop utf8-case-map.scm:117: loop utf8-case-map.scm:144: char-downcase-single utf8-case-map.scm:50: utf8-lolevel#write-utf8-char utf8-case-map.scm:224: loop try.scm:2: srfi-19-date#current-date try.scm:2: srfi-19-io#format-date <-- which seems to be clearly pointing towards the same thing. I'm sure this used to work (maybe in 5.0.0), so this appears to be a regression. |