[plt-scheme] Re: problems with #%datum (was: Re: [plt-bug] all/9476: Debugger broken on mzscheme + kw)

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Sep 9 14:19:14 EDT 2008

At Tue, 9 Sep 2008 10:28:55 -0700, John Clements wrote:
> 
> On Jun 11, 2008, at 5:07 AM, Matthew Flatt wrote:
> 
> > At Tue, 10 Jun 2008 22:20:15 -0700, John Clements wrote:
> >>
> >> On Jun 10, 2008, at 10:00 PM, eli at barzilay.org wrote:
> >>
> >>> A new problem report is waiting at
> >>>  http://bugs.plt-scheme.org/query/?cmd=view&pr=9476
> >>>
> >>> Reported by Eli Barzilay for release: 3.99.0.9
> >>>
> >>> *** Description:
> >>> Trying to debug the program below throws an error:
> >>>
> >>>  require: namespace mismatch; reference (phase 0) to a
> >>>  module "/home/scheme/plt/collects/scheme/private/kw.ss" that is
> >>>  not available (phase level 0) in: #%app
> >>
> >> FWIW, this is also the error encountered by the stepper tests in all
> >> of the test cases that involve running the stepper on non-teaching
> >> languages.
> >
> > The problem happens when a tool adds code to the a program, and when
> > the added code uses `#%app' from `scheme/base'.
> >
> > The solution is to explicitly use `#%plain-app' for the added code.
> >
> > I'll fix the debugger...
> 
> I fussed with the language fields of the modules used by the stepper's  
> test code, & now I have a related problem that happens on expansion of  
> annotater-decorated code.
> 
> require: namespace mismatch; reference (phase 0) to a module "/Users/ 
> clements/plt/collects/scheme/private/old-ds.ss" that is not available  
> (phase level 0) in: #%datum
> 
> I took a look at old-ds.ss and ... I'm still confused.  It's quite  
> short, and appears to be a compatability definition of an old define- 
> struct.

Yes: "old-ds.ss" supplies `#%datum' for `mzscheme'.

> It appears to me that the next step is to isolate the piece of the  
> annotator that inserts the offending #%datum, and hope that something  
> comes to mind; perhaps I'm inadvertently capturing and inserting a  
> binding for #%datum that depends on old-ds.ss.

Keep in mind that you don't have to use `#%datum' explicitly to arrive
at this error. If a bit of syntax is intended as a (self-quoting)
literal, and if its bindings are from `mzscheme' instead of
`scheme/base', then it effectively carries the `mzscheme' binding of
`#%datum' with it.


Matthew



Posted on the users mailing list.