[m-rev.] for review: make --warn-unused-imports the default

Julien Fischer jfischer at opturion.com
Thu Jan 19 10:00:05 AEDT 2017


Hi Zoltan,

On Thu, 19 Jan 2017, Zoltan Somogyi wrote:

> The diff is trivial; I am asking for opinions on the design decision.

Fine by me.

> In some rare cases, an import is needed only in some circumstances
> (such as grades),

"rare" is a relative thing; it's common enough in code that has to work
with multiple backends and that uses a significant amount of foreign
code.

> and the compiler generates a unused import warning
> for it in other circumstances. If this happens, we can always work around
> the problem by adding --no-warn-unused-imports to the module's
> entry in Mercury.options while (if possible) teaching the compiler
> not to generate spurious warnings in such circumstances.

Fixing this is a separate (and known) issue.

Julien.


More information about the reviews mailing list