Unused modules incorrectly flagged on re-exports
Open
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
If you add `build-depends` on a library that only contains re-exports, the `-Wunused-packages` warning triggers.
**To Reproduce**
1. Define a module in an internal library component
2. Re-export the module in the library component.
3. Add the library component to a `build-depends` of an executable component.
4. Use the module from an executable component.
5. Enable `-Wunused-packages` and `-Werror` on the executable component.
6. Build the project.
The build fails.
**Expected behavior**
The build should succeed.
**System information**
`cabal-3.4.0.0`, `ghc-8.10.4`
**Additional context**
N/A
Contributor guide
Assessment
This issue has not been assessed yet.