-main = do
- files <- getArgs
- forM_ files $ \file -> session $ do
- file <- liftIO $ canonicalizePath file
- openDocument file
- symbols <- documentSymbols file
- liftIO $ mapM_ T.putStrLn (symbols ^.. traverse . LSP.name)
+main = runSession "hie" "test/recordings/renamePass" $ do
+
+ docItem <- getDocItem "Desktop/simple.hs" "haskell"
+ docId <- TextDocumentIdentifier <$> getDocUri "Desktop/simple.hs"
+
+ sendNotification TextDocumentDidOpen (DidOpenTextDocumentParams docItem)
+
+ sendRequest TextDocumentDocumentSymbol (DocumentSymbolParams docId)
+
+ skipMany loggingNotification
+
+ anyResponse >>= liftIO . print