Right, exactly. Which is why Ryan's earlier suggestions are better: You can avoid all this mess.
Robby On Wed, Oct 2, 2013 at 2:59 PM, Ryan Culpepper <ry...@ccs.neu.edu> wrote: > 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. > > Ryan > > > > On 10/02/2013 03:50 PM, Robby Findler wrote: > >> A namespace is a mapping from top-level identifiers to whatever they >> are, as well as a separate mapping from module names to modules >> (roughly). What you care about here is the second mapping, but you're >> checking the first with the patch. >> >> Robby >> >> >> On Wed, Oct 2, 2013 at 2:45 PM, Stephen Chang <stch...@ccs.neu.edu >> <mailto:stch...@ccs.neu.edu>> wrote: >> >> > Whether that identifier exists in the namespace has nothing to do >> with >> > whether racket/pretty can be attached. >> >> Can you explain this a little more because it's a little unintuitive >> to me? >> >> >> > >> > One option would be for install-pretty-printer! to just catch and >> discard >> > the error. Evaluators for some languages would mysteriously not >> have >> > pretty-printing turned on by default. >> > >> > Another option would be to attach racket/pretty before requiring >> the initial >> > language for the namespace. >> > >> > Another option is use #:pretty-print? #f when attaching >> racket/pretty would >> > fail. >> > >> > Ryan >> > >> _________________________ >> Racket Developers list: >> http://lists.racket-lang.org/**dev <http://lists.racket-lang.org/dev> >> >> >> >
_________________________ Racket Developers list: http://lists.racket-lang.org/dev