> Mark P Jones [mailto:[EMAIL PROTECTED]] writes: 
> 
> Hi Sigbjorn,
> 
> | "primitive" decls don't appear to honour the module system
> | at all - first primitive name that matches in the linked list of
> | prim-tables is used.
> | ...
> | Having Hugs at least check for duplicates in registerPrims()
> | would be preferable, as is, users of HDirect and GreenCard run
> | the risk of accidentally&mysteriously losing here. (I'm surprised
> | it hasn't come up before...or is this a known potential problem?)
> 
> I'm not aware of it coming up before, but your complaint seems
> justified to me.  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.  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.  I'm anxious about making either of these changes
> now for fear that they might break something important in the
> upcoming Hugs 98 release, but it's definitely something that
> should be addressed in the version after that.
> 

OK, it's not problematic to workaround this -- the 'primitive'
names that HDirect now emits include the module names as well.

I'll make a similar change to GreenCard.

--sigbjorn

Reply via email to