packunused is a simple CLI tool that lets you know which of the packages listed as build-depends in the Cabal package description file are redundant.
You must create 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 not to be used.
frasertweedale
source share