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
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
, 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
, data-default
, directory
, haskell-lsp-test
- , haskell-lsp
+ , haskell-lsp >= 0.4
, conduit
, conduit-parse
, aeson
default-language: Haskell2010
build-depends: base >= 4.7 && < 5
, haskell-lsp-test
- , haskell-lsp-types
+ , haskell-lsp >= 0.4
, lens
, text
, directory
-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