(filter-map (lambda (name)
(let ((filtered (filter name)))
(and filtered
- (make-library-import filtered
+ (make-library-import library-name
name
- library-name))))
+ filtered))))
(library-metadata-exports
(library-db 'get-metadata library-name)))))
((only)
(or (eq? (car names) (cadr names))
(loop (cdr names)))))))
+(define (make-library-import from-library from #!optional to)
+ (%make-library-import from-library from
+ (if (default-object? to) from to)))
+
(define-record-type <library-import>
- (make-library-import to from from-library)
+ (%make-library-import from-library from to)
library-import?
- (to library-import-to)
+ (from-library library-import-from-library)
(from library-import-from)
- (from-library library-import-from-library))
+ (to library-import-to))
(define-print-method library-import?
(standard-print-method 'library-import
(lambda (import)
- (list (library-import-to import)
+ (list (library-import-from-library import)
(library-import-from import)
- (library-import-from-library import)))))
+ (library-import-to import)))))
(define (library-import=? e1 e2)
- (and (eq? (library-import-to e1)
- (library-import-to e2))
+ (and (equal? (library-import-from-library e1)
+ (library-import-from-library e2))
(eq? (library-import-from e1)
(library-import-from e2))
- (equal? (library-import-from-library e1)
- (library-import-from-library e2))))
\ No newline at end of file
+ (eq? (library-import-to e1)
+ (library-import-to e2))))
\ No newline at end of file
(parse-define-library-form
ex1 test-pathname))
(build-metadata-db))
- (list (make-library-import 'foo-mumble?
- 'foo-mumble?
- '(foo mumble))
- (make-library-import 'make-foo-mumble
- 'make-foo-mumble
- '(foo mumble))
- (make-library-import 'foo-mumble-a
- 'foo-mumble-a
- '(foo mumble))
- (make-library-import 'foo-mumble-b
- 'foo-mumble-b
- '(foo mumble))
- (make-library-import 'grumble-foo-grumble?
+ (list (make-library-import '(foo mumble) 'foo-mumble?)
+ (make-library-import '(foo mumble) 'make-foo-mumble)
+ (make-library-import '(foo mumble) 'foo-mumble-a)
+ (make-library-import '(foo mumble) 'foo-mumble-b)
+ (make-library-import '(foo grumble)
'foo-grumble?
- '(foo grumble))
- (make-library-import 'grumble-make-foo-grumble
+ 'grumble-foo-grumble?)
+ (make-library-import '(foo grumble)
'make-foo-grumble
- '(foo grumble))
- (make-library-import 'grumble-foo-grumble-a
+ 'grumble-make-foo-grumble)
+ (make-library-import '(foo grumble)
'foo-grumble-a
- '(foo grumble))
- (make-library-import 'grumble-foo-grumble-b
+ 'grumble-foo-grumble-a)
+ (make-library-import '(foo grumble)
'foo-grumble-b
- '(foo grumble))
- (make-library-import 'foo-quux?
- 'foo-quux?
- '(foo quux))
- (make-library-import 'foo-quux-a
- 'foo-quux-a
- '(foo quux))
- (make-library-import 'foo-quux-b
- 'foo-quux-b
- '(foo quux))
- (make-library-import 'create-foo-quux
+ 'grumble-foo-grumble-b)
+ (make-library-import '(foo quux) 'foo-quux?)
+ (make-library-import '(foo quux) 'foo-quux-a)
+ (make-library-import '(foo quux) 'foo-quux-b)
+ (make-library-import '(foo quux)
'make-foo-quux
- '(foo quux))))))
\ No newline at end of file
+ 'create-foo-quux)))))
\ No newline at end of file