From 0b73a81512c21f100b39cdb2f4e3fa81f0b4267d Mon Sep 17 00:00:00 2001 From: George Thomas Date: Mon, 20 Jul 2020 00:09:08 +0100 Subject: [PATCH 1/2] Mention docs on hover feature in README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index bcaa7b8531..2e79894b20 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,8 @@ This is *very* early stage software. ![Eval](https://i.imgur.com/bh992sT.gif) + - Type information and documentation on hover. Note that currently, in order for docs to be displayed for dependencies, they must have been built with GHC's `-haddock` flag. This can be achieved in a number of ways, such as `cabal configure --ghc-options=-haddock`. + - Many more (TBD) ## Installation From f8aa985a78965bd6500f582e5e7e025d0f3ded87 Mon Sep 17 00:00:00 2001 From: George Thomas Date: Mon, 20 Jul 2020 18:32:44 +0100 Subject: [PATCH 2/2] Add more info on passing -haddock flag --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e79894b20..e2c0c87a19 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,23 @@ This is *very* early stage software. ![Eval](https://i.imgur.com/bh992sT.gif) - - Type information and documentation on hover. Note that currently, in order for docs to be displayed for dependencies, they must have been built with GHC's `-haddock` flag. This can be achieved in a number of ways, such as `cabal configure --ghc-options=-haddock`. +- Type information and documentation on hover. Note that currently, in order for docs to be displayed for dependencies, they must have been built with GHC's `-haddock` flag: + + - For cabal: + - Add to your global config file (e.g. `~/.cabal/config`): + ``` + program-default-options + ghc-options: -haddock + ``` + - Or, for a single project, run `cabal configure --ghc-options=-haddock` + + - For stack, add to global `$STACK_ROOT\config.yaml`, or project's `stack.yaml`: + ``` + ghc-options: + "$everything": -haddock + ``` + + This will cause compilation errors if a dependency contains invalid Haddock markup, though in a future version of GHC (hopefully 8.12), [these will be demoted to warnings](https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2377). - Many more (TBD)