diff options
author | toonn <toonn@toonn.io> | 2017-12-31 01:44:23 +0100 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2018-05-22 13:12:43 +0200 |
commit | c17061efd46e71e417cc2d1ffe22a4be48c48370 (patch) | |
tree | a0f6be6670817b3320aa7974b2fc3bad92e4bb32 /doc | |
parent | ae1e304a60a702b983fa1890e1ebcbfef96b1f61 (diff) | |
download | nixpkgs-c17061efd46e71e417cc2d1ffe22a4be48c48370.tar nixpkgs-c17061efd46e71e417cc2d1ffe22a4be48c48370.tar.gz nixpkgs-c17061efd46e71e417cc2d1ffe22a4be48c48370.tar.bz2 nixpkgs-c17061efd46e71e417cc2d1ffe22a4be48c48370.tar.lz nixpkgs-c17061efd46e71e417cc2d1ffe22a4be48c48370.tar.xz nixpkgs-c17061efd46e71e417cc2d1ffe22a4be48c48370.tar.zst nixpkgs-c17061efd46e71e417cc2d1ffe22a4be48c48370.zip |
haskell docs: add explanation of what the --local flag does and the service
Diffstat (limited to 'doc')
-rw-r--r-- | doc/languages-frameworks/haskell.section.md | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/doc/languages-frameworks/haskell.section.md b/doc/languages-frameworks/haskell.section.md index e5b725b1d5e..59951d46a79 100644 --- a/doc/languages-frameworks/haskell.section.md +++ b/doc/languages-frameworks/haskell.section.md @@ -334,16 +334,30 @@ 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/). Note, however, that Firefox and -possibly other browsers disallow navigation from `http:` to `file:` URIs for -security reasons, which might be quite an inconvenience. Since version 5 hoogle -server has a `--local` flag that solves the problem. For older versions see +[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 [Stack](http://haskellstack.org) is a popular build tool for Haskell projects. |