Hi Niklas, 1) My most desired feature would be a syntax tree that does not pluck > pluck comments out and make me treat them separately. It looks much > easier to me to have a fully descriptive tree and (filter . concatMap) / > traverse them out in some way than getting a list of comments and having > to insert them back in the right places myself. > Is that possible? >
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. f {- WHERE -} x = -- WOULD -- THESE do -- COMMENTS a {- END -} <- g x -- UP return {- ? -} a 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. :-\ 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. > 2) Have you considered downloading the all-of-Hackage tarball and > running haskell-src-exts over it to get a benchmark of how much HSE can > already parse of the Haskell code out there? > 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. Cheers, Niklas
_______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell