Skip to content

Commit e9ef791

Browse files
authored
Merge pull request #89 from alanz/haskell-lsp-0.22
Update for haskell-lsp 0.22
2 parents 019b028 + 6a6ade1 commit e9ef791

File tree

10 files changed

+24
-24
lines changed

10 files changed

+24
-24
lines changed

cabal.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ package ghcide
2828

2929
write-ghc-environment-files: never
3030

31-
index-state: 2020-05-03T12:53:19Z
31+
index-state: 2020-05-05T17:33:00Z

haskell-language-server.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ library
7575
, ghcide >= 0.1
7676
, gitrev
7777
, hashable
78-
, haskell-lsp == 0.21.*
78+
, haskell-lsp == 0.22.*
7979
, hie-bios >= 0.4
8080
, hslogger
8181
, lens
@@ -219,7 +219,7 @@ test-suite func-test
219219
base >=4.7 && <5
220220
, aeson
221221
, data-default
222-
, haskell-lsp-types
222+
, haskell-lsp-types == 0.22.*
223223
, hls-test-utils
224224
, hspec
225225
, lens

stack-8.6.4.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ extra-deps:
2323
- ghc-lib-parser-ex-8.10.0.4
2424
- haddock-api-2.22.0
2525
- haddock-library-1.8.0
26-
- haskell-lsp-0.21.0.0
27-
- haskell-lsp-types-0.21.0.0
26+
- haskell-lsp-0.22.0.0
27+
- haskell-lsp-types-0.22.0.0
2828
- haskell-src-exts-1.21.1
2929
# - hie-bios-0.4.0
3030
- github: fendor/hie-bios
3131
commit: 89d28817716a1c8df7e191f3a43c4504bc6379eb
3232
- hlint-2.2.8
3333
- hoogle-5.0.17.11
3434
- hsimport-0.11.0
35-
- lsp-test-0.10.2.0
35+
- lsp-test-0.10.3.0
3636
- monad-dijkstra-0.1.1.2
3737
- monad-memo-0.4.1
3838
- multistate-0.8.0.1

stack-8.6.5.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ extra-deps:
2020
- ghc-lib-parser-8.10.1.20200412
2121
- ghc-lib-parser-ex-8.10.0.4
2222
- haddock-library-1.8.0
23-
- haskell-lsp-0.21.0.0
24-
- haskell-lsp-types-0.21.0.0
23+
- haskell-lsp-0.22.0.0
24+
- haskell-lsp-types-0.22.0.0
2525
# - hie-bios-0.4.0
2626
- github: fendor/hie-bios
2727
commit: 89d28817716a1c8df7e191f3a43c4504bc6379eb
2828
- indexed-profunctors-0.1
29-
- lsp-test-0.10.2.0
29+
- lsp-test-0.10.3.0
3030
- monad-dijkstra-0.1.1.2
3131
- opentelemetry-0.3.0
3232
- optics-core-0.2

stack-8.8.2.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ extra-deps:
1818
- ghc-lib-parser-8.10.1.20200412
1919
- ghc-lib-parser-ex-8.10.0.4
2020
- haddock-library-1.8.0
21-
- haskell-lsp-0.21.0.0
22-
- haskell-lsp-types-0.21.0.0
21+
- haskell-lsp-0.22.0.0
22+
- haskell-lsp-types-0.22.0.0
2323
- haskell-src-exts-1.21.1
2424
# - hie-bios-0.4.0
2525
- github: fendor/hie-bios
@@ -28,7 +28,7 @@ extra-deps:
2828
- hoogle-5.0.17.11
2929
- hsimport-0.11.0
3030
- ilist-0.3.1.0
31-
- lsp-test-0.10.2.0
31+
- lsp-test-0.10.3.0
3232
- monad-dijkstra-0.1.1.2
3333
- opentelemetry-0.3.2
3434
- ormolu-0.0.5.0

stack-8.8.3.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ extra-deps:
1818
- ghc-lib-parser-8.10.1.20200412
1919
- ghc-lib-parser-ex-8.10.0.4
2020
- haddock-library-1.8.0
21-
- haskell-lsp-0.21.0.0
22-
- haskell-lsp-types-0.21.0.0
21+
- haskell-lsp-0.22.0.0
22+
- haskell-lsp-types-0.22.0.0
2323
- haskell-src-exts-1.21.1
2424
# - hie-bios-0.4.0
2525
- github: fendor/hie-bios
@@ -28,7 +28,7 @@ extra-deps:
2828
- hoogle-5.0.17.11
2929
- hsimport-0.11.0
3030
- ilist-0.3.1.0
31-
- lsp-test-0.10.2.0
31+
- lsp-test-0.10.3.0
3232
- monad-dijkstra-0.1.1.2
3333
- opentelemetry-0.3.2
3434
- ormolu-0.0.5.0

