Hi Daniel - <br><br>Sorry to be unspecific - I thought my error has to do with me not understanding the module loading system, that's why I ask the question this way. <br><br>The error that I am seeing is:<br><br>module: no #%module-begin binding in the module's language in: (module foo (lib "
util.scm" "util") (require (lib "trace.ss")) (define x 1) (provide (all-defined)))<br><br>I tried your example and it worked (of course ;P), and I try to figure out the difference between the two - and it turns out the line
<br><br><div style="margin-left: 40px;">(provide (all-from mzscheme)) <br></div><br>is what I am missing - when I add that to my module it also worked ;) So I asked the wrong question, but you gave me the right answer - thanks :P
<br><br>The planet development link and idea sounds interesting - I will take a look at it ;) <br><br>Thanks,<br>yinso <br><br><div><span class="gmail_quote">On 5/1/07, <b class="gmail_sendername">Daniel Yoo</b> <<a href="mailto:dyoo@cs.wpi.edu">
dyoo@cs.wpi.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>> but I cannot then use the module in the language position (per my
<br>> understanding that's how one can create a new language...) - so the<br>> following don't work:<br>><br>> (module foo (lib "util.scm" "util")<br>> ....)<br><br>Hi Yinso,<br>
<br>Can you be more specific? Do you mean that the module system doesn't see<br>it at all, or does something else happen? If you can show us a specific<br>error message, maybe we can help to explain it.<br><br><br>Here's an example of a language that includes a compose primitive (which
<br>is slightly silly, since one exists in (lib "etc.ss")... )<br><br>#########################################################<br>mithril:~/Desktop dyoo$ cat test/mzscheme-with-compose.ss<br>(module mzscheme-with-compose mzscheme
<br> (provide (all-from mzscheme))<br><br> (provide compose)<br><br> (define (compose f g)<br> (lambda (x)<br> (f (g x)))))<br><br><br>mithril:~/Desktop dyoo$ PLTCOLLECTS=~/Desktop mzscheme<br>Welcome to MzScheme
v369.10 [3m], Copyright (c) 2004-2007 PLT Scheme Inc.<br>><br>><br>> (module test-compose (lib "mzscheme-with-compose.ss" "test")<br> (printf "hello ~a~n" ((compose string-upcase
<br>(lambda (x) (string-append x x)))<br> "yinso")))<br>> (require test-compose)<br>hello YINSOYINSO<br>#########################################################<br><br>So there's no requirement that language modules have to live in a specific
<br>place, just as long as the module resolver can find them.<br><br><br>One of the really minimal languages, like Dave Herman's mzlite.plt PLaneT<br>package, might also help you get started:<br><br> <a href="http://planet.plt-scheme.org/display.ss?package=mzlite.plt&owner=dherman">
http://planet.plt-scheme.org/display.ss?package=mzlite.plt&owner=dherman</a><br><br><br><br>> If that's the solution, then a related question would be how one should<br>> organize source code so one don't have to pollute the \plt\collects
<br>> directory so it works well in the face of an upgrade.<br><br>Doing things in the PLaneT framework seems to be less problematic for me.<br>It sounds like you've configured PLTCOLLECTS. For personal development,
<br>rather than do something with the PLTCOLLECTS environmental variable, I've<br>been taking advantage of PLaneT's development link feature.<br><br>We can register a directory to act as a development link for PLaneT, so
<br>that module references like (planet "some-module.ss" ("dyoo"<br>"package.plt")) resolve locally to my work directory. It makes things<br>easier if the code ends up being useful enough to really migrate onto
<br>PLaneT.<br><br>If you're interested, see the section on "Development links" and the<br>"--associate" option in:<br><br> <a href="http://pre.plt-scheme.org/plt/collects/planet/doc.txt">http://pre.plt-scheme.org/plt/collects/planet/doc.txt
</a><br><br><br><br>Good luck!<br></blockquote></div><br>