Skip to content

WIP: Fix #13839: GHCi warnings do not respect the default module header

Roland Senn requested to merge RolandSenn/ghc:T13839 into master

While checking for unused top bindings, exported names count as 'used'. If we have a module without a module header, then GHC adds a default module header and exports only the main function.

In GHCi, if no module header is available, we have to export all top bindings. However, to report the same unused bindings as with GHC, we just export the main function, but only if it's defined in the module.

Hence, we need to two different sets of used names: One (tcg_dus) containing all the really used/exported names, and a second one (tcg-dus_chk) with names to be used while checking for unused bindings.

Edited by Matthew Pickering

Merge request reports