This is a proposal for cond-expand in R7RS small Scheme. I am publishing
this document to invite wide comment. There is nothing official about
it. I acknowledge the kind help of members of the r6rs-discuss mailing
list and the #scheme IRC channel in the discussions that led up to
this document. However, I retain sole responsibility for it, including
all errors.

Cond-expand as explained in SRFI 0 doesn't explain where the feature
identifiers come from.  I'm proposing the following list.  A small Scheme
implementation has the feature identifier if it has the feature.

thing-one (temporary name)
        All R7RS small Scheme implementations have this feature.

exact-closed
        All rational operations on exact values produce exact values, with
        the possible exception of /.  If an implementation restriction
        is reached, an error is signaled.  If this feature identifier
        is missing, some results may be inexact.

ratios
        / with exact arguments produces an exact result.

ieee-float
        Inexact numbers are IEEE 754 floating point values.  This implies
        support for +inf.0, -inf.0, +nan.0, and -0.0.

full-unicode
        All Unicode characters are supported

windows
        This Scheme implementation is running on Windows.

posix
        This Scheme implementation is running on a Posix system.

unix, darwin, linux, bsd, netbsd, openbsd, freebsd, ...
        OS-specific flags.

i386, x86_64, ppc, sparc, sparc64, ...
        CPU-specific flags.

ilp32, lp64, ilp64, ...
        C-memory-model-specific flags.
<name>
        The name of this implementation.

<name>-<version>
        The name and version of this implementation.

<other>
        Anything implementation-specific.

In addition, if a module is _importable_, then its name appears in the
feature identifiers list (now something of a misnomer, since not all
module names are identifiers).  A module is importable if it is:

        already loaded and imported;

        already loaded but not currently imported;

        not loaded, but known to exist due to an implementation-specific
        mapping between (at least some) module names and external entries
        such as file names.

--
John Cowan  [email protected]   http://www.ccil.org/~cowan
Dievas dave dantis; Dievas duos duonos          --Lithuanian proverb
Deus dedit dentes; deus dabit panem             --Latin version thereof
Deity donated dentition;
  deity'll donate doughnuts                     --English version by Muke Tever
God gave gums; God'll give granary              --Version by Mat McVeagh

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to