<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't involve GHC (or only marginally so), I'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"><<a href="mailto:fuuzetsu@fuuzetsu.co.uk" target="_blank">fuuzetsu@fuuzetsu.co.uk</a>></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>
> Hi Mateusz,<br>
><br>
> haskell-src-exts is not haddock-aware I'm afraid, so I don't have any real<br>
> solution for you. The one you mention, i.e. going through the whole parse<br>
> result and stiching things together manually seems like the best bet if you<br>
> 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's trivial to check whether the<br>
comment starts with a ‘|’ or ‘^’ and it'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'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'm to use<br>
haskell-src-exts.<br>
<div class="im">><br>
> In the longer run, it would be nice to have haddock support in<br>
> haskell-src-exts, so ideas regarding what kind of interface you would like<br>
> to see are most welcome. :-)<br>
</div>For my use, I do not care about anything but Haddock comments. I don't<br>
care where or why they appear, what they are attached to &c. With my<br>
current method, I just throw all this information away (it's given by<br>
GHC).<br>
<br>
For general use, I imagine that it'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'm not sure how haskell-src-exts is<br>
implemented but I don't think it'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'm trying to solve with help of haskell-src-exts.<br>
<br>
><br>
> Cheers, Niklas<br>
><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>