From: John Cowan <[email protected]>
Subject: Re: [r6rs-discuss] Import choices: flexibility vs. discoverability
Date: Tue, 13 Oct 2009 17:21:24 -0400

> Shiro Kawai scripsit:
> 
> > Hmm... in this scenario, you can only say (import Good-Module)
> > within some conditionals, either directly in the cond-expand
> > clause or indirectly within the included file.   That means
> > import must be recognized *after* macro expansion, or the
> > conditional must be lifted to the module-syntax level, doesn't it?
> 
> No, because you import the same set of identifiers in either case.
> You load different sets of code thanks to the conditional inclusion.

I don't understand.  My application can work with and without
Good-Module, but wants to use it if available.
Somewhere in my app I need to say (import Good-Module) in
order to use existing Scheme module Good-Module, right?

Do you suggest that I put (import Good-Module) in a file and
include it in conditional clause? e.g.

  (cond-expand
    (has-good-module (include "import-good-module.scm"))
    (else ...alternative code...))

and in separate file "import-good-module.scm"

  (import Good-Module)

But if include just works as code substitution, then isn't the
above code equivalent to the following?

  (cond-expand
    (has-good-module (import Good-Module))
    (else ...alternative code...))

--shiro




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

Reply via email to