Many imports of the form 'import foo ()' are unused
Summary
There are two use cases for imports of the form import foo ()
:
- You're importing the module purely for instances of typeclasses
- You intentionally want to create a dependency on the imported module so it's built first by the build system
Unfortunately -Wunused-imports
can't detect when these imports are no longer needed, meaning many fly under the radar as they become redundant over time. Removing them would get rid of unnecessary dependencies, potentially leading to greater parallelism in the build system.
This issue an offshoot of #17054 where this and other forms of unused imports are discussed.