1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

* README: Update, document available SRFIs.

* srfi-19.scm, srfi-17.scm, srfi-16.scm, srfi-14.scm, srfi-13.scm,
	srfi-11.scm, srfi-10.scm, srfi-9.scm, srfi-8.scm, srfi-6.scm,
	srfi-2.scm: Use `cond-expand-provide' for providing features to
	`cond-expand'.
This commit is contained in:
Martin Grabmüller 2001-05-23 05:04:55 +00:00
parent d579d1652d
commit 1b2f40b9f1
13 changed files with 84 additions and 117 deletions

View file

@ -1,3 +1,14 @@
2001-05-22 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
* README: Update, document available SRFIs.
2001-05-21 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
* srfi-19.scm, srfi-17.scm, srfi-16.scm, srfi-14.scm, srfi-13.scm,
srfi-11.scm, srfi-10.scm, srfi-9.scm, srfi-8.scm, srfi-6.scm,
srfi-2.scm: Use `cond-expand-provide' for providing features to
`cond-expand'.
2001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
* srfi-14.c (scm_c_init_srfi_14): Added "int" to declaration of

View file

@ -1,141 +1,74 @@
This is the integration of guile-srfi into the core. -*- text -*-
This directory includes most of Guile's SRFI support. -*- text -*-
[ this is the README from guile-srfi 0.0.3, slightly modified for the
integration into the Guile core
For more details about what SRFI means, and what the various numbers
stand for, please refer to the SRFI homepage at
'martin -- 2001-04-23 ]
http://srfi.schemers.org
This is a compiled Guile module that provides the string procedures
defined in SRFI-13 (string library), and the character set procedures
defined in SRFI-14 (character-set library).
The following SRFIs are supported (as of 2001-05-22 -- 'martin):
Getting Started ======================================================
SRFI-0: cond-expand
1. Type
Supported by default, no module needs to get used.
guile
SRFI-2: and-let*
You should now be at the Guile prompt ("guile> ").
(use-modules (srfi srfi-2)) to make and-let* available.
2. Type
SRFI-6: open-input-string, open-output-string and get-output-string
(use-modules (srfi srfi-13))
(use-modules (srfi srfi-6)) to make these available. (Currently,
these procedures are available without using the module, but the
procedures might be factored out of the core library in the
future.)
so that the srfi-13 module gets loaded.
SRFI-8: receive
3. We're now ready to try some basic srfi-13/14 functionality.
(use-modules (srfi srfi-8)) to make receive available.
$ guile
guile> (use-modules (srfi srfi-13))
guile> (string-concatenate '("Hello" " " "World"))
"Hello World"
guile>
SRFI-9: define-record-type
Check out the SRFI-14 (character-set library) procedures, too:
A mechanism for defining record types. (use-modules (srfi srfi-9))
makes this syntactic form available.
$ guile
guile> (use-modules (srfi srfi-14))
guile> (char-set-union (char-set #\f #\o #\o) (string->char-set "bar"))
#<charset {#\a #\b #\f #\o #\r}>
guile>
SRFI-10: #,()
What Is Included =====================================================
The hash-comma reader extension. (use-modules (srfi srfi-10))
activates the extension.
All SRFI-13 procedures which are not already compatibly defined in
the Guile core are implemented. These are:
SRFI-11: let-values and let-values*
string-any string-every
string-tabulate
string->list
reverse-list->string
string-join
string-copy
substring/shared string-copy!
string-take string-take-right
string-drop string-drop-right
string-pad string-pad-right
string-trim string-trim-right string-trim-both
string-fill!
string-compare string-compare-ci
string= string<>
string< string>
string<= string>=
string-ci= string-ci<>
string-ci< string-ci>
string-ci<= string-ci>=
string-hash string-hash-ci
string-prefix-length string-prefix-length-ci
string-suffix-length string-suffix-length-ci
string-prefix? string-prefix-ci?
string-suffix? string-suffix-ci?
string-index string-index-right
string-skip string-skip-right
string-count
string-contains string-contains-ci
string-upcase string-upcase!
string-downcase string-downcase!
string-titlecase string-titlecase!
string-reverse string-reverse!
string-append/shared
string-concatenate
reverse-string-concatenate
string-concatenate/shared
reverse-string-concatenate/shared
string-map string-map!
string-fold string-fold-right
string-unfold string-unfold-right
string-for-each
xsubstring string-xcopy!
string-replace string-tokenize
string-filter string-delete
Syntactic extensions for handling multiple values. (use-modules
(srfi srfi-11)) makes these syntactic forms available.
SRFI-13: string library
All procedures and variables defined in SRFI-14 are implemented.
Thes complete list is:
A lot of (more or less) useful string processing procedures.
(use-modules (srfi srfi-13)) loads the procedures.
char-set? char-set= char-set<=
char-set-hash
char-set-fold char-set-unfold char-set-unfold!
char-set-for-each char-set-map
char-set-copy
char-set
list->char-set list->char-set!
string->char-set string-char-set!
predicate->char-set predicate->char-set!
ucs-range->char-set ucs-range->char-set!
->char-set ->char-set!
char-set-size char-set-count
char-set-members char-set-contains?
char-set-every char-set-any
char-set-adjoin char-set-adjoin!
char-set-delete char-set-delete!
char-set-invert char-set-invert!
char-set-union char-set-union!
char-set-intersection char-set-intersection!
char-set-difference char-set-difference!
char-set-xor char-set-xor!
char-set-diff+intersection char-set-diff+intersection!
char-set:lower-case char-set:upper-case
char-set:title-case char-set:letter
char-set:digit char-set:letter+digit
char-set:graphic char-set:printing
char-set:whitespace char-set:iso-control
char-set:punctuation char-set:symbol
char-set:hex-digit char-set:blank
char-set:ascii char-set:empty
char-set:full
SRFI-14: character-set library
Character-set library. (use-modules (srfi srfi-14)) loads the
procedures and standard variables.
What Is Not Included =================================================
SRFI-16: case-lambda
The following low-level procedures and syntax defined in SRFI-13
are currently not supported.
Syntactic form which permits writing functions acting different
according to the number of arguments passed. (use-modules (srfi
srfi-16)) makes this syntactic form available.
string-parse-start+end
string-parse-final-start+end
let-string-start+end
check-substring-spec
substring-spec-ok?
make-kmp-restart-vector
kmp-step
string-search-kmp
SRFI-17: Generalized set!
Guile supports generalized set! by default, but this module makes it
fully compliant to the SRFI. (use-modules (srfi srfi-17)) loads the
procedures.
SRFI-19: Time Data Types and Procedures
A lot of data types and procedures for dealing with times and
dates. (use-modules (srfi srfi-19)) loads the procedures.
SRFI-23: Error reporting mechanism (draft)
This SRFI is still in draft status, but Guile fully supports it
already. No need to load any module.

View file

@ -49,6 +49,8 @@
(export define-reader-ctor)
(cond-expand-provide (current-module) '(srfi-10))
;; This hash table stores the association between comma-hash tags and
;; the corresponding constructor procedures.
;;

View file

@ -20,6 +20,8 @@
(define-module (srfi srfi-11)
:use-module (ice-9 syncase))
(cond-expand-provide (current-module) '(srfi-11))
;;;;;;;;;;;;;;
;; let-values
;;

View file

@ -110,6 +110,8 @@
string-delete
)
(cond-expand-provide (current-module) '(srfi-13))
(dynamic-call "scm_init_srfi_13" (dynamic-link "libguile-srfi-srfi-13-14"))
(define string-hash
@ -139,3 +141,4 @@
(caddr rest)
(string-length s))))
(hash (string-upcase (substring/shared s start end)) bound))))

View file

@ -90,6 +90,8 @@
char-set:full
)
(cond-expand-provide (current-module) '(srfi-14))
(dynamic-call "scm_init_srfi_14" (dynamic-link "libguile-srfi-srfi-13-14"))
(define (->char-set x)

View file

@ -49,6 +49,8 @@
(export-syntax case-lambda)
(cond-expand-provide (current-module) '(srfi-16))
(define-macro (case-lambda . clauses)
;; Return the length of the list @var{l}, but allow dotted list.

View file

@ -49,6 +49,8 @@
caddar cadddr cdaaar cdaadr cdadar cdaddr cddaar cddadr
cdddar cddddr string-ref vector-ref))
(cond-expand-provide (current-module) '(srfi-17))
;;; Procedures
(define getter-with-setter make-procedure-with-setter)

View file

@ -119,6 +119,8 @@
date->string
string->date))
(cond-expand-provide (current-module) '(srfi-19))
;; :OPTIONAL is nice
(define-syntax :optional

View file

@ -21,3 +21,5 @@
:use-module (ice-9 and-let-star))
(export-syntax and-let*)
(cond-expand-provide (current-module) '(srfi-2))

View file

@ -21,3 +21,5 @@
;; Currently, guile provides these functions by default, so no action
;; is needed, and this file is just a placeholder.
(cond-expand-provide (current-module) '(srfi-6))

View file

@ -21,3 +21,5 @@
:use-module (ice-9 receive))
(export-syntax receive)
(cond-expand-provide (current-module) '(srfi-8))

View file

@ -63,6 +63,8 @@
(export-syntax define-record-type)
(cond-expand-provide (current-module) '(srfi-9))
(define-macro (define-record-type type-name constructor/field-tag
predicate-name . field-specs)
`(begin