Unused import warning on re-export

Yitzchak Gale gale at sefer.org
Wed May 10 12:56:21 UTC 2017


I have a module A with no export list, and a function f which from the
API point of view should part of the export list of A. But f must be
defined in module B, not module A, due an import cycle. I added this
line in module A to re-export f from A:

import B as A (f)

This resulted in an unused import warning. That is a problem for us -
we keep our large code base clean of warnings as a policy.

Is there a reason GHC considers this case an unused import? It seems
that the use of the import is explicitly stated right within the
import itself. Should I submit a ticket for this?

Thanks,
Yitz


More information about the Glasgow-haskell-users mailing list