summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVCGS40Y <ricardo.herdt@cariad.technology>2022-07-17 11:10:38 +0200
committerVCGS40Y <ricardo.herdt@cariad.technology>2022-07-17 11:16:56 +0200
commit481d6b2463ed961e46917ad89e3d90d517266adb (patch)
tree36af8646f7b334695fbd7df0c9e3a3f6a437cc0a
parentc641fcc50b6b86ca95743122b5206cdcd475f96e (diff)
downloadgeiser-guile-481d6b2463ed961e46917ad89e3d90d517266adb.tar.gz
geiser-guile-481d6b2463ed961e46917ad89e3d90d517266adb.tar.bz2
Fix bug where 'program-arities' returns #<unspecified> (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: #<unspecified> Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user) [1]> ,q ```
-rw-r--r--src/geiser/doc.scm4
1 files changed, 3 insertions, 1 deletions
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)