<div dir="ltr"><div><div>I have a feeling the work-in-progress Haskell Refactorer using the GHC API may be able to provide this information through its library interface.<br><br></div>When I have some time over the weekend I will have a look.<br>

<br></div>Alan<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 21, 2013 at 8:44 AM, Michael Sloan <span dir="ltr">&lt;<a href="mailto:mgsloan@gmail.com" target="_blank">mgsloan@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Roman: Awesome!  I&#39;m really glad that this is ready for use! <br><br>Andrew: I have a tool that&#39;s a step towards doing this.  Instead of using haskell suite, it uses ghci via hint to query module exports, and then uses TH to reify them.  This has the benefit of supporting everything that GHC supports, whereas there are currently some cases that haskell-src-exts can&#39;t parse.  There&#39;s also the issue of supporting declarations generated by template haskell.<br>



<br>Here&#39;s an example of diffing some of its output:<br><br><a href="https://github.com/mgsloan/api-compat/blob/master/examples/template-haskell.api.diff" target="_blank">https://github.com/mgsloan/api-compat/blob/master/examples/template-haskell.api.diff</a><br>



<br>The main reason I haven&#39;t released the tool is that I was intending to do structural diffs / handle renaming, so it&#39;s somewhat unfinished.  However I believe it&#39;s reasonably usable: instead, the output is just structured in a way that&#39;s reasonably amenable to diffing.<br>



<br>-Michael</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Thu, Jun 20, 2013 at 11:12 PM, Andrew Cowie <span dir="ltr">&lt;<a href="mailto:andrew@operationaldynamics.com" target="_blank">andrew@operationaldynamics.com</a>&gt;</span> wrote:<br>



</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div>On Thu, 2013-06-20 at 18:13 +0300, Roman Cheplyaka wrote:<br>
&gt; Namely, it can do the following:<br>
&gt;<br>
&gt; *   for a module, compute its interface, i.e. the set of entities<br>
&gt;     exported by the module, together with their original names.<br>
&gt;<br>
&gt; *   for each name in the module, figure out what it refers to — whether<br>
&gt;     it&#39;s bound locally (say, by a where clause) or globally (and then<br>
&gt;     give its origin).<br>
<br>
</div>Is this a step toward being able to automatically derive an API version<br>
number [in the SO version sense of the word; ie, has a change happened<br>
requiring a version bump?]<br>
<br>
AfC<br>
Sydney<br>
<br>
<br></div></div>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>