ndmitchell / ndmitchell/hoogle

Locally index a package.txt hoogle file after generating

Open
#329 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Haskell
Stars
803
Forks
152
PR merge metrics
No merged PRs in 30d

Description

Hey there! My question is whether it's possible to either:

  • generate hoogle via packages in ghc-pkg and some other package not in there
  • on a running local hoogle, index an additional package that's not in it.

My situation is that we would like a local hoogle with project dependencies docs but also the project's docs themselves. We use nix for dependencies, so that once in the shell, docs are available via ghc-pkg for all the dependencies, but not the project itself. I can fairly easily generate the docs for the project itself via cabal new-haddock --haddock--hoogle, but I'm not sure how to get that file into the hoogle database once it's made. If http://hackage.haskell.org/api is also the API for a local hoogle db it seem likes some variation of curl -XPOST localhost:8080/packages -H 'Accept: text/plain' -F package=@/path/to/file should work but nothing I've tried makes it accept it (usually it returns "File not found"). Is there a way to do something like this?

Contributor guide

No contributing guide indexed for this repository

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 by reproducing the local setup with ghc-pkg, cabal new-haddock --haddock--hoogle, and the attempted POST to localhost:8080/packages. Trace how a local Hoogle database is built and how that endpoint handles package files; done means a generated project package.txt can be indexed alongside dependency documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.