tweag / tweag/rules_haskell

Support hoogle for prebuilt and local packages

Open
#377 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

P3 type: feature request
Dominant language
Starlark
Stars
279
Forks
93
Avg merge
13d 11h
Merged PRs (30d)
3

Description

Atm, there is no explicit support for hoogle in rules_haskell, and no obvious way to generate a hoogle database for a given set of packages:

  • Since haskell_doc runs haddock with the --hoogle flag, we can generate a hoogle db for local packages using something like hoogle generate $(ls bazel-bin/docs/ | sed 's/^/--local=bazel-bin\/docs\//') (assuming we have a haskell_doc rule named docs).

  • We can also generate a db for the prebuilt dependencies using hoogle generate --local with the right ghc in scope.

The problem is that there is (afaik) no way to merge these databases nor an easy way to combine these two calls, so no way to create an haddock database containing all the available packages.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the haskell_doc rule and the example docs target described in the issue, then inspect how rules_haskell handles prebuilt dependencies and Hoogle generation. Define a workflow that combines Hoogle data from local and prebuilt packages; done means one generated database contains both sets of available packages.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.