mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-03 19:26:36 +02:00
Sorting modules in undefined binding warning.
Printing an initial message that we're searching.
This commit is contained in:
parent
c160d03024
commit
1d5f06a641
1 changed files with 16 additions and 11 deletions
|
@ -283,8 +283,11 @@
|
||||||
((and (exception? exn)
|
((and (exception? exn)
|
||||||
(equal? "undefined variable" (exception-message exn))
|
(equal? "undefined variable" (exception-message exn))
|
||||||
(pair? (exception-irritants exn)))
|
(pair? (exception-irritants exn)))
|
||||||
(let* ((name (car (exception-irritants exn)))
|
(let ((name (car (exception-irritants exn))))
|
||||||
(mods (and (identifier? name)
|
(display "Searching for modules exporting " out)
|
||||||
|
(display name out)
|
||||||
|
(display " ...\n" out)
|
||||||
|
(let ((mods (and (identifier? name)
|
||||||
(modules-exporting-identifier name))))
|
(modules-exporting-identifier name))))
|
||||||
(cond
|
(cond
|
||||||
((pair? mods)
|
((pair? mods)
|
||||||
|
@ -293,7 +296,9 @@
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (m)
|
(lambda (m)
|
||||||
(display " " out) (write m out) (newline out))
|
(display " " out) (write m out) (newline out))
|
||||||
(sort (map car mods)))))))))
|
(sort (map car mods)
|
||||||
|
(lambda (a b)
|
||||||
|
(string<? (write-to-string a) (write-to-string b))))))))))))
|
||||||
|
|
||||||
(define (repl/eval rp expr-list)
|
(define (repl/eval rp expr-list)
|
||||||
(let ((out (repl-out rp)))
|
(let ((out (repl-out rp)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue