mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 12:20:20 +02:00
* module/ice-9/boot-9.scm (define-module): Fix to load the #:use-module clauses in the order in which they appear in the define-module form. Thanks to Jan Nieuwenhuizen for the report. * test-suite/standalone/test-import-order: Add new test that define-module and use-modules resolve the interface in the right order. * test-suite/standalone/Makefile.am: * test-suite/standalone/test-import-order-a.scm: * test-suite/standalone/test-import-order-b.scm: * test-suite/standalone/test-import-order-c.scm: * test-suite/standalone/test-import-order-d.scm: Aux files.
31 lines
No EOL
728 B
Scheme
Executable file
31 lines
No EOL
728 B
Scheme
Executable file
#!/bin/sh
|
|
exec guile -q -L "$builddir" -s "$0" "$@"
|
|
!#
|
|
|
|
(define-module (base)
|
|
#:export (push! order))
|
|
|
|
(define order '())
|
|
(define (push!)
|
|
(set! order `(,@order ,(module-name (current-module)))))
|
|
|
|
(define-module (test-1)
|
|
#:use-module (base)
|
|
#:use-module (test-import-order-a)
|
|
#:use-module (test-import-order-b))
|
|
|
|
(use-modules (test-import-order-c) (test-import-order-d))
|
|
|
|
(if (not (equal? order
|
|
'((test-import-order-a)
|
|
(test-import-order-b)
|
|
(test-import-order-c)
|
|
(test-import-order-d))))
|
|
(begin
|
|
(format (current-error-port) "Unexpected import order: ~a" order)
|
|
(exit 1))
|
|
(exit 0))
|
|
|
|
;; Local Variables:
|
|
;; mode: scheme
|
|
;; End: |