On 10/02/2013 03:19 PM, Stephen Chang wrote:
Can I push the attached (1-line) patch? I don't have a good grasp of
namespaces so I would like someone to review it first.

Right now, make-base-eval tries to attach racket/pretty to the
namespace regardless of whether it's already there, which sometimes
results in an exception (for example if the #lang given to
make-base-eval is racket).

The patch simply first checks if the desired identifier is already there.

Whether that identifier exists in the namespace has nothing to do with whether racket/pretty can be attached.

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

Reply via email to