On 21 February 2013 08:56, Felipe Almeida Lessa <felipe.le...@gmail.com> wrote: > Hey! > > GHC warns me about unused definitions in a module. However, is it > possible to warn me about unused definitions in a package? > > For example, suppose that module A exports function f and that module > B uses A.f (everything on a single package). However, after some time > B stops using A.f. Is there a way of receiving a warning saying that > "A exports f but no other module uses it."? > > (I know that this warning wouldn't be useful for libraries, since > their whole point is to export things.)
My (getting-long-in-the-tooth-and-could-do-with-a-rewrite) SourceGraph package does identify these definitions. As for GHC warning about it, I wonder if maybe that's a better role for Cabal as it knows which modules are public vs private (and even libraries can have exported definitions that aren't used from non-exported modules). > > Cheers! > > -- > Felipe. > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com http://IvanMiljenovic.wordpress.com _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe