Hi, Neil Jerram <[EMAIL PROTECTED]> writes:
> It seems to me, though, that this is all a matter of ordering, not of > whether the duplicates processing gets invoked. I don't know all the > details of the duplicate processing, but by default I would expect a > later use-modules (or similar operation) to override an earlier one. > Is that what happens? Roughly, yes. However, the semantics of `module-use!' are very different from those of `use-modules' (unlike what one might think ;-)). While `use-modules' honors the duplicate binding policies, including `replace' as Kevin noted, `module-use!' does no such thing: it blindly overrides bindings. A more important concern is that the order of `module-use!' invocations matters, which leads to all these strange side effects. `module-use!' is a low-level primitive that really should not be used by the "normal user" IMO. Instead, one should rather use `module-use-interfaces!' which has the same semantics as `use-modules'. Getting back to the problem at hand: Since we want to emulate the behavior of `use-modules', the safest way would be to use `module-use-interfaces!', although we can certainly find (fragile?) workarounds. Thanks, Ludovic. _______________________________________________ Guile-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/guile-devel
