<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Courier New">Matthew,</FONT></DIV>
<DIV><FONT face="Courier New">Thanks for a quick and clear answer.</FONT></DIV>
<DIV><FONT face="Courier New">I agree that the example should be refused under
all circumstances.</FONT></DIV>
<DIV><FONT face="Courier New">Nevertheless, Check Syntax should not crash on it,
I think.</FONT></DIV>
<DIV><FONT face="Courier New">Wrapping
current-library-collection-paths within parameterization prompt, as you
suggest, probably solves this problem.</FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><FONT face="Courier New">My example stems from a more elaborate code that
starts from (this-expression-source-directory) in order to find out in which
root-directory the main module and its libraries are stored, thus making the
code insensitive for the location of the root-directory. Now I am left with the
question how to avoid absolute path names and yet allowing different versions in
different root-directories without hardwiring a
different root-directory in every version. A short hint would be much
appreciated.</FONT></DIV>
<DIV><FONT face="Courier New">Greetings, Jos koot</FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV>----- Original Message ----- </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=mflatt@cs.utah.edu href="mailto:mflatt@cs.utah.edu">Matthew Flatt</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=jos.koot@telefonica.net
href="mailto:jos.koot@telefonica.net">jos koot</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Cc:</B> <A title=plt-scheme@list.cs.brown.edu
href="mailto:plt-scheme@list.cs.brown.edu">PLT-list</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, April 18, 2007 12:51
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [plt-scheme] Current library
collection paths and Check Syntax</DIV>
<DIV><BR></DIV>At Wed, 18 Apr 2007 11:51:13 +0200, "jos koot" wrote:<BR>>
Hi,<BR>> Consider:<BR>> <BR>> Definitions window:<BR>> (module
runs-well-but-does-not-pass-syntax-check mzscheme<BR>>
(begin-for-syntax<BR>>
(current-library-collection-paths<BR>>
(cons<BR>>
"c:/scheme/kcollects"<BR>>
(current-library-collection-paths))))<BR>> (require (lib "for.ss"
"for")) ; from c:/scheme/kcollects/for/for.ss<BR>> (for ((i 1 3))
(printf "~s~n" i)))<BR>> [...]<BR>> May be I am doing a nasty
thing<BR><BR>Definitely, yes. :)<BR><BR>You're right that Check Syntax and
normal execution should be<BR>consistent. My reaction is not to wonder why
this doesn't work in Check<BR>Syntax, but to try to figure out how to make it
not work under any<BR>circumstances.<BR><BR>Maybe this is a good example of
why `current-library-collection-paths'<BR>shouldn't be a parameter. Or maybe
there should be a kind of<BR>parameterization prompt around certain
expressions, such as<BR>`begin-for-syntax' and macro-transformer
calls.<BR><BR>Anyway, the module system works when module names like `(lib
"for.ss"<BR>"for")' are treated as fixed points in the universal module
namespace.<BR>When you start shifting the universe around, lots of things will
go<BR>wrong. In this case, the universe shifts for expanding the module,
but<BR>Check Syntax still sees the unshifted universe, so it gets
confused.<BR><BR>Matthew<BR><BR></BLOCKQUOTE></BODY></HTML>