Skip to content

Commit 16c87ef

Browse files
committed
Document stack hoogle command
1 parent 87c9c4a commit 16c87ef

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

doc/hoogle_command.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,27 @@ stack hoogle [-- ARGUMENT(S) (e.g. 'stack hoogle -- server --local')]
77
[--[no-]setup] [--rebuild] [--server]
88
~~~
99

10-
Hoogle is a Haskell API search engine. `stack hoogle` runs Hoogle.
10+
Hoogle is a Haskell API search engine. `stack hoogle` runs Hoogle. Stack needs
11+
Hoogle version 5 or greater.
12+
13+
Stack will use a Hoogle database (`database.hoo`) specific to the project's
14+
source map and the version of GHC, located in a subdirectory of subdirectory
15+
`hoogle` of Stack's work directory for the project.
16+
17+
By default:
18+
19+
* if a `hoogle` executable is found on the `PATH`, Stack will try to use it.
20+
Otherwise, Stack will try to identify an executable as a build target. If
21+
the Hoogle database does not exist, Stack will generate it with
22+
`hoogle generate --local`. `hoogle generate --local` queries `ghc-pkg` and
23+
generates links for all packages which have documentation and Hoogle input
24+
files (`*.txt`) generated. Pass the flag `--no-setup` to skip such setup;
25+
26+
* the existing Hoogle database is used. Pass the flag `--rebuild` to trigger
27+
the generation of a new Hoogle database (generated as above); and
28+
29+
* `hoogle` is passed the specified arguments (if any). The arguments are
30+
usually the subject of the search. Pass the flag `--server` to first pass
31+
`server --local --port 8080` before those arguments.
32+
`hoogle server --local --port 8080` starts a local Hoogle web server, using
33+
port 8080, that allows the following of `file://` links.

0 commit comments

Comments
 (0)