<br><br><div class="gmail_quote">On Mon, Nov 17, 2008 at 4:36 PM, Ivan Lazar Miljenovic <span dir="ltr"><<a href="mailto:Ivan.Miljenovic@gmail.com">Ivan.Miljenovic@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Jason Dagit <dagit <at> <a href="http://codersbase.com" target="_blank">codersbase.com</a>> writes:<br>
<br>
><br>
> Hello,<br>
><br>
> Has anyone already made a tool to check if exported functions, data<br>
> constructors, types, etc are unused within a set of modules?<br>
<br>
</div>My SourceGraph programme (available on Hackage) can do this with a few<br>
caveats:<br>
1) Only supports functions, not data constructors, types, etc.<br>
2) The project must be Cabalized<br>
3) The functions exported must not be available from the library (though if it's<br>
an executable, then it will return all non-called functions that aren't called<br>
"main").</blockquote><div><br>Those restrictions should fit my case very well. I have a .cabal file, I'm mainly interested in functions, and it's just an executable not a library.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<div class="Ih2E3d"><br>
><br>
> For my usage it would probably suffice if the tool only compared<br>
> import lists against export lists<br>
<br>
</div>This is basically what SourceGraph does.<br>
<br>
Note that it hasn't been upgraded to GHC-6.10 yet, nor the HSE-4 series.</blockquote><div><br>I don't think that will be a problem. I still haven't upgraded to 6.10 due to it uninstalling 6.8 (has anyone fixed this on osx yet?). And we don't use view patterns so HSE-4 is hopefully not needed.<br>
<br>Thanks,<br>Jason<br></div></div><br>