[racket-dev] patch for make-base-eval

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Wed Oct 2 15:41:27 EDT 2013

The last two sound better than the others to me, FWIW.

Robby


On Wed, Oct 2, 2013 at 2:37 PM, Ryan Culpepper <ryanc at ccs.neu.edu> wrote:

> 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 <http://lists.racket-lang.org/dev>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20131002/f02c3afb/attachment.html>

Posted on the dev mailing list.