[Haskell-cafe] Re: Find unused exports

Ivan Lazar Miljenovic Ivan.Miljenovic at gmail.com
Mon Nov 17 19:36:34 EST 2008


Jason Dagit <dagit <at> codersbase.com> writes:

> 
> Hello,
> 
> Has anyone already made a tool to check if exported functions, data
> constructors, types, etc are unused within a set of modules?

My SourceGraph programme (available on Hackage) can do this with a few 
caveats:
1) Only supports functions, not data constructors, types, etc.
2) The project must  be Cabalized
3) The functions exported must not be available from the library (though if it's
an executable, then it will return all non-called functions that aren't called 
"main").

> 
> For my usage it would probably suffice if the tool only compared
> import lists against export lists

This is basically what SourceGraph does.

Note that it hasn't been upgraded to GHC-6.10 yet, nor the HSE-4 series.









More information about the Haskell-Cafe mailing list