[plt-scheme] List libraries - name collisions

From: Chongkai Zhu (czhu at cs.utah.edu)
Date: Sat Mar 29 23:44:01 EDT 2008

Mark Engelberg wrote:
> According to the manual for v372,
>
> I should be able to use both of the following lines:
> (require (lib "list.ss"))
> (require (lib "list.ss" "srfi" "1"))
>
> because the names in the srfi version are supposed to be renamed to
> avoid collisions.
> But I'm getting an error, indicating that "third" and possibly other
> functions are defined in both modules.
>
> Is there something I'm doing wrong, or is this a bug?
>
> Thanks,
>
> Mark
>   
Yes, you are correct in that "the names in the srfi version are supposed 
to be renamed to avoid collisions", but only collisions between the it 
and mzscheme, not collisions between it and (lib "list.ss").

There's two general solution:

1 using _prefix_;
2 require _only_ part of a lib, or require a lib _except_ part of it 
that will cause collision.

Chongkai


Posted on the users mailing list.