diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2018-01-30 23:45:41 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2018-01-30 23:45:41 +0100 |
commit | 3f2272ecf02c8049ea5f250e6263d0f9441a0bd8 (patch) | |
tree | 908f6030f89a8833963377a1254ee252d40a5672 /scheme/guile/geiser/doc.scm | |
parent | 33783307abab46433ce18273f562b3a729628e8e (diff) | |
download | geiser-guile-3f2272ecf02c8049ea5f250e6263d0f9441a0bd8.tar.gz geiser-guile-3f2272ecf02c8049ea5f250e6263d0f9441a0bd8.tar.bz2 |
guile 2.2: program-arities and program-module reloaded
Those two procedures are gone in these 2.2 times, and things like
autodoc and xref were broken as a result. With Andy's help,
apparently good enough approximations of their functionality are now
in place: let's see how they go.
Diffstat (limited to 'scheme/guile/geiser/doc.scm')
-rw-r--r-- | scheme/guile/geiser/doc.scm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scheme/guile/geiser/doc.scm b/scheme/guile/geiser/doc.scm index 185b204..9f28f7f 100644 --- a/scheme/guile/geiser/doc.scm +++ b/scheme/guile/geiser/doc.scm @@ -1,6 +1,6 @@ ;;; doc.scm -- procedures providing documentation on scheme objects -;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2018 Jose Antonio Ortega Ruiz ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the Modified BSD License. You should @@ -17,6 +17,7 @@ #:use-module (geiser utils) #:use-module (geiser modules) #:use-module (system vm program) + #:use-module (system vm debug) #:use-module (ice-9 session) #:use-module (ice-9 documentation) #:use-module (ice-9 regex) @@ -75,11 +76,13 @@ ((macro? obj) default-macro-args) (else 'variable))) +(define (program-arities prog) + (let ((addrs (program-address-range prog))) + (when (pair? addrs) (find-program-arities (car addrs))))) + (define (arguments proc) (define (p-args prog) - (let ((as (map (lambda (a) - ((@@ (system vm program) arity->arguments-alist) prog a)) - (or (program-arities prog) '())))) + (let ((as (map arity-arguments-alist (or (program-arities prog) '())))) (and (not (null? as)) as))) (define (clist f) (lambda (x) (let ((y (f x))) (and y (list y))))) (cond ((is-a? proc <generic>) (generic-args proc)) |