Closed seagreen closed 4 years ago
The current unused declaration detection for apps is insufficient, because:
In order for code to be usable by both tests and an executable, it needs to be in a lib
component
Since any declarations you want to test need to be exported, they'll then slip by -Wunused-top-binds
It's not as precise as haskell-specific tool could be, but there's a general purpose tool (written in Haskell) for this: https://github.com/joshuaclayton/unused
Note that repos can contain multiple packages, each of which can contain multiple components (test suites, etc)