-main = let symbReq = ReqDocumentSymbols (RequestMessage "2.0" (IdInt 24) TextDocumentDocumentSymbol (DocumentSymbolParams (TextDocumentIdentifier (filePathToUri "/Users/luke/Desktop/test/src/Lib.hs"))))
- barPred (RspDocumentSymbols _) = True
- barPred _ = False
- encoded = [("start", const True, [symbReq])
- ,("silent", barPred, [])
- ,("end", const True, [])]
- initState = mkStates encoded
- in
- runSession "hie --lsp" "/Users/luke/Desktop/test" $ do
- openDoc "src/Lib.hs" "haskell"
+runMachine :: String -> [(String, FromServerMessage -> Bool, [Session ()])] -> IO String
+runMachine rootDir encodedStates =
+ runSession "hie --lsp" rootDir $ do