<div dir="ltr">Hi Niklas,<br><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">1) My most desired feature would be a syntax tree that does not pluck<br>
pluck comments out and make me treat them separately. It looks much<br>
easier to me to have a fully descriptive tree and (filter . concatMap) /<br>
traverse them out in some way than getting a list of comments and having<br>
to insert them back in the right places myself.<br>
Is that possible?<br></blockquote><div><br></div><div>Sadly not - it's theoretically impossible. The fact that you can put comments literally wherever, means that it's impossible to treat them as nodes of the AST. E.g.<br>
<br></div><div> f {- WHERE -} x = -- WOULD<br></div><div> -- THESE<br></div><div> do -- COMMENTS<br></div><div> a {- END -} <- g x -- UP<br></div><div> return {- ? -} a<br></div><div><br></div>
<div>What would be theoretically possible is to define a restricted language that allows comments only in certain well-defined places (cf haddock), and ignores any others. That's a lot of work though, and it's not clear how big the gain is. :-\<br>
<br></div><div>A different solution could be to improve the support, through better helper functions, for handling a syntax tree and a list of comments together. That's something I think could be worthwhile.<br>
</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2) Have you considered downloading the all-of-Hackage tarball and<br>
running haskell-src-exts over it to get a benchmark of how much HSE can<br>
already parse of the Haskell code out there?<br></blockquote><div><br></div><div>Considered, yes. Done, no. Would love to see the results :-). The crew at OdHac (Roman, Erik, Simon) ensured that the current version handles all of 'base', which is a good start.<br>
<br></div><div>Cheers, Niklas<br></div></div></div></div>