better error message when a library file "foo.ss" does not contain
the expected library name (foo).
This commit is contained in:
@@ -226,7 +226,19 @@
|
||||
[else
|
||||
((current-library-expander)
|
||||
(read-library-source-file file-name)
|
||||
file-name)])))
|
||||
file-name
|
||||
(lambda (name)
|
||||
(unless (equal? name x)
|
||||
(assertion-violation 'import
|
||||
(let-values ([(p e) (open-string-output-port)])
|
||||
(display "expected to find library " p)
|
||||
(write x p)
|
||||
(display " in file " p)
|
||||
(display file-name p)
|
||||
(display ", found " p)
|
||||
(write name p)
|
||||
(display " instead" p)
|
||||
(e))))))])))
|
||||
(lambda (f)
|
||||
(if (procedure? f)
|
||||
f
|
||||
|
||||
Reference in New Issue
Block a user