[GHC] #15838: Warn about unused dependencies

GHC ghc-devs at haskell.org
Tue Oct 30 15:04:57 UTC 2018


#15838: Warn about unused dependencies
-------------------------------------+-------------------------------------
           Reporter:  Yuras          |             Owner:  (none)
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.6.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 GHC loads packages lazily, so at the end of compilation (at least in
 `--make` mode) it knows all the dependencies, required to compile the
 code. See `eps_PIT` in `ExternalPackageState`. If we compare this list
 with the list of packages, passed on command like via `--package-id`, then
 we'll get a list of unused dependencies.

 I propose to add a flag `-Wunused-packages`, off by default, which will
 report the unused packages if any.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15838>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list