GNU bug report logs - #10938
procedure-arguments return differnet output when procedure-property is used

Previous Next

Package: guile;

Reported by: Stefan Israelsson Tampe <stefan.itampe <at> gmail.com>

Date: Sun, 4 Mar 2012 12:18:01 UTC

Severity: normal

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: tracker <at> debbugs.gnu.org
Subject: bug#10938: closed (procedure-arguments return differnet output
 when procedure-property is used)
Date: Mon, 02 Jul 2012 13:17:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 02 Jul 2012 15:11:30 +0200
with message-id <87r4suux31.fsf <at> gnu.org>
and subject line Re: bug#10938: patch
has caused the debbugs.gnu.org bug report #10938,
regarding procedure-arguments return differnet output when procedure-property is used
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
10938: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10938
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Israelsson Tampe <stefan.itampe <at> gmail.com>
To: bug-guile <at> gnu.org
Subject: procedure-arguments return differnet output when procedure-property
	is used
Date: Sun, 4 Mar 2012 13:15:47 +0100
[Message part 3 (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 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
From: ludo <at> gnu.org (Ludovic Courtès)
To: Stefan Israelsson Tampe <stefan.itampe <at> gmail.com>
Cc: 10938-done <at> debbugs.gnu.org
Subject: Re: bug#10938: patch
Date: Mon, 02 Jul 2012 15:11:30 +0200
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’.


This bug report was last modified 13 years and 45 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.