#5467: Template Haskell: support for Haddock comments
---------------------------------+------------------------------------------
    Reporter:  reinerp           |       Owner:                  
        Type:  feature request   |      Status:  new             
    Priority:  normal            |   Milestone:  7.6.2           
   Component:  Template Haskell  |     Version:  7.2.1           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:                    |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by TimBaumann):

 I've got a [https://github.com/timjb/google-apis project] that would
 benefit from this feature. Google's
 [https://developers.google.com/discovery/ API discovery service] publishes
 machine-readable documentation for many Google APIs. I'm using this
 documentation to generate Haskell code for using these APIs. Google's JSON
 based documentation also contains human-readable descriptions of the data-
 structures and API calls. I want to include these descriptions as Haddock
 comments in the generated code.

 My [https://github.com/timjb/aeson-
 
schema/blob/b2099625e1cf1ea90c52bc78933cebd430f399d9/src/Data/Aeson/Schema/CodeGenM.hs
 current approach] is to have a representation of declarations based on
 Template Haskell that also includes an optional textual representation
 (with comments). I can then use the generated code as a TH splice or I can
 generate a Haskell source file (by using the pretty-printer in
 Language.Haskell.TH.Ppr) when I want to have Haddock comments. This
 approach is pretty hacky and the generated code could easily break when a
 new version of a core library is released.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5467#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to