If I crank up the warnings with GHC, it will warn me which imports aren't being used....
Is there a similar command to tell me which build-depends
aren't being used in my <project>.cabal
file?
packunused
is a simple CLI tool allows to find out which of the packages listed as build-depends in a Cabal package description file are redundant.
You have to build your project with -ddump-minimal-imports
then run packunused
:
cabal build --ghc-option=-ddump-minimal-imports
packunused
It will print a list of package dependencies that seem to be unused.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With