summary refs log tree commit diff
path: root/doc/languages-frameworks
diff options
context:
space:
mode:
authorSarah Brofeldt <sbrofeldt@gmail.com>2018-06-12 23:42:54 +0200
committerGitHub <noreply@github.com>2018-06-12 23:42:54 +0200
commitf4df5d63f1931c972f935ff1bee9b60baf44047b (patch)
tree2e92f22e87508a88feb6dd74b7c7553c6ebcdd42 /doc/languages-frameworks
parent96d6ef3442e90196b57d208b4d44c92c9ba3e845 (diff)
parent6caf7c9d85ca23dd87dd25730137e3cae02949e8 (diff)
downloadnixlib-f4df5d63f1931c972f935ff1bee9b60baf44047b.tar
nixlib-f4df5d63f1931c972f935ff1bee9b60baf44047b.tar.gz
nixlib-f4df5d63f1931c972f935ff1bee9b60baf44047b.tar.bz2
nixlib-f4df5d63f1931c972f935ff1bee9b60baf44047b.tar.lz
nixlib-f4df5d63f1931c972f935ff1bee9b60baf44047b.tar.xz
nixlib-f4df5d63f1931c972f935ff1bee9b60baf44047b.tar.zst
nixlib-f4df5d63f1931c972f935ff1bee9b60baf44047b.zip
Merge pull request #33217 from toonn/master
haskell docs: add info about hoogle's --local flag to section 9.5.2.3
Diffstat (limited to 'doc/languages-frameworks')
-rw-r--r--doc/languages-frameworks/haskell.section.md23
1 files changed, 21 insertions, 2 deletions
diff --git a/doc/languages-frameworks/haskell.section.md b/doc/languages-frameworks/haskell.section.md
index 3b8971c295bb..74cb0da15700 100644
--- a/doc/languages-frameworks/haskell.section.md
+++ b/doc/languages-frameworks/haskell.section.md
@@ -334,10 +334,29 @@ navigate there.
 
 Finally, you can run
 ```shell
-hoogle server -p 8080 --local
+hoogle server --local -p 8080
 ```
 and navigate to http://localhost:8080/ for your own local
-[Hoogle](https://www.haskell.org/hoogle/).
+[Hoogle](https://www.haskell.org/hoogle/). The `--local` flag makes the hoogle
+server serve files from your nix store over http, without the flag it will use
+`file://` URIs. Note, however, that Firefox and possibly other browsers
+disallow navigation from `http://` to `file://` URIs for security reasons,
+which might be quite an inconvenience. Versions before v5 did not have this
+flag. See
+[this page](http://kb.mozillazine.org/Links_to_local_pages_do_not_work) for
+workarounds.
+
+For NixOS users there's a service which runs this exact command for you.
+Specify the `packages` you want documentation for and the `haskellPackages` set
+you want them to come from. Add the following to `configuration.nix`.
+
+```nix
+services.hoogle = {
+enable = true;
+packages = (hpkgs: with hpkgs; [text cryptonite]);
+haskellPackages = pkgs.haskellPackages;
+};
+```
 
 ### How to build a Haskell project using Stack