diff options
Diffstat (limited to 'scheme/guile/geiser')
-rw-r--r-- | scheme/guile/geiser/modules.scm | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/scheme/guile/geiser/modules.scm b/scheme/guile/geiser/modules.scm index f7ea927..a57145e 100644 --- a/scheme/guile/geiser/modules.scm +++ b/scheme/guile/geiser/modules.scm @@ -57,7 +57,7 @@ (define (module-path module-name) (and (module-name? module-name) (or ((@@ (ice-9 session) module-filename) module-name) - (module-filename (resolve-module module-name))))) + (module-filename (resolve-module module-name #f))))) (define (submodules mod) (hash-map->list (lambda (k v) v) (module-submodules mod))) @@ -82,19 +82,19 @@ cs))) (define (module-exports mod-name) - (let* ((elts (hash-fold classify-module-object + (let* ((mod (catch #t + (lambda () (resolve-interface mod-name)) + (lambda args (resolve-module mod-name)))) + (elts (hash-fold classify-module-object (list '() '() '()) - (module-obarray (maybe-module-interface mod-name)))) + (module-obarray mod))) (elts (map sort-symbols! elts))) - (list (cons 'modules (map (lambda (m) `(,@mod-name ,m)) (car elts))) + (list (cons 'modules (append + (map module-name (submodules mod)) + (map (lambda (m) `(,@mod-name ,m)) (car elts)))) (cons 'procs (cadr elts)) (cons 'vars (caddr elts))))) -(define (maybe-module-interface mod-name) - (catch #t - (lambda () (resolve-interface mod-name)) - (lambda args (resolve-module mod-name)))) - (define (classify-module-object name var elts) (let ((obj (and (variable-bound? var) (variable-ref var)))) |