better printing of procedures with keyword arguments

* module/system/vm/program.scm (arguments->lambda-list): Print keyword
  arguments more sensibly.
This commit is contained in:
Andy Wingo 2009-11-20 13:12:44 +01:00
commit 9a5ee564fa

View file

@ -180,7 +180,8 @@
(define (arguments->lambda-list arguments)
(let ((req (or (assq-ref arguments 'required) '()))
(opt (or (assq-ref arguments 'optional) '()))
(key (or (assq-ref arguments 'keyword) '()))
(key (map keyword->symbol
(map car (or (assq-ref arguments 'keyword) '()))))
(rest (or (assq-ref arguments 'rest) '())))
`(,@req
,@(if (pair? opt) (cons #:optional opt) '())