diff --git a/cabal.project b/cabal.project index 1d82b321c1..f9b8333975 100644 --- a/cabal.project +++ b/cabal.project @@ -28,4 +28,4 @@ package ghcide write-ghc-environment-files: never -index-state: 2020-05-03T12:53:19Z +index-state: 2020-05-05T17:33:00Z diff --git a/ghcide b/ghcide index 648a2a7dff..174b17c006 160000 --- a/ghcide +++ b/ghcide @@ -1 +1 @@ -Subproject commit 648a2a7dff78f59836b62f3eae9f8342a6a8ec71 +Subproject commit 174b17c0064d0fde72d1b0313572ad0c389ec263 diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index 3f6e66e5e8..0039392ae8 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -75,7 +75,7 @@ library , ghcide >= 0.1 , gitrev , hashable - , haskell-lsp == 0.21.* + , haskell-lsp == 0.22.* , hie-bios >= 0.4 , hslogger , lens @@ -219,7 +219,7 @@ test-suite func-test base >=4.7 && <5 , aeson , data-default - , haskell-lsp-types + , haskell-lsp-types == 0.22.* , hls-test-utils , hspec , lens diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index deacf59eb0..c80170825f 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -23,8 +23,8 @@ extra-deps: - ghc-lib-parser-ex-8.10.0.4 - haddock-api-2.22.0 - haddock-library-1.8.0 -- haskell-lsp-0.21.0.0 -- haskell-lsp-types-0.21.0.0 +- haskell-lsp-0.22.0.0 +- haskell-lsp-types-0.22.0.0 - haskell-src-exts-1.21.1 # - hie-bios-0.4.0 - github: fendor/hie-bios @@ -32,7 +32,7 @@ extra-deps: - hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 -- lsp-test-0.10.2.0 +- lsp-test-0.10.3.0 - monad-dijkstra-0.1.1.2 - monad-memo-0.4.1 - multistate-0.8.0.1 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 6a540ae893..e30622050a 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -20,13 +20,13 @@ extra-deps: - ghc-lib-parser-8.10.1.20200412 - ghc-lib-parser-ex-8.10.0.4 - haddock-library-1.8.0 -- haskell-lsp-0.21.0.0 -- haskell-lsp-types-0.21.0.0 +- haskell-lsp-0.22.0.0 +- haskell-lsp-types-0.22.0.0 # - hie-bios-0.4.0 - github: fendor/hie-bios commit: 89d28817716a1c8df7e191f3a43c4504bc6379eb - indexed-profunctors-0.1 -- lsp-test-0.10.2.0 +- lsp-test-0.10.3.0 - monad-dijkstra-0.1.1.2 - opentelemetry-0.3.0 - optics-core-0.2 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index d520ffa7b3..3b4baed03e 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -18,8 +18,8 @@ extra-deps: - ghc-lib-parser-8.10.1.20200412 - ghc-lib-parser-ex-8.10.0.4 - haddock-library-1.8.0 -- haskell-lsp-0.21.0.0 -- haskell-lsp-types-0.21.0.0 +- haskell-lsp-0.22.0.0 +- haskell-lsp-types-0.22.0.0 - haskell-src-exts-1.21.1 # - hie-bios-0.4.0 - github: fendor/hie-bios @@ -28,7 +28,7 @@ extra-deps: - hoogle-5.0.17.11 - hsimport-0.11.0 - ilist-0.3.1.0 -- lsp-test-0.10.2.0 +- lsp-test-0.10.3.0 - monad-dijkstra-0.1.1.2 - opentelemetry-0.3.2 - ormolu-0.0.5.0 diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index 5ca09a5da0..f79f8f216e 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -18,8 +18,8 @@ extra-deps: - ghc-lib-parser-8.10.1.20200412 - ghc-lib-parser-ex-8.10.0.4 - haddock-library-1.8.0 -- haskell-lsp-0.21.0.0 -- haskell-lsp-types-0.21.0.0 +- haskell-lsp-0.22.0.0 +- haskell-lsp-types-0.22.0.0 - haskell-src-exts-1.21.1 # - hie-bios-0.4.0 - github: fendor/hie-bios @@ -28,7 +28,7 @@ extra-deps: - hoogle-5.0.17.11 - hsimport-0.11.0 - ilist-0.3.1.0 -- lsp-test-0.10.2.0 +- lsp-test-0.10.3.0 - monad-dijkstra-0.1.1.2 - opentelemetry-0.3.2 - ormolu-0.0.5.0 diff --git a/stack.yaml b/stack.yaml index 29f9675f35..50f7b0d7ca 100644 --- a/stack.yaml +++ b/stack.yaml @@ -19,13 +19,13 @@ extra-deps: - ghc-lib-parser-8.10.1.20200412 - ghc-lib-parser-ex-8.10.0.4 - haddock-library-1.8.0 -- haskell-lsp-0.21.0.0 -- haskell-lsp-types-0.21.0.0 +- haskell-lsp-0.22.0.0 +- haskell-lsp-types-0.22.0.0 # - hie-bios-0.4.0 - github: fendor/hie-bios commit: 89d28817716a1c8df7e191f3a43c4504bc6379eb - indexed-profunctors-0.1 -- lsp-test-0.10.2.0 +- lsp-test-0.10.3.0 - monad-dijkstra-0.1.1.2 - opentelemetry-0.3.0 - optics-core-0.2 diff --git a/test/functional/FormatSpec.hs b/test/functional/FormatSpec.hs index e99627f208..1d710112a3 100644 --- a/test/functional/FormatSpec.hs +++ b/test/functional/FormatSpec.hs @@ -90,7 +90,7 @@ spec = do doc <- openDoc "BrittanyLF.hs" "haskell" sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "brittany")) let opts = DocumentFormattingParams doc (FormattingOptions 4 True) Nothing - ResponseMessage _ _ (Just edits) _ <- request TextDocumentFormatting opts + ResponseMessage _ _ (Right (Just edits)) <- request TextDocumentFormatting opts liftIO $ edits `shouldBe` [TextEdit (Range (Position 0 0) (Position 5 0)) "module BrittanyLF where\n\nfoo :: Int -> String -> IO ()\nfoo x y = do\n print x\n return ()\n"] @@ -98,7 +98,7 @@ spec = do doc <- openDoc "BrittanyCRLF.hs" "haskell" sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "brittany")) let opts = DocumentFormattingParams doc (FormattingOptions 4 True) Nothing - ResponseMessage _ _ (Just edits) _ <- request TextDocumentFormatting opts + ResponseMessage _ _ (Right (Just edits)) <- request TextDocumentFormatting opts liftIO $ edits `shouldBe` [TextEdit (Range (Position 0 0) (Position 5 0)) "module BrittanyCRLF where\n\nfoo :: Int -> String -> IO ()\nfoo x y = do\n print x\n return ()\n"] @@ -107,7 +107,7 @@ spec = do sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "brittany")) let range = Range (Position 3 0) (Position 5 22) opts = DocumentRangeFormattingParams doc range (FormattingOptions 4 True) Nothing - ResponseMessage _ _ (Just edits) _ <- request TextDocumentRangeFormatting opts + ResponseMessage _ _ (Right (Just edits)) <- request TextDocumentRangeFormatting opts liftIO $ edits `shouldBe` [TextEdit (Range (Position 3 0) (Position 6 0)) "foo x y = do\n print x\n return ()\n"] @@ -116,7 +116,7 @@ spec = do sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "brittany")) let range = Range (Position 3 0) (Position 5 22) opts = DocumentRangeFormattingParams doc range (FormattingOptions 4 True) Nothing - ResponseMessage _ _ (Just edits) _ <- request TextDocumentRangeFormatting opts + ResponseMessage _ _ (Right (Just edits)) <- request TextDocumentRangeFormatting opts liftIO $ edits `shouldBe` [TextEdit (Range (Position 3 0) (Position 6 0)) "foo x y = do\n print x\n return ()\n"] diff --git a/test/functional/PluginSpec.hs b/test/functional/PluginSpec.hs index e51f8741c5..1fd5d8b99f 100644 --- a/test/functional/PluginSpec.hs +++ b/test/functional/PluginSpec.hs @@ -91,7 +91,7 @@ spec = do liftIO $ symbolsRsp ^. L.id `shouldBe` responseId id2 - let Just (DSDocumentSymbols (List ds)) = symbolsRsp ^. L.result + let Right (DSDocumentSymbols (List ds)) = symbolsRsp ^. L.result liftIO $ length ds `shouldBe` 3 liftIO $ (take 2 ds) `shouldBe` [DocumentSymbol