[plt-scheme] more assorted v4 problems

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Nov 19 16:28:43 EST 2007

At Mon, 19 Nov 2007 16:18:43 -0500, "Sam TH" wrote:
> This program (with Matthew's latest changes):
> 
> (module m scheme/base
>   (require (for-syntax (only-in scheme/base make-empty-namespace))
>            (for-syntax scheme/base))
>   (begin-for-syntax
>     (let ([new-ns
>            (let ([ns (make-empty-namespace)])
>              (namespace-attach-module (current-namespace)
>                                       'scheme/base
>                                       ns)
>              ns)])
>       (parameterize ([current-namespace new-ns])
>         (expand #'3)))))
> 
> produces the error:
> 
> require: broken compiled code (phase 0, defn-phase 0): cannot find
> module "/home/samth/sw/plt4/collects/scheme/private/old-ds.ss" in:
> #%datum

Can you tell me more how you ran the above? I don't get that error in
MzScheme.

I would expect that error if the example started

 (module m mzscheme
     (require-for-syntax (only scheme/base make-empty-namespace))
     (begin-for-syntax
      ...))

In that case, the `3' has the `#%datum' of `mzscheme' attached to it,
and `mzscheme' doesn't exist in the newly created namespace. Under
those circumstances, the prefix on the error message needs to change,
but I'm not sure how to improve the essence.

> The following error message is very bad:
> 
> (module m scheme/base
>   (require-for-template (lib "list.ss"))
> 
> lib: illegal use of syntax in: (lib "list.ss")

I guess is should say something about being used only in `require' or
`provide'? Or maybe "usually" used in `require' and `provide', since
other forms might treat the `scheme/base' binding of `lib' in a
literal?

> The documentation for the require/provide forms omits the -in/-out suffixes.

Can you be more specific? The places I checked seem right.

Thanks,
Matthew



Posted on the users mailing list.