Re: [racket-dev] my bf language no longer works; how to fix?

2012-04-19 Thread Matthew Flatt
At Wed, 18 Apr 2012 15:40:09 -0400, Danny Yoo wrote:
> On Wed, Apr 18, 2012 at 3:09 PM, Danny Yoo  wrote:
> > This no longer appears to work in 5.3:
> >
> >    #lang planet dyoo/bf
> >    ,[.,]
> >
> > I'm not sure how to fix this.  Help?  I see the following error message:
> 
> 
> Ok, bug traced.  It looks like module-declared? is being used like
> this in the context of parsing a program in the bf PLaneT language:
> 
> (module-declared? '(submod (planet dyoo/bf) reader) #t)
> 
> At this point, the standard module name resolver raises an error on
> behalf of the module-declared? function.

I've pushed a fix.

> From reading the documentation on module-declared?, I thought that it
> wasn't supposed to raise exceptions when given non-existant modules.
> But module-declared? raises an error when given other junk module
> names.  Is it supposed to do so? 
> For example:
> 
> 
> > (module-declared? 'blah #f)
> (module-declared? 'blah #f)
> standard-module-name-resolver: collection not found: "blah" in any of:
> (#
> #)
> 

It's only supposed to refrain from complaining for submodule paths
where the root module doesn't exist. It will still complain for bad
collection names, bad planet packages, or non-submodule paths; I'll
make a note to clarify in the docs.


_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] my bf language no longer works; how to fix?

2012-04-18 Thread Danny Yoo
On Wed, Apr 18, 2012 at 3:09 PM, Danny Yoo  wrote:
> This no longer appears to work in 5.3:
>
>    #lang planet dyoo/bf
>    ,[.,]
>
> I'm not sure how to fix this.  Help?  I see the following error message:


Ok, bug traced.  It looks like module-declared? is being used like
this in the context of parsing a program in the bf PLaneT language:

(module-declared? '(submod (planet dyoo/bf) reader) #t)

At this point, the standard module name resolver raises an error on
behalf of the module-declared? function.

From reading the documentation on module-declared?, I thought that it
wasn't supposed to raise exceptions when given non-existant modules.
But module-declared? raises an error when given other junk module
names.  Is it supposed to do so?  For example:


> (module-declared? 'blah #f)
(module-declared? 'blah #f)
standard-module-name-resolver: collection not found: "blah" in any of:
(#
#)

 === context ===
standard-module-name-resolver
/home/dyoo/local/racket/collects/racket/private/misc.rkt:87:7


_
  Racket Developers list:
  http://lists.racket-lang.org/dev