Upgrade stack to lts-12.0
[opengl.git] / example / Main.hs
1 import Language.Haskell.LSP.Test
2 import Language.Haskell.LSP.Types
3
4 import Control.Monad.IO.Class
5
6 main = runSession "hie --lsp" "test/recordings/renamePass" $ do
7   docItem <- openDoc "Desktop/simple.hs" "haskell"
8   
9   -- Use your favourite favourite combinators.
10   skipManyTill loggingNotification (count 2 publishDiagnosticsNotification)
11
12   -- Send requests and notifications and receive responses
13   let params = DocumentSymbolParams docItem
14   response <- sendRequest TextDocumentDocumentSymbol params :: Session DocumentSymbolsResponse
15   liftIO $ print response
16
17   -- Or use one of the helper functions
18   getDocumentSymbols docItem >>= liftIO . print
19