Skip to content

Commit 12c0e44

Browse files
authored
Merge pull request #214 from jneira/ghc-haddock
Use -haddock in cabal and stack for all dependencies. This way hls gets comments on hover for its dependencies.
2 parents cbdf0a4 + caf6845 commit 12c0e44

10 files changed

+42
-19
lines changed

Diff for: cabal.project

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ packages:
33
ghcide
44

55
tests: true
6-
documentation: true
6+
7+
package *
8+
ghc-options: -haddock
79

810
package haskell-language-server
911
test-show-details: direct

Diff for: stack-8.10.1.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ packages:
44
- .
55
- ./ghcide/
66

7+
ghc-options:
8+
"$everything": -haddock
9+
710
extra-deps:
811
- Cabal-3.0.2.0
912
- hie-bios-0.6.1

Diff for: stack-8.6.4.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ packages:
44
- .
55
- ./ghcide/
66

7+
ghc-options:
8+
"$everything": -haddock
9+
710
extra-deps:
811
- aeson-1.4.3.0
912
- brittany-0.12.1.1

Diff for: stack-8.6.5.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ packages:
44
- .
55
- ./ghcide/
66

7+
ghc-options:
8+
"$everything": -haddock
9+
710
extra-deps:
811
- ansi-terminal-0.10.2
912
- base-compat-0.11.0

Diff for: stack-8.8.2.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ packages:
44
- .
55
- ./ghcide/
66

7+
ghc-options:
8+
"$everything": -haddock
9+
710
extra-deps:
811
- apply-refact-0.7.0.0
912
- brittany-0.12.1.1

Diff for: stack-8.8.3.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ packages:
44
- .
55
- ./ghcide/
66

7+
ghc-options:
8+
"$everything": -haddock
9+
710
extra-deps:
811
- apply-refact-0.7.0.0
912
- bytestring-trie-0.2.5.0

Diff for: stack-8.8.4.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ packages:
55
- .
66
- ./ghcide/
77

8+
ghc-options:
9+
"$everything": -haddock
10+
811
extra-deps:
912
- apply-refact-0.7.0.0
1013
- bytestring-trie-0.2.5.0

Diff for: stack.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ packages:
44
- .
55
- ./ghcide/
66

7+
ghc-options:
8+
"$everything": -haddock
9+
710
extra-deps:
811
- ansi-terminal-0.10.2
912
- base-compat-0.11.0

Diff for: test/functional/Deferred.hs

+1-2
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ multiMainTests :: TestTree
159159
multiMainTests = testGroup "multiple main modules" [
160160
ignoreTestBecause "Broken: Unexpected ConduitParser.empty" $
161161
testCase "Can load one file at a time, when more than one Main module exists"
162-
-- $ runSession hieCommand fullCaps "test/testdata" $ do
163162
$ runSession hieCommand fullCaps "test/testdata" $ do
164163
_doc <- openDoc "ApplyRefact2.hs" "haskell"
165164
_diagsRspHlint <- skipManyTill anyNotification message :: Session PublishDiagnosticsNotification
@@ -175,4 +174,4 @@ multiMainTests = testGroup "multiple main modules" [
175174
let (List diags2) = diagsRsp2 ^. params . diagnostics
176175

177176
liftIO $ show diags2 `shouldBe` "[]"
178-
]
177+
]

Diff for: test/functional/TypeDefinition.hs

+17-16
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,22 @@ tests = testGroup "type definitions" [
7575
(Range (toPos (18, 1)) (toPos (18, 26)))
7676
]
7777

78-
-- TODO Implement
79-
-- , ignoreTestBecause "Broken" $ testCase "find type-definition of type def in component"
80-
-- $ pendingWith "Finding symbols cross module is currently not supported"
81-
-- $ runSession hieCommand fullCaps "test/testdata/gototest"
82-
-- $ do
83-
-- doc <- openDoc "src/Lib2.hs" "haskell"
84-
-- otherDoc <- openDoc "src/Lib.hs" "haskell"
85-
-- closeDoc otherDoc
86-
-- defs <- getTypeDefinitions doc (toPos (13, 20))
87-
-- liftIO $ do
88-
-- fp <- canonicalizePath "test/testdata/gototest/src/Lib.hs"
89-
-- defs
90-
-- `shouldBe` [ Location (filePathToUri fp)
91-
-- (Range (toPos (8, 1)) (toPos (8, 29)))
92-
-- ]
78+
{-- TODO Implement
79+
, ignoreTestBecause "Broken" $ testCase "find type-definition of type def in component"
80+
$ pendingWith "Finding symbols cross module is currently not supported"
81+
$ runSession hieCommand fullCaps "test/testdata/gototest"
82+
$ do
83+
doc <- openDoc "src/Lib2.hs" "haskell"
84+
otherDoc <- openDoc "src/Lib.hs" "haskell"
85+
closeDoc otherDoc
86+
defs <- getTypeDefinitions doc (toPos (13, 20))
87+
liftIO $ do
88+
fp <- canonicalizePath "test/testdata/gototest/src/Lib.hs"
89+
defs
90+
`shouldBe` [ Location (filePathToUri fp)
91+
(Range (toPos (8, 1)) (toPos (8, 29)))
92+
]
93+
--}
9394
, ignoreTestBecause "Broken" $ testCase "find definition of parameterized data type"
9495
$ runSession hieCommand fullCaps "test/testdata/gototest"
9596
$ do
@@ -105,4 +106,4 @@ tests = testGroup "type definitions" [
105106

106107
--NOTE: copied from Haskell.Ide.Engine.ArtifactMap
107108
toPos :: (Int,Int) -> Position
108-
toPos (l,c) = Position (l-1) (c-1)
109+
toPos (l,c) = Position (l-1) (c-1)

0 commit comments

Comments
 (0)