google / google/haskell-indexer

Haddock comments support

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
missing-xref
Dominant language
Haskell
Stars
103
Forks
19
PR merge metrics
No merged PRs in 30d

Description

The GHC backend needs to fetch the Haddock comments, and put them into the common Translate layer (maybe a bit transformed?), associating them to the correct entity. Then the Kythe frontend should format and emit these.

The Haddocks can be fetched using the Haddock API (has to be opened up, see https://github.com/haskell/haddock/issues/595) based on the GHC AST we already have access to.

Note: a special arg needs to be passed to GHC to have the Doc nodes present in the AST. This is likely [Opt_Haddock](https://downloads.haskell.org/~ghc/7.10.3/docs/html/libraries/ghc-7.10.3/GHC.html), can be passed in GhcApiSupport somehow. See [this GHC test](https://github.com/ghc/ghc/blob/ba597c1dd1daf9643b72dc7aeace8d6b3fce84eb/testsuite/tests/ghc-api/annotations/comments.hs#L31) for inspiration.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.