From 481d6b2463ed961e46917ad89e3d90d517266adb Mon Sep 17 00:00:00 2001 From: VCGS40Y Date: Sun, 17 Jul 2022 11:10:38 +0200 Subject: Fix bug where 'program-arities' returns # (issue #23) program-arities now returns an empty list if no arities information is found. This fixes the bug that happens when calling, say, `(autodoc '(display))`, which leads to following error: ``` scheme@(guile-user)> (autodoc '(display)) ice-9/boot-9.scm:1669:16: In procedure raise-exception: In procedure map: Wrong type argument: # Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user) [1]> ,q ``` --- src/geiser/doc.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/geiser/doc.scm') diff --git a/src/geiser/doc.scm b/src/geiser/doc.scm index 9f28f7f..2281da3 100644 --- a/src/geiser/doc.scm +++ b/src/geiser/doc.scm @@ -78,7 +78,9 @@ (define (program-arities prog) (let ((addrs (program-address-range prog))) - (when (pair? addrs) (find-program-arities (car addrs))))) + (if (pair? addrs) + (find-program-arities (car addrs)) + '()))) (define (arguments proc) (define (p-args prog) -- cgit v1.2.3