stack.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ extra-deps:
1919
- ghc-lib-parser-8.10.1.20200412
2020
- ghc-lib-parser-ex-8.10.0.4
2121
- haddock-library-1.8.0
22-
- haskell-lsp-0.21.0.0
23-
- haskell-lsp-types-0.21.0.0
22+
- haskell-lsp-0.22.0.0
23+
- haskell-lsp-types-0.22.0.0
2424
# - hie-bios-0.4.0
2525
- github: fendor/hie-bios
2626
commit: 89d28817716a1c8df7e191f3a43c4504bc6379eb
2727
- indexed-profunctors-0.1
28-
- lsp-test-0.10.2.0
28+
- lsp-test-0.10.3.0
2929
- monad-dijkstra-0.1.1.2
3030
- opentelemetry-0.3.0
3131
- optics-core-0.2

test/functional/FormatSpec.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@ spec = do
9090
doc <- openDoc "BrittanyLF.hs" "haskell"
9191
sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "brittany"))
9292
let opts = DocumentFormattingParams doc (FormattingOptions 4 True) Nothing
93-
ResponseMessage _ _ (Just edits) _ <- request TextDocumentFormatting opts
93+
ResponseMessage _ _ (Right (Just edits)) <- request TextDocumentFormatting opts
9494
liftIO $ edits `shouldBe` [TextEdit (Range (Position 0 0) (Position 5 0))
9595
"module BrittanyLF where\n\nfoo :: Int -> String -> IO ()\nfoo x y = do\n print x\n return ()\n"]
9696

9797
it "formats a document with CRLF endings" $ runSession hieCommand fullCaps "test/testdata" $ do
9898
doc <- openDoc "BrittanyCRLF.hs" "haskell"
9999
sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "brittany"))
100100
let opts = DocumentFormattingParams doc (FormattingOptions 4 True) Nothing
101-
ResponseMessage _ _ (Just edits) _ <- request TextDocumentFormatting opts
101+
ResponseMessage _ _ (Right (Just edits)) <- request TextDocumentFormatting opts
102102
liftIO $ edits `shouldBe` [TextEdit (Range (Position 0 0) (Position 5 0))
103103
"module BrittanyCRLF where\n\nfoo :: Int -> String -> IO ()\nfoo x y = do\n print x\n return ()\n"]
104104

@@ -107,7 +107,7 @@ spec = do
107107
sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "brittany"))
108108
let range = Range (Position 3 0) (Position 5 22)
109109
opts = DocumentRangeFormattingParams doc range (FormattingOptions 4 True) Nothing
110-
ResponseMessage _ _ (Just edits) _ <- request TextDocumentRangeFormatting opts
110+
ResponseMessage _ _ (Right (Just edits)) <- request TextDocumentRangeFormatting opts
111111
liftIO $ edits `shouldBe` [TextEdit (Range (Position 3 0) (Position 6 0))
112112
"foo x y = do\n print x\n return ()\n"]
113113

@@ -116,7 +116,7 @@ spec = do
116116
sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "brittany"))
117117
let range = Range (Position 3 0) (Position 5 22)
118118
opts = DocumentRangeFormattingParams doc range (FormattingOptions 4 True) Nothing
119-
ResponseMessage _ _ (Just edits) _ <- request TextDocumentRangeFormatting opts
119+
ResponseMessage _ _ (Right (Just edits)) <- request TextDocumentRangeFormatting opts
120120
liftIO $ edits `shouldBe` [TextEdit (Range (Position 3 0) (Position 6 0))
121121
"foo x y = do\n print x\n return ()\n"]
122122

test/functional/PluginSpec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ spec = do
9191
liftIO $ symbolsRsp ^. L.id `shouldBe` responseId id2
9292

9393

94-
let Just (DSDocumentSymbols (List ds)) = symbolsRsp ^. L.result
94+
let Right (DSDocumentSymbols (List ds)) = symbolsRsp ^. L.result
9595
liftIO $ length ds `shouldBe` 3
9696
liftIO $ (take 2 ds) `shouldBe`
9797
[DocumentSymbol

0 commit comments

Comments
 (0)