[plt-scheme] Conflicts in require statements

From: Dave Gurnell (d.j.gurnell at gmail.com)
Date: Fri Feb 16 10:20:26 EST 2007

Dear All,

I quite often get collisions in the names of procedures required from  
two or more modules:

     (module module1 mzscheme
        (define a 1)
        (define b 2)
        (provide a b))

     (module module2 mzscheme
        (define a 10)
        (define c 20)
        (provide a c))

     (module module3 mzscheme
        (require module1 module2)
        (printf "~a~n" a))

Trying to compile this lot gives the error message:

     module: identifier already imported (from a different source) in: a

Rather frustratingly, this message doesn't say *where* the colliding  
names come from. It's obvious in this example, but in modules with  
lots of requirements I sometimes end up commenting lines out one by  
one until changes in the error message reveal the source of the problem.

Am I missing an easy way of finding these collisions when it isn't  


-- Dave

Posted on the users mailing list.