1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

fix use-syntax / use-modules confusion -- fixes testsuites

* testsuite/t-match.scm:
* testsuite/t-records.scm: While the attempt to redefine use-syntax as
  being "use during compilation" was cute, it does not reflect the
  historical usage of use-syntax, nor does it correspond to existing code
  that includes other modules and uses them during compilation.

  So use-syntax has been replaced with use-modules. The test suites now
  pass. In the future, compilation phases should be done on whole
  modules, I think; r5rs-style computation does not have phases.
This commit is contained in:
Andy Wingo 2008-05-14 14:54:52 +02:00
parent 7d1c45d38e
commit 0658041d11
2 changed files with 3 additions and 14 deletions

View file

@ -1,9 +1,8 @@
;;; Pattern matching with `(ice-9 match)'.
;;;
;; Both modules are compile-time dependencies, hence `use-syntax'.
(use-syntax (ice-9 match))
(use-syntax (srfi srfi-9)) ;; record type (FIXME: See `t-records.scm')
(use-modules (ice-9 match)
(srfi srfi-9)) ;; record type (FIXME: See `t-records.scm')
(define-record-type <stuff>
(%make-stuff chbouib)

View file

@ -1,17 +1,7 @@
;;; SRFI-9 Records.
;;;
;; SRFI-9 is a compile-time dependency (it exports the `define-record-type'
;; macro), hence the `use-syntax'.
;;
;; FIXME: The current definition of `use-syntax' in `boot-9.scm' is broken
;; and is not consistent with what happens when using:
;;
;; (define-module (module) :use-syntax (chbouib))
;;
;; This precludes the test-suite from running this program using the
;; interpreter.
(use-syntax (srfi srfi-9))
(use-modules (srfi srfi-9))
(define-record-type <stuff>
(%make-stuff chbouib)