Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit 7e36aa3

Browse files
authored
Merge pull request #1402 from alanz/haskell-lsp-0.16
Haskell lsp 0.16
2 parents 5385087 + c281205 commit 7e36aa3

19 files changed

+53
-52
lines changed

haskell-ide-engine.cabal

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ library
7171
, gitrev >= 1.1
7272
, haddock-api
7373
, haddock-library
74-
, haskell-lsp == 0.15.*
75-
, haskell-lsp-types == 0.15.*
74+
, haskell-lsp == 0.16.*
75+
, haskell-lsp-types == 0.16.*
7676
, haskell-src-exts
7777
, hie-plugin-api
7878
, hoogle >= 5.0.13
@@ -199,7 +199,7 @@ test-suite unit-test
199199
, free
200200
, ghc
201201
, haskell-ide-engine
202-
, haskell-lsp-types >= 0.15.0.0
202+
, haskell-lsp-types == 0.16.*
203203
, hie-test-utils
204204
, hie-plugin-api
205205
, hoogle > 5.0.11
@@ -287,8 +287,8 @@ test-suite func-test
287287
, filepath
288288
, lsp-test >= 0.6.0.0
289289
, haskell-ide-engine
290-
, haskell-lsp-types == 0.15.*
291-
, haskell-lsp == 0.15.*
290+
, haskell-lsp-types == 0.16.*
291+
, haskell-lsp == 0.16.*
292292
, hie-test-utils
293293
, hie-plugin-api
294294
, hspec

hie-plugin-api/hie-plugin-api.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ library
4545
, ghc
4646
, ghc-mod-core >= 5.9.0.0
4747
, ghc-project-types >= 5.9.0.0
48-
, haskell-lsp == 0.15.*
48+
, haskell-lsp == 0.16.*
4949
, hslogger
5050
, monad-control
5151
, mtl

