<div dir="ltr">Right, exactly.<div><br></div><div>Which is why Ryan's earlier suggestions are better: You can avoid all this mess.<br><div><br></div><div>Robby</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Oct 2, 2013 at 2:59 PM, Ryan Culpepper <span dir="ltr"><<a href="mailto:ryanc@ccs.neu.edu" target="_blank">ryanc@ccs.neu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yes. Also, it's not enough to check that 'racket/pretty' (or really, the name 'racket/pretty' resolves to) isn't declared in the target namespace; you must also check any module it (transitively) requires is either undeclared or was attached from the same namespace you want to attach racket/pretty from.<span class="HOEnZb"><font color="#888888"><br>
<br>
Ryan</font></span><div class="im"><br>
<br>
<br>
On 10/02/2013 03:50 PM, Robby Findler wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
A namespace is a mapping from top-level identifiers to whatever they<br>
are, as well as a separate mapping from module names to modules<br>
(roughly). What you care about here is the second mapping, but you're<br>
checking the first with the patch.<br>
<br>
Robby<br>
<br>
<br>
On Wed, Oct 2, 2013 at 2:45 PM, Stephen Chang <<a href="mailto:stchang@ccs.neu.edu" target="_blank">stchang@ccs.neu.edu</a><br></div><div class="im">
<mailto:<a href="mailto:stchang@ccs.neu.edu" target="_blank">stchang@ccs.neu.edu</a>>> wrote:<br>
<br>
> Whether that identifier exists in the namespace has nothing to do<br>
with<br>
> whether racket/pretty can be attached.<br>
<br>
Can you explain this a little more because it's a little unintuitive<br>
to me?<br>
<br>
<br>
><br>
> One option would be for install-pretty-printer! to just catch and<br>
discard<br>
> the error. Evaluators for some languages would mysteriously not have<br>
> pretty-printing turned on by default.<br>
><br>
> Another option would be to attach racket/pretty before requiring<br>
the initial<br>
> language for the namespace.<br>
><br>
> Another option is use #:pretty-print? #f when attaching<br>
racket/pretty would<br>
> fail.<br>
><br>
> Ryan<br>
><br>
_________________________<br>
Racket Developers list:<br>
<a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/<u></u>dev</a><br>
<br>
<br>
</div></blockquote>
<br>
</blockquote></div><br></div>