[Top][All Lists]

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

bug#10938: procedure-arguments return differnet output when procedure-pr

From: Stefan Israelsson Tampe
Subject: bug#10938: procedure-arguments return differnet output when procedure-property is used
Date: Sun, 4 Mar 2012 13:15:47 +0100

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'."
   ((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


reply via email to

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