[m-dev.] new option for library modules

Zoltan Somogyi zoltan.somogyi at runbox.com
Mon Dec 20 18:57:08 AEDT 2021


We could help prevent issues such as the one that caused the
most recent problem reported on m-users if we added an option,
called maybe --this-is-mercury-stdlib-module, that behaved like this:

- If it is off, the default, then it would generate a warning if the
  name of the module compiled with is on the list of the names of
  Mercury standard library modules.

- If it is off, which it would be in our library directory, it would generate
  a warning if the name of the module compiled with it is *not*
  on that list.

The second part would ensure that the list is not missing any entries.

The list could have two halves, the publicly documented modules
vs the rest, so that the warning in the first case could be a bit more
expansive in the second case.

One minor issue is that this would make adding a new module
to the library a two-step process: either add the name to the list,
then add the module, or add the module while disabling this option
for it, then later undo the disabling.

Opinions?

Zoltan.


More information about the developers mailing list