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 https://github.com/JPMoresmau/BuildWrapper/blob/master/src/Language/Haskell/BuildWrapper/Src.hs. The unit tests provide some samples: https://github.com/JPMoresmau/BuildWrapper/blob/master/test/Language/Haskell/BuildWrapper/CMDTests.hs#L572-L638. Maybe this can help you.
JP On Tue, Aug 20, 2013 at 11:21 AM, Mateusz Kowalczyk <fuuze...@fuuzetsu.co.uk > wrote: > On 20/08/13 09:48, Niklas Hambüchen wrote: > > Nice! > > > > I hope that haskell-suite will eventually become awesome and solve most > > of our automation-on-Haskell-code needs. > > > > Two questions: > > > > 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? > > > +1 for this. There was a small discussion relevant to this on café > recently, if anyone is interested: > http://comments.gmane.org/gmane.comp.lang.haskell.cafe/106768 > > > 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? > > > > Thanks! > > > > > -- > Mateusz K. > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > > -- JP Moresmau http://jpmoresmau.blogspot.com/
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe