[plt-scheme] basic syntax problem

From: Tim Hanson (tbhanson at gmx.de)
Date: Tue May 6 10:41:53 EDT 2008

thanks, Matthew,

> > at the top of your file and then use s->u instead of string->url
> everywhere.
> 
> I don't think that works. The bug is related to the top-level
> environment; any reference to `string->url' in the top-level
> environment, including on the right-hand side of a definition, will
> fail the second time around.
> 
> The only workaround I know is to put the reference to `string->url' in
> a module. That is, you can put your whole program in a module --- which
> is recommended, for lots of reasons --- or use
> 
>   (module workaround mzscheme
>     (require (lib "url.ss" "net"))
>     (define s->u string->url)
>     (provide (rename s->u string->url)))
>   (require workaround)

great, i will try that and would like to learn about modules. is this a good place to read up on them:
  http://www.htus.org/Book/Staging/how-to-use-modules/
?

cheers, Tim

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger


Posted on the users mailing list.