[plt-scheme] DrScheme buglet?

From: Todd O'Bryan (toddobryan at mac.com)
Date: Wed Aug 29 11:30:20 EDT 2007

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.

Here's what's happening:

1. Contract, Header, Purpose

;; foo: blah -> blah
;; ...
(define (foo blah)

2. Test Cases

(check-expect (foo 'x)
   ---now I want to go play in the interactions window to get an answer

3. I type something in the Interactions window. It says "The Definitions
Window has changed. Please hit the Run button." I do. Now I can't use
the teachpack functions to try to construct the answer for my test case.

Thanks,
Todd

P.S. I wouldn't complain about such nits if the whole program wasn't so
darn beautiful to begin with. :-)

On Wed, 2007-08-29 at 08:52 -0500, Robby Findler wrote:
> This only happens when there are syntax errors, right? Not runtime errors?
> 
> I think that's just a property of the way teachpacks work in the
> current world. I'm not sure it is possible to get around that.
> 
> Roughly, what's happening underneath the hood, is that the teachpack
> is (an invisible) part of your program and, when your program is
> syntactically malformed, no part of your program is available in the
> REPL. For example, in this program:
> 
>   (define x 1)
>   unbound-id
> 
> You won't be able to use "x" in the REPL. But, in this one, you will:
> 
>   (define x 1)
>   (first empty)
> 
> I know that's not real help, but I hope it is at least explanatory.
> 
> And maybe this will inspire someone (Matthew?) to think of a way to do
> better, I'm not sure.
> 
> Robby
> 
> On 8/29/07, Todd O'Bryan <toddobryan at mac.com> wrote:
> > In v371 of DrScheme, it appears that teachpacks don't "stick."
> >
> > When you first open a DrScheme window, even though it says that a
> > teachpack is loaded, it's unavailable until you hit Run.
> >
> > That's not a big problem, but the teachpacks disappear if there's an
> > error during a Run. In other words, if students are developing a
> > function, hit run, and have an error, if they drop down to the
> > interactions window to experiment, the functions provided by the
> > teachpack are no longer available.
> >
> > The workaround is to comment out offending code in the definitions
> > window, but this is kind of a pain.
> >
> > Todd
> >
> > _________________________________________________
> >   For list-related administrative tasks:
> >   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> >



Posted on the users mailing list.