google / ghc-source-gen

Library for generating Haskell source files and code fragments.
BSD 3-Clause "New" or "Revised" License
89 stars 29 forks source link

Support for generating haddock comments #91

Open micahhahn opened 2 years ago

micahhahn commented 2 years ago

Has there been any thought on adding support for module / declaration / parameter haddock comments? I'm trying to use this library to generate code that I would like to have nice haddock documentation on.

I tried my hand at implementing comments for modules at it seems as simple as filling out hsmodHaddockModHeader on HsModule, but as of 8.10 the Outputable instance on HsDocString wraps the output in double quotes which results in invalid Haskell.