[plt-scheme] DrScheme buglet?

From: Robby Findler (robby at cs.uchicago.edu)
Date: Wed Aug 29 22:32:29 EDT 2007

Well, sorry for the lack of clarity on my part, but the currently
checked in SVN version of drscheme always includes the teachpacks in
the REPL, regardless of the error that occurs (barring bugs, of

It does this by catching the compile-time exn, saving it, and then
making up a dummy program with nothing in it but the teachpacks. after
that program succeeds, it re-raises the original error.

This does change the order of the raised exceptions in the case that
there is a runtime error in a teachpack and a compile-time error in
the original program, but that seems relatively unimportant.

Also, this only works with the GUI-inserted teachpacks. If you
actually type "require" in your program, you get the old behavior.


On 8/29/07, Robby Findler <robby at cs.uchicago.edu> wrote:
> On 8/29/07, Todd O'Bryan <toddobryan at mac.com> wrote:
> > On Wed, 2007-08-29 at 11:01 -0500, Robby Findler wrote:
> > > On 8/29/07, Todd O'Bryan <toddobryan at mac.com> wrote:
> > > > Yep. This is what's happening and it's kind of what I suspected.
> > > >
> > > > I wonder if there would be some way to create a definition scope that
> > > > just consists of the teachpacks and then add the user definitions to
> > > > that scope if it's syntactically well-formed. If it's not, just load the
> > > > teachpack scope or something.
> > >
> > > In general, that's a wonderful research question :)
> > >
> > Is this really a research question? I'll admit I'm not up enough on how
> > exactly contexts are implemented, but isn't it somewhat additive? Can't
> > you evaluate the teachpacks, save the data structure you get, evaluate
> > the user defs and use the saved structure or the final structure
> > depending on whether or not you get an error?
> >
> > Obviously, I'm vastly oversimplifying or you wouldn't have said what you
> > said, but can you tell me how I'm oversimplifying concisely in a way
> > that's not likely to make my brain explode? :-) No is an acceptable
> > answer.
> Oh -- you know I didn't think carefully about what you said. I just
> thought "macros, you can't do that!". But, one could probably get the
> effect of what you suggest by trying to compile the (implicit) module
> and, if it fails, just compile a module that only contains the
> teachpacks, without the user's program, and then make that available
> to the user.
> Robby

Posted on the users mailing list.