Add missing 'cond-expand' feature identifiers; remove srfi-6 from core list.
authorMark H Weaver <mhw@netris.org>
Thu, 21 Mar 2013 15:51:18 +0000 (11:51 -0400)
committerMark H Weaver <mhw@netris.org>
Thu, 21 Mar 2013 16:50:04 +0000 (12:50 -0400)
* module/ice-9/boot-9.scm (%cond-expand-features): Remove redundant list
  of feature identifiers in the comment.  Explain more clearly what
  belongs in this list.  Remove srfi-6.

* module/srfi/srfi-4.scm, module/srfi/srfi-27.scm,
  module/srfi/srfi-31.scm, module/srfi/srfi-38.scm,
  module/srfi/srfi-39.scm, module/srfi/srfi-42.scm,
  module/srfi/srfi-45.scm, module/srfi/srfi-67.scm: Add missing
  'cond-expand-provide'.

* module/srfi/srfi-69.scm: Fix erroneous 'cond-expand-provide'.

* doc/ref/srfi-modules.texi (SRFI-0): Update the list of features in
  Guile core.

doc/ref/srfi-modules.texi
module/ice-9/boot-9.scm
module/srfi/srfi-27.scm
module/srfi/srfi-31.scm
module/srfi/srfi-38.scm
module/srfi/srfi-39.scm
module/srfi/srfi-4.scm
module/srfi/srfi-42.scm
module/srfi/srfi-45.scm
module/srfi/srfi-67.scm
module/srfi/srfi-69.scm

index 059e14b..347b3de 100644 (file)
@@ -145,9 +145,13 @@ guile-2  ;; starting from Guile 2.x
 r5rs
 srfi-0
 srfi-4
-srfi-6
 srfi-13
 srfi-14
+srfi-23
+srfi-39
+srfi-55
+srfi-61
+srfi-105
 @end example
 
 Other SRFI feature symbols are defined once their code has been loaded
index ed7ebea..ced3a28 100644 (file)
@@ -3897,21 +3897,21 @@ when none is available, reading FILE-NAME with READER."
 ;;; <feature-identifier>s `guile' and `r5rs', so that programs can
 ;;; determine the implementation type and the supported standard.
 ;;;
-;;; Currently, the following feature identifiers are supported:
-;;;
-;;;   guile r5rs srfi-0 srfi-4 srfi-6 srfi-13 srfi-14 srfi-55 srfi-61 srfi-105
-;;;
 ;;; Remember to update the features list when adding more SRFIs.
 ;;;
 
 (define %cond-expand-features
-  ;; Adjust the above comment when changing this.
+  ;; This should contain only features that are present in core Guile,
+  ;; before loading any modules.  Modular features are handled by
+  ;; placing 'cond-expand-provide' in the relevant module.
   '(guile
     guile-2
     r5rs
     srfi-0   ;; cond-expand itself
-    srfi-4   ;; homogenous numeric vectors
-    srfi-6   ;; open-input-string etc, in the guile core
+    srfi-4   ;; homogeneous numeric vectors
+    ;; We omit srfi-6 because the 'open-input-string' etc in Guile
+    ;; core are not conformant with SRFI-6; they expose details
+    ;; of the binary I/O model and may fail to support some characters.
     srfi-13  ;; string library
     srfi-14  ;; character sets
     srfi-23  ;; `error` procedure
index 9777ace..0794a43 100644 (file)
@@ -36,6 +36,8 @@
             random-source-make-reals)
   #:use-module (srfi srfi-9))
 
+(cond-expand-provide (current-module) '(srfi-27))
+
 (define-record-type :random-source
   (%make-random-source state)
   random-source?
index cf67e8a..f11aa84 100644 (file)
@@ -21,6 +21,8 @@
 (define-module (srfi srfi-31)
   #:export (rec))
 
+(cond-expand-provide (current-module) '(srfi-31))
+
 (define-syntax rec
   (syntax-rules ()
     "Return the given object, defined in a lexical environment where
index 874dd90..34cf22e 100644 (file)
@@ -32,6 +32,7 @@
   #:use-module (srfi srfi-69)
   #:use-module (system vm trap-state))
 
+(cond-expand-provide (current-module) '(srfi-38))
 
 ;; A printer that shows all sharing of substructures.  Uses the Common
 ;; Lisp print-circle notation: #n# refers to a previous substructure
index 0d54063..661ab0f 100644 (file)
@@ -41,6 +41,8 @@
                parameterize
                current-input-port current-output-port current-error-port))
 
+(cond-expand-provide (current-module) '(srfi-39))
+
 (define (with-parameters* params values thunk)
   (let more ((params params)
             (values values)
index 43f5ef6..c6eb00b 100644 (file)
@@ -69,6 +69,7 @@
             f64vector? make-f64vector f64vector f64vector-length f64vector-ref
             f64vector-set! f64vector->list list->f64vector))
 
+(cond-expand-provide (current-module) '(srfi-4))
 
 ;; Need quasisyntax to do this effectively using syntax-case
 (define-macro (define-bytevector-type tag infix size)
index 0aaaf8f..c826f6f 100644 (file)
@@ -61,4 +61,6 @@
             vector-ec
             vector-of-length-ec))
 
+(cond-expand-provide (current-module) '(srfi-42))
+
 (include-from-path "srfi/srfi-42/ec.scm")
index 47e3ba6..f865f91 100644 (file)
@@ -41,6 +41,8 @@
   #:replace (delay force promise?)
   #:use-module (srfi srfi-9))
 
+(cond-expand-provide (current-module) '(srfi-45))
+
 (define-record-type promise (make-promise val) promise?
   (val promise-val promise-val-set!))
 
index 7a43ee5..6d9d4c5 100644 (file)
@@ -83,4 +83,6 @@
   #:replace (string-compare string-compare-ci)
   #:use-module (srfi srfi-27))
 
+(cond-expand-provide (current-module) '(srfi-67))
+
 (include-from-path "srfi/srfi-67/compare.scm")
index df07f75..b9486c4 100644 (file)
@@ -88,7 +88,7 @@
   #:re-export (string-hash)
   #:replace (hash make-hash-table hash-table?))
 
-(cond-expand-provide (current-module) '(srfi-37))
+(cond-expand-provide (current-module) '(srfi-69))
 \f
 ;;;; Internal helper macros