Skip to content
This repository was archived by the owner on Feb 1, 2019. It is now read-only.

Commit 2fe4d13

Browse files
committed
Pass the project directory to the server.
And start the repl in that directory.
1 parent 799eb42 commit 2fe4d13

File tree

4 files changed

+111
-65
lines changed

4 files changed

+111
-65
lines changed

haskell/LTHaskellClient.hs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,16 @@ import ReplSession
2727

2828
main :: IO ()
2929
main = withSocketsDo $ do
30-
[portStr, clientIdStr] <- getArgs
30+
[portStr, clientIdStr, projectDir] <- getArgs
3131
let port = fromIntegral (read portStr :: Int)
3232
clientId = read clientIdStr
3333
handle <- connectTo "localhost" (PortNumber port)
34-
cwd <- getCurrentDirectory
35-
client <- startSession cwd
34+
client <- startSession projectDir
3635

37-
putStrLn $ "Connected: " ++ cwd
36+
putStrLn $ "Connected: " ++ projectDir
3837
hFlush stdout
3938

40-
sendResponse handle $ LTConnection "Haskell" "haskell" clientId cwd ["haskell.api.reformat", "haskell.api.syntax"]
39+
sendResponse handle $ LTConnection "Haskell" "haskell" clientId projectDir ["haskell.api.reformat", "haskell.api.syntax"]
4140

4241
processCommands $ LTClientState handle client
4342

0 commit comments

Comments
 (0)