src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ parseErrorToDiagnostic (Hlint.ParseError l msg contents) =
148148
[Diagnostic
149149
{ _range = srcLoc2Range l
150150
, _severity = Just DsInfo -- Not displayed
151-
, _code = Just "parser"
151+
, _code = Just (LSP.StringValue "parser")
152152
, _source = Just "hlint"
153153
, _message = T.unlines [T.pack msg,T.pack contents]
154154
, _relatedInformation = Nothing
@@ -192,7 +192,7 @@ hintToDiagnostic idea
192192
= Diagnostic
193193
{ _range = ss2Range (ideaSpan idea)
194194
, _severity = Just (hintSeverityMap $ ideaSeverity idea)
195-
, _code = Just (T.pack $ ideaHint idea)
195+
, _code = Just (LSP.StringValue $ T.pack $ ideaHint idea)
196196
, _source = Just "hlint"
197197
, _message = idea2Message idea
198198
, _relatedInformation = Nothing
@@ -315,7 +315,7 @@ codeActionProvider plId docId _ context = IdeResultOk <$> hlintActions
315315
hlintActions = catMaybes <$> mapM mkHlintAction (filter validCommand diags)
316316

317317
-- |Some hints do not have an associated refactoring
318-
validCommand (LSP.Diagnostic _ _ (Just code) (Just "hlint") _ _) =
318+
validCommand (LSP.Diagnostic _ _ (Just (LSP.StringValue code)) (Just "hlint") _ _) =
319319
case code of
320320
"Eta reduce" -> False
321321
_ -> True
@@ -324,7 +324,7 @@ codeActionProvider plId docId _ context = IdeResultOk <$> hlintActions
324324
LSP.List diags = context ^. LSP.diagnostics
325325

326326
mkHlintAction :: LSP.Diagnostic -> IdeM (Maybe LSP.CodeAction)
327-
mkHlintAction diag@(LSP.Diagnostic (LSP.Range start _) _s (Just code) (Just "hlint") m _) =
327+
mkHlintAction diag@(LSP.Diagnostic (LSP.Range start _) _s (Just (LSP.StringValue code)) (Just "hlint") m _) =
328328
Just . codeAction <$> mkLspCommand plId "applyOne" title (Just args)
329329
where
330330
codeAction cmd = LSP.CodeAction title (Just LSP.CodeActionRefactor) (Just (LSP.List [diag])) Nothing (Just cmd)

stack-8.2.2.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ extra-deps:
2020
- ghc-exactprint-0.5.8.2
2121
- haddock-api-2.18.1
2222
- haddock-library-1.4.4
23-
- haskell-lsp-0.15.0.0
24-
- haskell-lsp-types-0.15.0.0
23+
- haskell-lsp-0.16.0.0
24+
- haskell-lsp-types-0.16.0.0
2525
- haskell-src-exts-1.21.0
2626
- haskell-src-exts-util-0.2.5
2727
- hlint-2.1.17 # last hlint supporting GHC 8.2
2828
- hoogle-5.0.17.9
2929
- hsimport-0.8.8
30-
- lsp-test-0.6.0.0
30+
- lsp-test-0.7.0.0
3131
- monad-dijkstra-0.1.1.2
3232
- pretty-show-1.8.2
3333
- rope-utf16-splay-0.3.1.0

stack-8.4.2.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ extra-deps:
1919
- ghc-lib-parser-8.8.0.20190723
2020
- haddock-api-2.20.0
2121
- haddock-library-1.6.0
22-
- haskell-lsp-0.15.0.0
23-
- haskell-lsp-types-0.15.0.0
22+
- haskell-lsp-0.16.0.0
23+
- haskell-lsp-types-0.16.0.0
2424
- haskell-src-exts-1.21.0
2525
- haskell-src-exts-util-0.2.5
2626
- hlint-2.2.2
2727
- hoogle-5.0.17.9
2828
- hsimport-0.10.0
29-
- lsp-test-0.6.0.0
29+
- lsp-test-0.7.0.0
3030
- monad-dijkstra-0.1.1.2
3131
- pretty-show-1.8.2
3232
- rope-utf16-splay-0.3.1.0

stack-8.4.3.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ extra-deps:
1919
- ghc-lib-parser-8.8.0.20190723
2020
- haddock-api-2.20.0
2121
- haddock-library-1.6.0
22-
- haskell-lsp-0.15.0.0
23-
- haskell-lsp-types-0.15.0.0
22+
- haskell-lsp-0.16.0.0
23+
- haskell-lsp-types-0.16.0.0
2424
- haskell-src-exts-1.21.0
2525
- haskell-src-exts-util-0.2.5
2626
- hlint-2.2.2
2727
- hoogle-5.0.17.9
2828
- hsimport-0.10.0
29-
- lsp-test-0.6.0.0
29+
- lsp-test-0.7.0.0
3030
- monad-dijkstra-0.1.1.2
3131
- pretty-show-1.8.2
3232
- rope-utf16-splay-0.3.1.0

stack-8.4.4.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ extra-deps:
1818
- ghc-lib-parser-8.8.0.20190723
1919
- haddock-api-2.20.0
2020
- haddock-library-1.6.0
21-
- haskell-lsp-0.15.0.0
22-
- haskell-lsp-types-0.15.0.0
21+
- haskell-lsp-0.16.0.0
22+
- haskell-lsp-types-0.16.0.0
2323
- haskell-src-exts-1.21.0
2424
- haskell-src-exts-util-0.2.5
2525
- hlint-2.2.2
2626
- hoogle-5.0.17.9
2727
- hsimport-0.10.0
28-
- lsp-test-0.6.0.0
28+
- lsp-test-0.7.0.0
2929
- monad-dijkstra-0.1.1.2
3030
- optparse-simple-0.1.0
3131
- pretty-show-1.9.5

stack-8.6.1.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ extra-deps:
2121
- floskell-0.10.0
2222
- ghc-lib-parser-8.8.0.20190723
2323
- haddock-api-2.21.0
24-
- haskell-lsp-0.15.0.0
25-
- haskell-lsp-types-0.15.0.0
24+
- haskell-lsp-0.16.0.0
25+
- haskell-lsp-types-0.16.0.0
2626
- haskell-src-exts-1.21.0
2727
- haskell-src-exts-util-0.2.5
2828
- hlint-2.2.2
2929
- hoogle-5.0.17.9
3030
- hsimport-0.10.0
31-
- lsp-test-0.6.0.0
31+
- lsp-test-0.7.0.0
3232
- monad-dijkstra-0.1.1.2
3333
- monad-memo-0.4.1
3434
- monoid-subclasses-0.4.6.1

stack-8.6.2.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ extra-deps:
1717
- floskell-0.10.0
1818
- ghc-lib-parser-8.8.0.20190723
1919
- haddock-api-2.21.0
20-
- haskell-lsp-0.15.0.0
21-
- haskell-lsp-types-0.15.0.0
20+
- haskell-lsp-0.16.0.0
21+
- haskell-lsp-types-0.16.0.0
2222
- haskell-src-exts-1.21.0
2323
- haskell-src-exts-util-0.2.5
2424
- hlint-2.2.2
2525
- hoogle-5.0.17.9
2626
- hsimport-0.10.0
27-
- lsp-test-0.6.0.0
27+
- lsp-test-0.7.0.0
2828
- monad-dijkstra-0.1.1.2
2929
- monad-memo-0.4.1
3030
- multistate-0.8.0.1

stack-8.6.3.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ extra-deps:
1717
- floskell-0.10.0
1818
- ghc-lib-parser-8.8.0.20190723
1919
- haddock-api-2.21.0
20-
- haskell-lsp-0.15.0.0
21-
- haskell-lsp-types-0.15.0.0
20+
- haskell-lsp-0.16.0.0
21+
- haskell-lsp-types-0.16.0.0
2222
- haskell-src-exts-1.21.0
2323
- haskell-src-exts-util-0.2.5
2424
- hlint-2.2.2
2525
- hoogle-5.0.17.9
2626
- hsimport-0.10.0
27-
- lsp-test-0.6.0.0
27+
- lsp-test-0.7.0.0
2828
- monad-dijkstra-0.1.1.2
2929
- monad-memo-0.4.1
3030
- multistate-0.8.0.1

0 commit comments

Comments
 (0)