<br><br><div class="gmail_quote">On Mon, Nov 17, 2008 at 4:36 PM, Ivan Lazar Miljenovic <span dir="ltr">&lt;<a href="mailto:Ivan.Miljenovic@gmail.com">Ivan.Miljenovic@gmail.com</a>&gt;</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 &lt;dagit &lt;at&gt; <a href="http://codersbase.com" target="_blank">codersbase.com</a>&gt; writes:<br>
<br>
&gt;<br>
&gt; Hello,<br>
&gt;<br>
&gt; Has anyone already made a tool to check if exported functions, data<br>
&gt; 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 &nbsp;be Cabalized<br>
3) The functions exported must not be available from the library (though if it&#39;s<br>
an executable, then it will return all non-called functions that aren&#39;t called<br>
&quot;main&quot;).</blockquote><div><br>Those restrictions should fit my case very well.&nbsp; I have a .cabal file, I&#39;m mainly interested in functions, and it&#39;s just an executable not a library.<br>&nbsp;</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>
&gt;<br>
&gt; For my usage it would probably suffice if the tool only compared<br>
&gt; import lists against export lists<br>
<br>
</div>This is basically what SourceGraph does.<br>
<br>
Note that it hasn&#39;t been upgraded to GHC-6.10 yet, nor the HSE-4 series.</blockquote><div><br>I don&#39;t think that will be a problem.&nbsp; I still haven&#39;t upgraded to 6.10 due to it uninstalling 6.8 (has anyone fixed this on osx yet?).&nbsp; And we don&#39;t use view patterns so HSE-4 is hopefully not needed.<br>
<br>Thanks,<br>Jason<br></div></div><br>