Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion ghcide
4 changes: 2 additions & 2 deletions haskell-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ library
, ghcide >= 0.1
, gitrev
, hashable
, haskell-lsp == 0.21.*
, haskell-lsp == 0.22.*
, hie-bios >= 0.4
, hslogger
, lens
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions stack-8.6.4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ 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
commit: 89d28817716a1c8df7e191f3a43c4504bc6379eb
- 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
Expand Down
6 changes: 3 additions & 3 deletions stack-8.6.5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions stack-8.8.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions stack-8.8.3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions test/functional/FormatSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ 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"]

it "formats a document with CRLF endings" $ runSession hieCommand fullCaps "test/testdata" $ 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"]

Expand All @@ -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"]

Expand All @@ -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"]

Expand Down
2 changes: 1 addition & 1 deletion test/functional/PluginSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down