tmcgilchrist / cabal-hoogle

An experimental wrapper around Hoogle and cabal to generate project specific indexes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cabal-hoogle

An experimental wrapper around Hoogle and Cabal to generate project specific indexes.

Inspired by cabal-extras and intended to fix this old Cabal Issue - Automatic hoogle database for installed packages.

While we are here we should fix, Document --hoogle more thoroughly in the users guide

Usage

## Build
cabal build all

## Build hoogle for local packages (cabal-hoogle runs this command if it finds no local hoogle files)
## OR cabal build LIBRARY --haddock-hoogle
cabal v2-haddock --haddock-hoogle all

## Run and build index
cabal exec -- cabal-hoogle hoogle "fmap"

## Or cabal install and run the executable
cabal install cabal-hoogle

## Search for 'fmap' type
cabal-hoogle hoogle "fmap"

All tools are highly experimental, although I (Tim McGilchrist) use them regularily.

TODO

  • Port tests to use Hedgehog
  • Setup cli tests
  • Setup default cli command to hoogle search
  • Link sources from cabal.project
  • Incremental / watch based rebuilding of the index file
  • Find how to get local hoogle .txt files without using find

Resources

About

An experimental wrapper around Hoogle and cabal to generate project specific indexes

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 99.3%Language:Shell 0.7%