SRFI documentation form S48 0.57.
This commit is contained in:
parent
8728acdf1f
commit
ea96ad569c
|
@ -725,6 +725,67 @@ Structure \code{c-system-function} provides access to the C \code{system()}
|
|||
\evalsto 'foo
|
||||
\end{example}
|
||||
|
||||
|
||||
\section{SRFIs}
|
||||
|
||||
`SRFI' stands for `Scheme Request For Implementation'.
|
||||
An SRFI is a description of an extension to standard Scheme.
|
||||
Draft and final SRFI documents, a FAQ, and other information about SRFIs
|
||||
can be found at the
|
||||
\xlink{SRFI web site}[ at \code{http://srfi.schemers.org}]
|
||||
{http://srfi.schemers.org}.
|
||||
|
||||
Scheme~48 includes implementations of the following (final) SRFIs:
|
||||
\begin{itemize}
|
||||
\item SRFI 1 -- List Library
|
||||
\item SRFI 2 -- \code{and-let*}
|
||||
\item SRFI 5 -- \code{let} with signatures and rest arguments
|
||||
\item SRFI 6 -- Basic string ports
|
||||
\item SRFI 7 -- Program configuration
|
||||
\item SRFI 8 -- \code{receive}
|
||||
\item SRFI 9 -- Defining record types
|
||||
\item SRFI 11 -- Syntax for receiving multiple values
|
||||
\item SRFI 13 -- String Library
|
||||
\item SRFI 14 -- Character-Set Library (see note below)
|
||||
\item SRFI 16 -- Syntax for procedures of variable arity
|
||||
\item SRFI 17 -- Generalized \code{set!}
|
||||
\item SRFI 23 -- Error reporting mechanism
|
||||
\end{itemize}
|
||||
Documentation on these can be found at the web site mentioned above.
|
||||
|
||||
SRFI~14 includes the procedure \code{->char-set} which is not a standard
|
||||
Scheme identifier (in R$^5$RS the only required identifier starting
|
||||
with \code{-} is \code{-} itself).
|
||||
In the Scheme~48 version of SRFI~14 we have renamed \code{->char-set}
|
||||
as \code{x->char-set}.
|
||||
|
||||
The SRFI bindings can be accessed either by opening the appropriate structure
|
||||
(the structure \code{srfi-}\cvar{n} contains SRFI \cvar{n})
|
||||
or by loading structure \code{srfi-7} and then using
|
||||
the \code{,load-srfi-7-program} command to load an SRFI 7-style program.
|
||||
The syntax for the command is
|
||||
\begin{example}
|
||||
\code{,load-srfi-7-program \cvar{name} \cvar{filename}}
|
||||
\end{example}
|
||||
This creates a new structure and associated package, binds the structure
|
||||
to \cvar{name} in the configuration package, and then loads the program
|
||||
found in \cvar{filename} into the package.
|
||||
|
||||
As an example, if the file \code{test.scm} contains
|
||||
\begin{example}
|
||||
(program (code (define x 10)))
|
||||
\end{example}
|
||||
this program can be loaded as follows:
|
||||
\begin{example}
|
||||
> ,load-package srfi-7
|
||||
> ,load-srfi-7-program test test.scm
|
||||
[test]
|
||||
> ,in test
|
||||
test> x
|
||||
10
|
||||
test>
|
||||
\end{example}
|
||||
|
||||
%\W \chapter*{Index}
|
||||
%\W \htmlprintindex
|
||||
%\T \input{doc.ind}
|
||||
|
|
Loading…
Reference in New Issue