From 0e9ea704c2fd5ab6c762e709b4a4ad4b10169a7e Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Wed, 11 Jul 2018 01:01:43 +0100 Subject: [PATCH] Upgrade stack to lts-12.0 Also remove redundant extra-deps --- example/Main.hs | 13 +++++++++---- haskell-lsp-test.cabal | 10 ++++++---- stack.yaml | 14 +++----------- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/example/Main.hs b/example/Main.hs index cc74026..0318ce8 100644 --- a/example/Main.hs +++ b/example/Main.hs @@ -1,14 +1,19 @@ import Language.Haskell.LSP.Test -import Language.Haskell.LSP.TH.DataTypesJSON +import Language.Haskell.LSP.Types import Control.Monad.IO.Class main = runSession "hie --lsp" "test/recordings/renamePass" $ do docItem <- openDoc "Desktop/simple.hs" "haskell" + -- Use your favourite favourite combinators. + skipManyTill loggingNotification (count 2 publishDiagnosticsNotification) + + -- Send requests and notifications and receive responses let params = DocumentSymbolParams docItem - _ <- sendRequest TextDocumentDocumentSymbol params :: Session DocumentSymbolsResponse + response <- sendRequest TextDocumentDocumentSymbol params :: Session DocumentSymbolsResponse + liftIO $ print response - skipMany loggingNotification + -- Or use one of the helper functions + getDocumentSymbols docItem >>= liftIO . print - anyResponse >>= liftIO . print diff --git a/haskell-lsp-test.cabal b/haskell-lsp-test.cabal index 161126e..9c21b77 100644 --- a/haskell-lsp-test.cabal +++ b/haskell-lsp-test.cabal @@ -1,12 +1,14 @@ name: haskell-lsp-test version: 0.1.0.0 --- synopsis: +synopsis: Functional test framework for LSP servers. -- description: homepage: https://github.com/Bubba/haskell-lsp-test#readme license: BSD3 license-file: LICENSE author: Luke Lau maintainer: luke_lau@icloud.com +stability: experimental +bug-reports: https://github.com/Bubba/haskell-lsp-test/issues copyright: 2018 Luke Lau category: Testing build-type: Simple @@ -19,7 +21,7 @@ library , Language.Haskell.LSP.Test.Replay default-language: Haskell2010 build-depends: base >= 4.7 && < 5 - , haskell-lsp >= 0.3 + , haskell-lsp >= 0.4 , aeson , ansi-terminal , async @@ -63,7 +65,7 @@ test-suite tests , data-default , directory , haskell-lsp-test - , haskell-lsp + , haskell-lsp >= 0.4 , conduit , conduit-parse , aeson @@ -77,7 +79,7 @@ executable example default-language: Haskell2010 build-depends: base >= 4.7 && < 5 , haskell-lsp-test - , haskell-lsp-types + , haskell-lsp >= 0.4 , lens , text , directory diff --git a/stack.yaml b/stack.yaml index b53edf8..934b356 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,15 +1,7 @@ -resolver: nightly-2018-06-02 +resolver: lts-12.0 packages: - . extra-deps: - - github: Bubba/haskell-lsp-client - commit: b7cf14eb48837a73032e867dab90db1708220c66 - - github: Bubba/haskell-lsp - commit: 0772972aec20df9413b6c3b4b4f0abfa6d4c1535 - subdirs: - - . - - ./haskell-lsp-types - - sorted-list-0.2.1.0 - - github: yi-editor/yi-rope - commit: 7867909f4f20952be051fd4252cca5bbfc80cf41 + - haskell-lsp-0.4.0.0 + - haskell-lsp-types-0.4.0.0 -- 2.30.2