Upgrade stack to lts-12.0
authorLuke Lau <luke_lau@icloud.com>
Wed, 11 Jul 2018 00:01:43 +0000 (01:01 +0100)
committerLuke Lau <luke_lau@icloud.com>
Wed, 11 Jul 2018 00:01:43 +0000 (01:01 +0100)
Also remove redundant extra-deps

example/Main.hs
haskell-lsp-test.cabal
stack.yaml

index cc74026531ead6183d384d9113fd001a8f60e510..0318ce8c04f47243f3946bd1d755c336cc08e3e7 100644 (file)
@@ -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
index 161126ec83ac8f0df223e1812ab3e1f49aa4e22c..9c21b77511fe8b57a5677edb946eb8ea61cf0c30 100644 (file)
@@ -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
index b53edf85be9c3e6681093a92ec17233fb44d7a48..934b35619ea765af3471c32558cae78885537710 100644 (file)
@@ -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