[plt-scheme] (provide ...) question

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Tue May 18 09:43:52 EDT 2010

In what way doesn't this do "it"?


On May 18, 2010, at 8:44 AM, Todd O'Bryan wrote:

> I have a struct that I'd like to provide from a module, but I'd like
> to provide a different constructor to modules that require it. Here's
> a simple example:
>
> (define-struct city-line (city state zip zip+4))
>
> (define better-make-city-line
>  (case-lambda
>    [(city state zip zip+4)
>     (make-city-line city state zip zip+4)]
>    [(city state zip)
>     (make-city-line city state zip "")]))
>
> I tried this:
>
> (provide (except-out (struct-out city-line)
>                     make-city-line)
>         (rename-out [better-make-city-line make-city-line]))
>
> but that doesn't seem to do it.
>
> Is there a way to do such a thing? Am I close?
>
> Thanks,
> Todd
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme



Posted on the users mailing list.