<div dir="ltr"><div><div>Hi again,<br><br></div>Hmm. I see the difficulty here, and eventually I would want to have support for this, but alas, not yet. If you come up with any solution that doesn&#39;t involve GHC (or only marginally so), I&#39;d love to hear it.<br>
<br></div>Cheers, Niklas<br> </div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 14, 2013 at 8:57 PM, 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 14/08/13 19:02, Niklas Broberg wrote:<br>
&gt; Hi Mateusz,<br>
&gt;<br>
&gt; haskell-src-exts is not haddock-aware I&#39;m afraid, so I don&#39;t have any real<br>
&gt; solution for you. The one you mention, i.e. going through the whole parse<br>
&gt; result and stiching things together manually seems like the best bet if you<br>
&gt; want to use haskell-src-exts throughout.<br>
</div>The main problem with this approach is that we get comments (and their<br>
SrcLoc) as a separate list. While it&#39;s trivial to check whether the<br>
comment starts with a ‘|’ or ‘^’ and it&#39;s not even hard to find any lines<br>
immediately following it, Haddock comments can appear in weird<br>
positions and trail until a line of code is encountered. Right now,<br>
it&#39;s rather hard to tell<br>
<br>
  -- | Foo<br>
<br>
  -- bar<br>
and<br>
<br>
  -- | Foo<br>
  someCode = undefined<br>
  -- bar<br>
<br>
apart. I think this is the only option at the moment if I&#39;m to use<br>
haskell-src-exts.<br>
<div class="im">&gt;<br>
&gt; In the longer run, it would be nice to have haddock support in<br>
&gt; haskell-src-exts, so ideas regarding what kind of interface you would like<br>
&gt; to see are most welcome. :-)<br>
</div>For my use, I do not care about anything but Haddock comments. I don&#39;t<br>
care where or why they appear, what they are attached to &amp;c. With my<br>
current method, I just throw all this information away (it&#39;s given by<br>
GHC).<br>
<br>
For general use, I imagine that it&#39;d be useful for the program to<br>
combine multi-line Haddock comments into a single one and attach it to<br>
whatever it is documenting. I&#39;m not sure how haskell-src-exts is<br>
implemented but I don&#39;t think it&#39;s plausible to do this without going<br>
out to GHC and asking it for the information. Incidentally, this is<br>
precisely the problem I&#39;m trying to solve with help of haskell-src-exts.<br>
<br>
&gt;<br>
&gt; Cheers, Niklas<br>
&gt;<br>
Thanks!<br>
<br>
--<br>
Mateusz K.<br>
<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>