Skip to content

Commit 7cb4ab7

Browse files
authored
Bump haddock-library to 1.10.0 (#1598)
* Bump haddock-library to 1.10.0 * stack
1 parent aad6401 commit 7cb4ab7

11 files changed

+18
-6
lines changed

ghcide/ghcide.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ library
5555
fingertree,
5656
ghc-exactprint,
5757
Glob,
58-
haddock-library >= 1.8 && < 1.10,
58+
haddock-library ^>= 1.10.0,
5959
hashable,
6060
hie-compat ^>= 0.1.0.0,
6161
hls-plugin-api ^>= 1.0.0.0,

ghcide/src/Development/IDE/Spans/Common.hs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,15 @@ haddockToMarkdown (H.DocIdentifier i)
121121
= "`" ++ i ++ "`"
122122
haddockToMarkdown (H.DocIdentifierUnchecked i)
123123
= "`" ++ i ++ "`"
124-
haddockToMarkdown (H.DocModule i)
124+
haddockToMarkdown (H.DocModule (H.ModLink i Nothing))
125125
= "`" ++ escapeBackticks i ++ "`"
126+
-- See https://github.com/haskell/haddock/pull/1315
127+
-- Module references can be labeled in markdown style, e.g. [some label]("Some.Module")
128+
-- However, we don't want to use the link markup here, since the module name would be covered
129+
-- up by the label. Thus, we keep both the label and module name in the following style:
130+
-- some label ( `Some.Module` )
131+
haddockToMarkdown (H.DocModule (H.ModLink i (Just label)))
132+
= haddockToMarkdown label ++ " ( `" ++ escapeBackticks i ++ "` )"
126133
haddockToMarkdown (H.DocWarning w)
127134
= haddockToMarkdown w
128135
haddockToMarkdown (H.DocEmphasis d)

stack-8.10.2.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ extra-deps:
3333
- lsp-1.1.1.0
3434
- lsp-types-1.1.0.0
3535
- lsp-test-0.13.0.0
36+
- haddock-library-1.10.0
3637
- heapsize-0.3.0
3738
- hie-bios-0.7.4
3839
- implicit-hie-cradle-0.3.0.2

stack-8.10.3.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ extra-deps:
2828
- fourmolu-0.3.0.0
2929
- ghc-lib-8.10.4.20210206
3030
- ghc-lib-parser-8.10.4.20210206
31+
- haddock-library-1.10.0
3132
- heapsize-0.3.0
3233
- hie-bios-0.7.4
3334
- implicit-hie-cradle-0.3.0.2

stack-8.10.4.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ extra-deps:
2626
- data-tree-print-0.1.0.2@rev:2
2727
- floskell-0.10.4
2828
- fourmolu-0.3.0.0
29+
- haddock-library-1.10.0
2930
- heapsize-0.3.0
3031
- hie-bios-0.7.4
3132
- implicit-hie-cradle-0.3.0.2

stack-8.6.4.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extra-deps:
4343
- ghc-source-gen-0.4.0.0
4444
- ghc-trace-events-0.1.2.1
4545
- haddock-api-2.22.0@rev:1
46-
- haddock-library-1.8.0
46+
- haddock-library-1.10.0
4747
- hashable-1.3.0.0
4848
- heapsize-0.3.0
4949
- hie-bios-0.7.4

stack-8.6.5.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ extra-deps:
4242
- ghc-source-gen-0.4.0.0
4343
- ghc-trace-events-0.1.2.1
4444
- haddock-api-2.22.0@rev:1
45-
- haddock-library-1.8.0
45+
- haddock-library-1.10.0
4646
- hashable-1.3.0.0
4747
- heapsize-0.3.0
4848
- hie-bios-0.7.4

stack-8.8.2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ extra-deps:
3636
- ghc-lib-parser-8.10.4.20210206
3737
- ghc-lib-parser-ex-8.10.0.17
3838
- ghc-trace-events-0.1.2.1
39-
- haddock-library-1.8.0
39+
- haddock-library-1.10.0
4040
- haskell-src-exts-1.21.1
4141
- heapsize-0.3.0
4242
- hie-bios-0.7.4

stack-8.8.3.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ extra-deps:
3434
- ghc-lib-parser-8.10.4.20210206
3535
- ghc-trace-events-0.1.2.1
3636
- haskell-src-exts-1.21.1
37+
- haddock-library-1.10.0
3738
- heapsize-0.3.0
3839
- hie-bios-0.7.4
3940
- hlint-3.2.3

stack-8.8.4.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ extra-deps:
3434
- ghc-lib-parser-8.10.4.20210206
3535
- ghc-trace-events-0.1.2.1
3636
- haskell-src-exts-1.21.1
37+
- haddock-library-1.10.0
3738
- heapsize-0.3.0
3839
- hie-bios-0.7.4
3940
- hlint-3.2.3

stack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ extra-deps:
4444
- ghc-source-gen-0.4.0.0
4545
- ghc-trace-events-0.1.2.1
4646
- haddock-api-2.22.0@rev:1
47-
- haddock-library-1.8.0
47+
- haddock-library-1.10.0
4848
- hashable-1.3.0.0
4949
- heapsize-0.3.0
5050
- hie-bios-0.7.4

0 commit comments

Comments
 (0)