<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><div style="font-family: TriplicateT3p;">FWIW this isn't a gratuitously perverse example. It's derived from the actual bug  I've encountered. I use `eval` in my Pollen system to handle dynamic rendering of pages delivered through the web server (don't panic, everyone — it's an approved use of `eval` [1])</div><div style="font-family: TriplicateT3p;"><br></div><div style="font-family: TriplicateT3p;">I use the `dynamic-rerequire` to reload files that have changed since last render. In fact you added it at my request, as I was looking for a Racket function that approximated the Python `reload` function. [2]</div><div style="font-family: TriplicateT3p;"><br></div><div style="font-family: TriplicateT3p;">For now I've worked around the bug — in test-case terms, I've changed this</div><div style="font-family: TriplicateT3p;"><br></div><div style="font-family: TriplicateT3p;"><div>;;; three.rkt</div><div>#lang racket</div></div><div style="font-family: TriplicateT3p;"><br></div><div style="font-family: TriplicateT3p;">To this:</div><div style="font-family: TriplicateT3p;"><br></div><div style="font-family: TriplicateT3p;"><div>;;; three.rkt</div><div>#lang racket/base</div><div><br></div><div>But why that makes a difference, I'm not clear. </div></div><div style="font-family: TriplicateT3p;"><br></div><div style="font-family: TriplicateT3p;">[1] <a href="http://docs.racket-lang.org/web-server/faq.html">http://docs.racket-lang.org/web-server/faq.html</a></div><div style="font-family: TriplicateT3p;">[2] <a href="http://lists.racket-lang.org/users/archive/2013-April/057530.html">http://lists.racket-lang.org/users/archive/2013-April/057530.html</a></div></div><div><br></div><br><div style=""><div>On Aug 7, 2014, at 10:23 PM, Matthew Flatt <<a href="mailto:mflatt@cs.utah.edu">mflatt@cs.utah.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">At Wed, 6 Aug 2014 15:50:41 -0700, Matthew Butterick wrote:<br><blockquote type="cite">Under certain circumstances, because of what I assume is a bug in my code, I<span class="Apple-converted-space"> </span><br>get an error like this:<br><br><blockquote type="cite">define-values: assignment disallowed;<br>cannot re-define a constant<br> constant: lang:read.1<br> in module: "/Users/mb/git/racket/racket/collects/racket/main.rkt"<br> context...:<br>  (submod /Users/mb/git/racket/racket/collects/racket/main.rkt reader):<span class="Apple-converted-space"> </span><br></blockquote>[running body]<br><br>I understand how the "assignment disallowed" error arises. What I don't<span class="Apple-converted-space"> </span><br>understand is the meaning of "lang:read.1" in this context. I'm guessing it has<span class="Apple-converted-space"> </span><br>something to do with the #lang line (?) but ... the rest is hazy.<span class="Apple-converted-space"> </span><br></blockquote><br>The "lang:read" part is the name of a variable that appears in the<br>macro expansion of the `racket` module's `reader` submodule. The ".1"<br>part is because that variable is macro-introduced so that it is not<br>directly accessible using the name `lang:read`.<br><br>The way that `dynamic-rerequire` and submodules interact here is<br>unsatisfying. I think it's a collision between the way that<br>`dynamic-rerequire` pulls from source and the use of<br>`namespace-module-attach` within `make-base-namspace`, and I think that<br>`dynamic-rerequire` needs to do something different, but I haven't yet<br>sorted it out.</div></blockquote></div><br></body></html>