[plt-scheme] auto check syntax

From: Eli Barzilay (eli at barzilay.org)
Date: Sat May 16 15:47:22 EDT 2009

On May 16, Neil Van Dyke wrote:
> Eli Barzilay wrote at 05/16/2009 02:50 PM:
> > On May 16, Neil Van Dyke wrote:
> >   
> >> Actually, I suspect there is enough information before the variable
> >> rename occurs that invalidating the existing Check Syntax
> >> information is not necessary -- just update the name and update the
> >> positional information for every piece of syntax after the first
> >> occurrence.
> >
> > But (bad) macros can change their behavior based on the names.
> Drat, I forgot about bad macros.  I suppose one could detect the
> (unusual?) case of bad macro use and fall back to the slow way of
> doing things.

Well, Scheme makes these problems obviously undecidable...

  (define-syntax (foo stx)
    (if (something-undecidable)

The best might be some flag that you set saying "I'm willing to let
drscheme assume that all macros behave well".  Perhaps another
approach is to mark one rename, then another, then execute them all in
one shot.

But these still require a lot of work, and the only benefit is for the
(relatively minor) case of doing multiple renames.

> Or, perhaps full Syntax Check can be sped up, and there's no point
> in special case updates after source changes like renames.

The main thing that syntax check is doing is expanding the code.  It
shouldn't be too expensive.  (The first one is, since it loads the
scribble indexes.)

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

Posted on the users mailing list.