From 217f01fcec49c35acf73c90f5ade0e5273ace055 Mon Sep 17 00:00:00 2001 From: Potato Hatsue <1793913507@qq.com> Date: Sat, 20 Mar 2021 00:35:49 +0800 Subject: [PATCH 1/2] Bump haddock-library to 1.10.0 --- ghcide/ghcide.cabal | 2 +- ghcide/src/Development/IDE/Spans/Common.hs | 9 ++++++++- stack-8.6.4.yaml | 2 +- stack-8.6.5.yaml | 2 +- stack-8.8.2.yaml | 2 +- stack.yaml | 2 +- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ghcide/ghcide.cabal b/ghcide/ghcide.cabal index 50e8296126..499ba86acb 100644 --- a/ghcide/ghcide.cabal +++ b/ghcide/ghcide.cabal @@ -55,7 +55,7 @@ library fingertree, ghc-exactprint, Glob, - haddock-library >= 1.8 && < 1.10, + haddock-library ^>= 1.10.0, hashable, hie-compat ^>= 0.1.0.0, hls-plugin-api ^>= 1.0.0.0, diff --git a/ghcide/src/Development/IDE/Spans/Common.hs b/ghcide/src/Development/IDE/Spans/Common.hs index d03e81c978..8e6c06680a 100644 --- a/ghcide/src/Development/IDE/Spans/Common.hs +++ b/ghcide/src/Development/IDE/Spans/Common.hs @@ -121,8 +121,15 @@ haddockToMarkdown (H.DocIdentifier i) = "`" ++ i ++ "`" haddockToMarkdown (H.DocIdentifierUnchecked i) = "`" ++ i ++ "`" -haddockToMarkdown (H.DocModule i) +haddockToMarkdown (H.DocModule (H.ModLink i Nothing)) = "`" ++ escapeBackticks i ++ "`" +-- See https://github.com/haskell/haddock/pull/1315 +-- Module references can be labeled in markdown style, e.g. [some label]("Some.Module") +-- However, we don't want to use the link markup here, since the module name would be covered +-- up by the label. Thus, we keep both the label and module name in the following style: +-- some label ( `Some.Module` ) +haddockToMarkdown (H.DocModule (H.ModLink i (Just label))) + = haddockToMarkdown label ++ " ( `" ++ escapeBackticks i ++ "` )" haddockToMarkdown (H.DocWarning w) = haddockToMarkdown w haddockToMarkdown (H.DocEmphasis d) diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index ef603eec52..d28f0c71a9 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -43,7 +43,7 @@ extra-deps: - ghc-source-gen-0.4.0.0 - ghc-trace-events-0.1.2.1 - haddock-api-2.22.0@rev:1 - - haddock-library-1.8.0 + - haddock-library-1.10.0 - hashable-1.3.0.0 - heapsize-0.3.0 - hie-bios-0.7.4 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 7f92e42109..e2dca91958 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -42,7 +42,7 @@ extra-deps: - ghc-source-gen-0.4.0.0 - ghc-trace-events-0.1.2.1 - haddock-api-2.22.0@rev:1 - - haddock-library-1.8.0 + - haddock-library-1.10.0 - hashable-1.3.0.0 - heapsize-0.3.0 - hie-bios-0.7.4 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index decbb7bdd0..d18e4345ff 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -36,7 +36,7 @@ extra-deps: - ghc-lib-parser-8.10.4.20210206 - ghc-lib-parser-ex-8.10.0.17 - ghc-trace-events-0.1.2.1 - - haddock-library-1.8.0 + - haddock-library-1.10.0 - haskell-src-exts-1.21.1 - heapsize-0.3.0 - hie-bios-0.7.4 diff --git a/stack.yaml b/stack.yaml index 16e5bb20b3..f1283b0007 100644 --- a/stack.yaml +++ b/stack.yaml @@ -44,7 +44,7 @@ extra-deps: - ghc-source-gen-0.4.0.0 - ghc-trace-events-0.1.2.1 - haddock-api-2.22.0@rev:1 - - haddock-library-1.8.0 + - haddock-library-1.10.0 - hashable-1.3.0.0 - heapsize-0.3.0 - hie-bios-0.7.4 From 05081a5492b7e50bdde84982c3954baf3cf17f45 Mon Sep 17 00:00:00 2001 From: Potato Hatsue <1793913507@qq.com> Date: Sat, 20 Mar 2021 11:11:59 +0800 Subject: [PATCH 2/2] stack --- stack-8.10.2.yaml | 1 + stack-8.10.3.yaml | 1 + stack-8.10.4.yaml | 1 + stack-8.8.3.yaml | 1 + stack-8.8.4.yaml | 1 + 5 files changed, 5 insertions(+) diff --git a/stack-8.10.2.yaml b/stack-8.10.2.yaml index 83db7ffdd5..1eb0d70ccd 100644 --- a/stack-8.10.2.yaml +++ b/stack-8.10.2.yaml @@ -33,6 +33,7 @@ extra-deps: - lsp-1.1.1.0 - lsp-types-1.1.0.0 - lsp-test-0.13.0.0 + - haddock-library-1.10.0 - heapsize-0.3.0 - hie-bios-0.7.4 - implicit-hie-cradle-0.3.0.2 diff --git a/stack-8.10.3.yaml b/stack-8.10.3.yaml index d835a7c732..9e4840bc42 100644 --- a/stack-8.10.3.yaml +++ b/stack-8.10.3.yaml @@ -28,6 +28,7 @@ extra-deps: - fourmolu-0.3.0.0 - ghc-lib-8.10.4.20210206 - ghc-lib-parser-8.10.4.20210206 + - haddock-library-1.10.0 - heapsize-0.3.0 - hie-bios-0.7.4 - implicit-hie-cradle-0.3.0.2 diff --git a/stack-8.10.4.yaml b/stack-8.10.4.yaml index 0eef66637b..bcea493d2e 100644 --- a/stack-8.10.4.yaml +++ b/stack-8.10.4.yaml @@ -26,6 +26,7 @@ extra-deps: - data-tree-print-0.1.0.2@rev:2 - floskell-0.10.4 - fourmolu-0.3.0.0 + - haddock-library-1.10.0 - heapsize-0.3.0 - hie-bios-0.7.4 - implicit-hie-cradle-0.3.0.2 diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index a54820e57a..711287301a 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -34,6 +34,7 @@ extra-deps: - ghc-lib-parser-8.10.4.20210206 - ghc-trace-events-0.1.2.1 - haskell-src-exts-1.21.1 + - haddock-library-1.10.0 - heapsize-0.3.0 - hie-bios-0.7.4 - hlint-3.2.3 diff --git a/stack-8.8.4.yaml b/stack-8.8.4.yaml index 9e782875b9..e337242872 100644 --- a/stack-8.8.4.yaml +++ b/stack-8.8.4.yaml @@ -34,6 +34,7 @@ extra-deps: - ghc-lib-parser-8.10.4.20210206 - ghc-trace-events-0.1.2.1 - haskell-src-exts-1.21.1 + - haddock-library-1.10.0 - heapsize-0.3.0 - hie-bios-0.7.4 - hlint-3.2.3