Retropikzel's blog - 2026-02-19 - Notes to R7RS implementors: include

Notes to R7RS implementors: include

I thought I would start writing down some notes about Scheme implementations in the wild. I frequently use around 20 implementations so it is easy to forget things. And I might be a Scheme implementator myself some day.

R7RS says this about include:

...apply an implementation-specific algorithm to find corresponding files...

and

Note: Implementations are encouraged to search for files in
the directory which contains the including file, and to provide
a way for users to specify other directories to search.

This means that yourname/librarys.sld, having (include “library.scm”) will look for it first in yourname/library.scm.

Now in theory you do not need to do that. However these implementations do:

Guile is absent, in which it is more or less consired a bug https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66046 and will be “fixed” some day.

Snow-fort packages rely on this, so without this feature no support for those.

So in practice it is not a strecth to say that implementatios need to search for files in the directory which contains the including file. If they wish to participate in the Scheme ecosystem.

Many R6RS Schemes also have include and follow the same convention.