I’ve done the first step now! I made a patch that turns the representation of HsDoc in GHC into a FastString rather than a parsed entity, and deleted the parsing code and made it compile. (HaddockModInfo will need to be FastString-ized also.)
(By the way, this means parsing the interiors of the comments. GHC will still be the one to recognize “– |”, “– ^” and so forth, for this phase of the project, and to attach them to the parsed declarations.)
Next comes the presumably harder part: add support in Haddock! (at least the final-product will need to be full of #ifdefs, in order to keep supporting GHC < 6.11, also.)
Leave a comment