<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hello,<br><br>thank you very much. I read that line, but I couldn't figure out what the "symbol-appending the write form of a submodule path ..." would look like. I tried xsub and x-sub and searching the documentation, but couldn't find it.<br><br>Thanks again,<br><br>Bert<br><br><div>> From: mflatt@cs.utah.edu<br>> To: bedeke@hotmail.com<br>> CC: users@racket-lang.org<br>> Subject: Re: [racket] executable starting in submodule<br>> Date: Wed, 30 Apr 2014 16:48:14 -0600<br>> <br>> Sorry for the long delay! I hope this answer is still useful.<br>> <br>> Buried in the very long documentation for `create-embedding-executable`<br>> is the note<br>> <br>> When submodules are available and included, the submodule is given a<br>> name by symbol-appending the write form of submodule path to the<br>> enclosing module's name.<br>> <br>> For example, if "x.rkt" contains<br>> <br>> #lang racket/base<br>> 'not-sub<br>> (module sub racket/base<br>> 'sub)<br>> <br>> then the name you want is '|x(sub)|:<br>> <br>> (create-embedding-executable<br>> "x"<br>> #:gracket? #f<br>> #:verbose? #f<br>> #:modules '((#f "x.rkt" (sub)))<br>> #:configure-via-first-module? #t<br>> #:literal-expression<br>> (parameterize ([current-namespace (make-base-namespace)])<br>> (compile `(namespace-require ''|x(sub)|))))<br>> <br>> <br>> At Mon, 14 Apr 2014 17:06:15 +0200, Bert De Ketelaere wrote:<br>> > Hello,<br>> > <br>> > is it possible to let an embedded-executable start in a submodule?<br>> > If yes, how do you do this?<br>> > <br>> > I tried<br>> > (create-embedding-executable<br>> > exe-name<br>> > #:gracket? #f<br>> > #:verbose? #f<br>> > #:modules (if (build-subs B)<br>> > `((#f ,filename ,(submods))<br>> > `((#f ,filename)))<br>> > #:configure-via-first-module? #t<br>> > #:literal-expression<br>> > (parameterize ([current-namespace (make-base-empty-namespace)])<br>> > (namespace-require 'racket/base)<br>> > (if (build-subs B)<br>> > (compile `(namespace-require '(submod ',(string->symbol <br>> > (path->string short-program-name))<br>> > <br>> > ,(string->symbol (build-subs B)))))<br>> > (compile `(namespace-require '',(string->symbol (path->string <br>> > short-program-name)))))))<br>> > <br>> > but I get:<br>> > require: unknown module<br>> > module name: #<resolved-module-path:(submod 'filename submods)><br>> > context...:<br>> > loop<br>> > <br>> > Also, does the resolved-module-path structure mean that the path was completely <br>> > resolved during compilation, or only the first step?<br>> > Any help would be appreciated,<br>> > <br>> > Bert<br>> > ____________________<br>> > Racket Users list:<br>> > http://lists.racket-lang.org/users<br></div> </div></body>
</html>