Library Structure, Program Structure, and cond-expand Felix Thibault (26 Jan 2021 07:36 UTC)
Re: Library Structure, Program Structure, and cond-expand Marc Nieper-Wißkirchen (26 Jan 2021 09:22 UTC)
Re: Library Structure, Program Structure, and cond-expand Felix Thibault (26 Jan 2021 10:15 UTC)
Re: Library Structure, Program Structure, and cond-expand Marc Nieper-Wißkirchen (26 Jan 2021 10:36 UTC)
Re: Library Structure, Program Structure, and cond-expand Felix Thibault (26 Jan 2021 15:41 UTC)

Library Structure, Program Structure, and cond-expand Felix Thibault 26 Jan 2021 07:35 UTC

Looking at R7RS, I see that a library is supposed to start with a
define-library statement and a program is supposed to start with an
import statement. Both the main srfi/204.sld library and the
test/match-test.scm, which cover implementation and testing for Chibi,
Gauche, Guile, and Larceny, consist of a large cond-expand with a
block for each implementation (I've seen this style before in, say
srfi-64/testing.scm).

Even though the standard and practice seemed to be in conflict, it was
not something I was aware of until I tried to integrate Unsyntax into
these files. Is this an error or a known issue or what? It seems like
it would reduce the usefulness of cond-expand if it couldn't be at the
top, but that's not what the spec says unless I am missing something.

Felix