X-Git-Url: http://git.lukelau.me/?a=blobdiff_plain;f=example%2FMain.hs;h=1e2e3baf3356b36f6eb09967a02ce2e7fbd12c0a;hb=cdb1ba7038c32bac71a3bc783effc1e07049a985;hp=0318ce8c04f47243f3946bd1d755c336cc08e3e7;hpb=0e9ea704c2fd5ab6c762e709b4a4ad4b10169a7e;p=lsp-test.git diff --git a/example/Main.hs b/example/Main.hs index 0318ce8..1e2e3ba 100644 --- a/example/Main.hs +++ b/example/Main.hs @@ -1,9 +1,9 @@ +import Control.Applicative.Combinators +import Control.Monad.IO.Class import Language.Haskell.LSP.Test import Language.Haskell.LSP.Types -import Control.Monad.IO.Class - -main = runSession "hie --lsp" "test/recordings/renamePass" $ do +main = runSession "hie --lsp" fullCaps "test/data/renamePass" $ do docItem <- openDoc "Desktop/simple.hs" "haskell" -- Use your favourite favourite combinators. @@ -11,8 +11,8 @@ main = runSession "hie --lsp" "test/recordings/renamePass" $ do -- Send requests and notifications and receive responses let params = DocumentSymbolParams docItem - response <- sendRequest TextDocumentDocumentSymbol params :: Session DocumentSymbolsResponse - liftIO $ print response + rsp <- request TextDocumentDocumentSymbol params :: Session DocumentSymbolsResponse + liftIO $ print rsp -- Or use one of the helper functions getDocumentSymbols docItem >>= liftIO . print