ndmitchell / weeder

Detect dead exports or package imports
BSD 3-Clause "New" or "Revised" License
124 stars 8 forks source link

Warnings about orphan imports #7

Closed bergmark closed 7 years ago

bergmark commented 7 years ago

Can be seen on this aeson branch https://github.com/bos/aeson/tree/weeder-instances

Weeder warns on these test suite modules:

Excessive other-modules entry
* DataFamilies.Instances
* Functions
* Instances

But Instances is definitely used, the import is import Instances ().

How about not warning on these imports, or do you think it's better to manually ignore them?

Edit: Functions actually exports identifiers but is only used by Instances so that makes things slightly more inconvenient ;-)

ndmitchell commented 7 years ago

I tweaked the code so that modules imported, but where nothing named from the import is used, still don't get marked as pointless. With that, all 3 modules drop off the list.

ndmitchell commented 7 years ago

Are you happy to continue experimenting with HEAD? If that's in any way inconvenient, I'll make a release. Otherwise I'll probably wait for you to stumble into a few addition issues before I make the release.

bergmark commented 7 years ago

I'll play with HEAD!