on iko/ghcjs-patch-master help sign in
Add documentation on howto Hoogle (#203)
commitb0a7f89256148440206de632cee32ed81f2b1ae4 authorStefan Matting <smatting@users.noreply.github.com> dateSun 14 Jul 2019, 07:06 (7 years ago) parenta444477
1 file changed+19
docs/user-guide/development.md+19
docs/user-guide/development.md+19
@@ -71,6 +71,25 @@ in
7171 }
7272```
7373
74+## How to get a local Hoogle index
75+
76+If you need a local Hoogle for all the dependencies of your project create this file
77+
78+```nix
79+# shell-hoogle.nix
80+let
81+ hsPkgs = import ./default.nix {};
82+in
83+ hsPkgs.shellFor {
84+ packages = ps: [ps.my-package];
85+ withHoogle = true;
86+ }
87+```
88+
89+and run `nix-shell shell-hoogle.nix --run "hoogle server --local"`.
90+This will open a local Hoogle server at `http://127.0.0.1:8080`.
91+
92+
7493## How to get an ad-hoc development shell including certain packages
7594
7695This creates a development environment with the given packages