[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] "include" filename resolution

On Mon 08 Aug 2011 09:43, Denis Washington <denisw@x> writes:

> I was wondering how implementations are thought to resolve file names in 
> module "include" forms: relative to the including source file or the 
> current working directory?

Given that `include' only exists in the `module' form, whose mapping to
the filesystem is unspecified, then this is also unspecified.

However the way that Guile will deal with this will probably be to
search the load path for the file.  That said, it's unclear which of the
following forms it should be:

 (module (foo)
   (include "foo/bar"))

 (module (foo)
   (include "foo/bar.scm"))

 (module (foo)
   (include "bar"))

 (module (foo)
   (include "bar.scm"))

I lean towards the first option, FWIW.


Scheme-reports mailing list