chicken-janitors
[Top][All Lists]
Advanced

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

[Chicken-janitors] #379: Complete SRFI-46 support


From: Chicken Trac
Subject: [Chicken-janitors] #379: Complete SRFI-46 support
Date: Fri, 10 Sep 2010 14:21:35 -0000

#379: Complete SRFI-46 support
-----------------------------------+----------------------------------------
 Reporter:  sjamaan                |       Owner:  felix
     Type:  defect                 |      Status:  new  
 Priority:  minor                  |   Milestone:  4.7.0
Component:  core libraries         |     Version:  4.6.x
 Keywords:  syntax-rules, srfi-46  |  
-----------------------------------+----------------------------------------
 I got bored so I decided to finish srfi-46 support.

 Right now we have support for custom ellipsis identifiers, which is half
 of SRFI-46. It's much simpler to explain that Chicken supports SRFI-46
 than just the ellipsis stuff, and tail patterns provide for slightly more
 powerful macros.

 During my work on it I also found a bug in the way vectors are matched:

 {{{
 (define-syntax foo  (syntax-rules () ((_ #((a) ...)) (list a ...))))
 (foo #((1))) => error. It should return (1)
 }}}

 I just dropped the specialized vector matching and converted vectors to
 list, on match too (it was already done this way for the patterns). This
 solves any vector-specific bugs and also helps keep the code compact. If
 speed is an issue, I also have a version that adds SRFI-46 to the vector-
 specific code.

 If there's a better way to do the take-right and drop-right, I'd be happy
 to hear it.

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/379>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

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