GNU bug report logs -
#10938
procedure-arguments return differnet output when procedure-property is used
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10938 in the body.
You can then email your comments to 10938 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#10938
; Package
guile
.
(Sun, 04 Mar 2012 12:18:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Israelsson Tampe <stefan.itampe <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Sun, 04 Mar 2012 12:18:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Typeically in guile
> (procedure-arguments g)
$3 = ((required x) (optional) (keyword) (allow-other-keys? . #f) (rest .
#f))
for a program g. But if we attach a procedure property 'arglist the outpu
is acording to (system ice-9 session),
(define (procedure-arguments proc)
"Return an alist describing the arguments that `proc' accepts, or `#f'
if the information cannot be obtained.
The alist keys that are currently defined are `required', `optional',
`keyword', and `rest'."
(cond
((procedure-property proc 'arglist)
=> (lambda (arglist)
`((required . ,(car arglist))
(optional . ,(cadr arglist))
(keyword . ,(caddr arglist))
(allow-other-keys? . ,(cadddr arglist))
(rest . ,(car (cddddr arglist))))))
((procedure-source proc)
=> cadr)
(((@ (system vm program) program?) proc)
((@ (system vm program) program-arguments-alist) proc))
(else #f)))
Acording to the description allow-other-keys? is not included, but returned
for a program
but not of prop 'arglist is used, so either
1. drop allow-other-keys? from the program? version or add it to the proper
version and change doc string
Regards
Stefan
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-guile <at> gnu.org
:
bug#10938
; Package
guile
.
(Sun, 04 Mar 2012 12:26:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 10938 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Sorry I posted a version of session.scm with a prtly fix included
anyway here is a patch where we add allow-other-keys?
[Message part 2 (text/html, inline)]
[session.diff (text/x-patch, attachment)]
Information forwarded
to
bug-guile <at> gnu.org
:
bug#10938
; Package
guile
.
(Mon, 05 Mar 2012 17:01:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 10938 <at> debbugs.gnu.org (full text, mbox):
Hi Stefan,
Stefan Israelsson Tampe <stefan.itampe <at> gmail.com> skribis:
> diff --git a/module/ice-9/session.scm b/module/ice-9/session.scm
> index fbb03d2..dc2c927 100644
> --- a/module/ice-9/session.scm
> +++ b/module/ice-9/session.scm
> @@ -504,13 +504,14 @@ It is an image under the mapping EXTRACT."
> if the information cannot be obtained.
>
> The alist keys that are currently defined are `required', `optional',
> -`keyword', and `rest'."
> +`keyword', allow-other-keys? and `rest'."
> (cond
> ((procedure-property proc 'arglist)
> => (lambda (arglist)
> `((required . ,(car arglist))
> (optional . ,(cadr arglist))
> (keyword . ,(caddr arglist))
> + (allow-other-keys? . ,(cadddr arglist))
> (rest . ,(car (cddddr arglist))))))
> ((procedure-source proc)
> => cadr)
Can you provide one or more test cases that illustrate that this patch
fixes?
Also, please send your patch in ‘git format-patch’ format.
Thanks,
Ludo’.
Information forwarded
to
bug-guile <at> gnu.org
:
bug#10938
; Package
guile
.
(Sat, 10 Mar 2012 16:11:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 10938 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Following this email is the requested patch format
Test case.
With the patch:
(define (f x) x)
(define arg1 (procedure-arguments f))
(set-procedure-property! f 'arglist (map cdr arg1))
(define arg2 (procedure-arguments f))
(equal? arg1 arg2)
$4 = #t
Without the patch a field is missing and the result would be #f
/Stefan
2012/3/5 Ludovic Courtès <ludo <at> gnu.org>
> Hi Stefan,
>
> Stefan Israelsson Tampe <stefan.itampe <at> gmail.com> skribis:
>
> > diff --git a/module/ice-9/session.scm b/module/ice-9/session.scm
> > index fbb03d2..dc2c927 100644
> > --- a/module/ice-9/session.scm
> > +++ b/module/ice-9/session.scm
> > @@ -504,13 +504,14 @@ It is an image under the mapping EXTRACT."
> > if the information cannot be obtained.
> >
> > The alist keys that are currently defined are `required', `optional',
> > -`keyword', and `rest'."
> > +`keyword', allow-other-keys? and `rest'."
> > (cond
> > ((procedure-property proc 'arglist)
> > => (lambda (arglist)
> > `((required . ,(car arglist))
> > (optional . ,(cadr arglist))
> > (keyword . ,(caddr arglist))
> > + (allow-other-keys? . ,(cadddr arglist))
> > (rest . ,(car (cddddr arglist))))))
> > ((procedure-source proc)
> > => cadr)
>
> Can you provide one or more test cases that illustrate that this patch
> fixes?
>
> Also, please send your patch in ‘git format-patch’ format.
>
> Thanks,
> Ludo’.
>
[Message part 2 (text/html, inline)]
[session.patch (text/x-patch, attachment)]
Reply sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
You have taken responsibility.
(Mon, 02 Jul 2012 13:17:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Stefan Israelsson Tampe <stefan.itampe <at> gmail.com>
:
bug acknowledged by developer.
(Mon, 02 Jul 2012 13:17:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 10938-done <at> debbugs.gnu.org (full text, mbox):
Hi Stefan,
Thanks, fixed differently in a8215aedad433a15abf87c2310a41c684dfcef97.
In the future, could you please provide a patch with a log and test case
similar to what’s in the above commit?
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 31 Jul 2012 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 44 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.