diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-11-21 01:56:02 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-11-21 01:56:02 +0100 |
commit | 1d725a8c087b66b2cd2c0e5006c376faf612d6ff (patch) | |
tree | e660e30075c5b03b64da49988683af048eb4f6b0 /scheme/guile/geiser/modules.scm | |
parent | 481f0ea2e5577ad5bb1a718b8023af92202e7423 (diff) | |
download | geiser-guile-1d725a8c087b66b2cd2c0e5006c376faf612d6ff.tar.gz geiser-guile-1d725a8c087b66b2cd2c0e5006c376faf612d6ff.tar.bz2 |
Better module help
We now display procedure signatures in module help, and keep a cache
in Guile, using procedure properties.
Diffstat (limited to 'scheme/guile/geiser/modules.scm')
-rw-r--r-- | scheme/guile/geiser/modules.scm | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/scheme/guile/geiser/modules.scm b/scheme/guile/geiser/modules.scm index a1697a7..df53acb 100644 --- a/scheme/guile/geiser/modules.scm +++ b/scheme/guile/geiser/modules.scm @@ -15,7 +15,7 @@ module-path find-module all-modules - module-exports + submodules module-location) #:use-module (geiser utils) #:use-module (system vm program) @@ -76,35 +76,3 @@ (list mod) cs))) -(define (module-exports mod-name) - (let* ((mod (catch #t - (lambda () (resolve-interface mod-name)) - (lambda args (resolve-module mod-name)))) - (elts (hash-fold classify-module-object - (list '() '() '()) - (module-obarray mod))) - (elts (map sort-symbols! elts)) - (subs (map module-name (submodules (resolve-module mod-name #f))))) - (list (cons 'modules (append subs - (map (lambda (m) - `(,@mod-name ,m)) (car elts)))) - (cons 'procs (cadr elts)) - (cons 'vars (caddr elts))))) - -(define (classify-module-object name var elts) - (let ((obj (and (variable-bound? var) - (variable-ref var)))) - (cond ((not obj) elts) - ((and (module? obj) (eq? (module-kind obj) 'directory)) - (list (cons name (car elts)) - (cadr elts) - (caddr elts))) - ((or (procedure? obj) (program? obj) (macro? obj)) - (list (car elts) - (cons name (cadr elts)) - (caddr elts))) - (else (list (car elts) - (cadr elts) - (cons name (caddr elts))))))) - -;;; modules.scm ends here |