[plt-scheme] abstracting over (PLaneT) requires

From: Rob Hunter (rob.hunter at gmail.com)
Date: Mon Dec 1 14:54:03 EST 2008

Alright, cool.  Thanks, all.

--rob


On Mon, Dec 1, 2008 at 10:53 AM, Dave Gurnell <d.j.gurnell at gmail.com> wrote:
> You can re-provide required elements with all-from-out.
>
> I tend to do this in a module called base.ss that is used by all other
> modules in the code:
>
>    -- base.ss --
>
>    #lang scheme
>    (require (planet foo/bar:1))
>    (provide (all-from-out (planet foo/bar:1)))
>
>    -- other.ss --
>
>    #lang scheme
>    (require "base.ss")
>
> The module acts as the abstraction.
>
> -- Dave
>
>> Is there any way to abstract over requires?  In particular, I'm
>> interested in abstracting over the version of a PLaneT package that I
>> require.  Something like
>>
>>  (require (planet "some-file.ss" ("joe" "a-package.plt" MAJOR (= MINOR))))
>>
>> where MAJOR and MINOR could be bound in exactly one spot.  Thus, I
>> could easily do a system-wide change of which version of a-package.plt
>> I am including.
>>
>> Thanks!
>>
>> Rob
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>


Posted on the users mailing list.