
On Fri, May 02, 2008 at 09:13:52AM +0100, Simon Peyton-Jones wrote:
Aha. So now it's unclear what the desired behaviour is. Do we want a warning for import statements that can be deleted altogether? If not, I can easily remove it! Or is it just the wording of the warning that is bad?
I would like what the warning says, rather than what it does. Something like: For each use of a variable foo, mark imports import M (..., foo, ...) as "used" if any exist; otherwise mark any imports import M which export foo as "used". Then warn about any imports not marked as "used" (except imports of the form import M () of course).
| Warning: Module `A' is imported, but nothing from it is used, | except perhaps instances visible in `A' | To suppress this warning, use: import A()
Thanks Ian