[Scheme-reports] "include" filename resolution Denis Washington (08 Aug 2011 07:43 UTC)
Re: [Scheme-reports] "include" filename resolution Malcolm Tredinnick (08 Aug 2011 09:07 UTC)
Re: [Scheme-reports] "include" filename resolution Aaron W. Hsu (08 Aug 2011 20:06 UTC)
Re: [Scheme-reports] "include" filename resolution Andy Wingo (12 Aug 2011 20:29 UTC)

Re: [Scheme-reports] "include" filename resolution Andy Wingo 12 Aug 2011 20:27 UTC

On Mon 08 Aug 2011 09:43, Denis Washington <denisw@online.de> 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.

Andy
--
http://wingolog.org/

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports