<div dir="ltr">BuildWrapper has some code that tries to link back the comments to the declaration from the AST generated by haskell-src-exts and the comments. See <a href="https://github.com/JPMoresmau/BuildWrapper/blob/master/src/Language/Haskell/BuildWrapper/Src.hs">https://github.com/JPMoresmau/BuildWrapper/blob/master/src/Language/Haskell/BuildWrapper/Src.hs</a>. The unit tests provide some samples: <a href="https://github.com/JPMoresmau/BuildWrapper/blob/master/test/Language/Haskell/BuildWrapper/CMDTests.hs#L572-L638">https://github.com/JPMoresmau/BuildWrapper/blob/master/test/Language/Haskell/BuildWrapper/CMDTests.hs#L572-L638</a>. Maybe this can help you.<div>
<br></div><div>JP</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 20, 2013 at 11:21 AM, Mateusz Kowalczyk <span dir="ltr">&lt;<a href="mailto:fuuzetsu@fuuzetsu.co.uk" target="_blank">fuuzetsu@fuuzetsu.co.uk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 20/08/13 09:48, Niklas Hambüchen wrote:<br>
&gt; Nice!<br>
&gt;<br>
&gt; I hope that haskell-suite will eventually become awesome and solve most<br>
&gt; of our automation-on-Haskell-code needs.<br>
&gt;<br>
&gt; Two questions:<br>
&gt;<br>
&gt; 1) My most desired feature would be a syntax tree that does not pluck<br>
&gt; pluck comments out and make me treat them separately. It looks much<br>
&gt; easier to me to have a fully descriptive tree and (filter . concatMap) /<br>
&gt; traverse them out in some way than getting a list of comments and having<br>
&gt; to insert them back in the right places myself.<br>
&gt; Is that possible?<br>
&gt;<br>
</div>+1 for this. There was a small discussion relevant to this on café<br>
recently, if anyone is interested:<br>
<a href="http://comments.gmane.org/gmane.comp.lang.haskell.cafe/106768" target="_blank">http://comments.gmane.org/gmane.comp.lang.haskell.cafe/106768</a><br>
<div class="HOEnZb"><div class="h5"><br>
&gt; 2) Have you considered downloading the all-of-Hackage tarball and<br>
&gt; running haskell-src-exts over it to get a benchmark of how much HSE can<br>
&gt; already parse of the Haskell code out there?<br>
&gt;<br>
&gt; Thanks!<br>
&gt;<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Mateusz K.<br>
</font></span><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><br clear="all"><div><br></div>-- <br>JP Moresmau<br><a href="http://jpmoresmau.blogspot.com/">http://jpmoresmau.blogspot.com/</a>
</div>