"Mark P Jones" <[EMAIL PROTECTED]>:
> The basic mechanisms date from a long time ago when the only way to
> add primitives was to link them in when you built the interpreter.
> So the kind of problem you ran into would have generated an error at
> link time.
Only if the corresponding C functions had the same name.
> With the move to dynamic linking, there should have been
> some extra code to simulate the effect of static linking (i.e., the
> duplicate check that you describe), or, better, to provide a
> separate primitive table for every module.
They do have separate tables but they are organised as a single linked
list.
The most obvious fix would be to add a module field to entries in the
linked list. The only trick required is to avoid requiring a
simultaneous change to GreenCard - probably not too hard.
If you do need to change GreenCard at the same time, the line
needPrims_hugs 2
should be changed to
needPrims_hugs 3
to catch version mismatches. Obviously, this requires a change in the
code that checks the version too - provoke the error and grep for the
error message to find the version check.
Alastair