From ae1e304a60a702b983fa1890e1ebcbfef96b1f61 Mon Sep 17 00:00:00 2001 From: toonn Date: Sat, 30 Dec 2017 23:23:07 +0100 Subject: haskell docs: add info about hoogle's --local flag to section 9.5.2.3 Relevant section: 9.5.2.3. How to install a compiler with libraries, hoogle and documentation indexes Since version 5 `hoogle server`s --local flag solves the problem with links from `http:` to `file:` URIs: hoogle server --local -p 8080 --- doc/languages-frameworks/haskell.section.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc/languages-frameworks') diff --git a/doc/languages-frameworks/haskell.section.md b/doc/languages-frameworks/haskell.section.md index 3b8971c295bb..e5b725b1d5e2 100644 --- a/doc/languages-frameworks/haskell.section.md +++ b/doc/languages-frameworks/haskell.section.md @@ -337,7 +337,12 @@ Finally, you can run hoogle server -p 8080 --local ``` and navigate to http://localhost:8080/ for your own local -[Hoogle](https://www.haskell.org/hoogle/). +[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 +[this page](http://kb.mozillazine.org/Links_to_local_pages_do_not_work) for +workarounds. ### How to build a Haskell project using Stack -- cgit 1.4.1 From c17061efd46e71e417cc2d1ffe22a4be48c48370 Mon Sep 17 00:00:00 2001 From: toonn Date: Sun, 31 Dec 2017 01:44:23 +0100 Subject: haskell docs: add explanation of what the --local flag does and the service --- doc/languages-frameworks/haskell.section.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'doc/languages-frameworks') diff --git a/doc/languages-frameworks/haskell.section.md b/doc/languages-frameworks/haskell.section.md index e5b725b1d5e2..59951d46a79a 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. -- cgit 1.4.1 From 6caf7c9d85ca23dd87dd25730137e3cae02949e8 Mon Sep 17 00:00:00 2001 From: toonn Date: Sun, 31 Dec 2017 02:12:16 +0100 Subject: Flipped URI slashes --- doc/languages-frameworks/haskell.section.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/languages-frameworks') diff --git a/doc/languages-frameworks/haskell.section.md b/doc/languages-frameworks/haskell.section.md index 59951d46a79a..74cb0da15700 100644 --- a/doc/languages-frameworks/haskell.section.md +++ b/doc/languages-frameworks/haskell.section.md @@ -339,7 +339,7 @@ hoogle server --local -p 8080 and navigate to http://localhost:8080/ for your own local [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 +`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 -- cgit 1.4.1