[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] define with too many arguments
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] define with too many arguments |
Date: |
Mon, 6 Jun 2005 07:25:25 +0200 |
On 6/5/05, Michele Simionato <address@hidden> wrote:
> I have just noticed that within the low-level macro system
>
> (define x 1 'this-is-ignored 'this-also)
>
> is valid, whereas in the high level macro system this is an invalid syntax.
> Is this on purpose or an implementation accident? I prefer the high level
> behavior (errors should never pass silently).
Absolutely. Thanks for reporting this:
diff -c /home/fwinkel/stuff/chicken/eval.scm\~
/home/fwinkel/stuff/chicken/eval.scm
*** /home/fwinkel/stuff/chicken/eval.scm~ 2005-05-31 07:07:50.000000000
+0200
--- /home/fwinkel/stuff/chicken/eval.scm 2005-06-06 07:16:38.356393768
+0200
***************
*** 1599,1605 ****
(body (cdr form)) )
(cond ((not (pair? head))
(##sys#check-syntax 'define head 'symbol)
! (##sys#check-syntax 'define body '#(_ 0))
`(##core#set! ,head ,(if (pair? body) (car body) '(##sys#void))) )
((pair? (##sys#slot head 0))
(##sys#check-syntax 'define head '(_ . lambda-list))
--- 1599,1605 ----
(body (cdr form)) )
(cond ((not (pair? head))
(##sys#check-syntax 'define head 'symbol)
! (##sys#check-syntax 'define body '#(_ 0 1))
`(##core#set! ,head ,(if (pair? body) (car body) '(##sys#void))) )
((pair? (##sys#slot head 0))
(##sys#check-syntax 'define head '(_ . lambda-list))
cheers,
felix