@@ -42,7 +42,7 @@ import Idris.Elab.Value
42import Version_idris (gitHash)
42import Version_idris (gitHash)
43import Util.System
43import Util.System
44import Util.DynamicLinker
44import Util.DynamicLinker
45−import Util.Net (listenOnLocalhost)
45+import Util.Net (listenOnLocalhost, listenOnLocalhostAnyPort)
46import Util.Pretty hiding ((</>))
46import Util.Pretty hiding ((</>))
48import Idris.Core.Evaluate
48import Idris.Core.Evaluate
@@ -91,6 +91,8 @@ import Data.Word (Word)
91import Data.Either (partitionEithers)
91import Data.Either (partitionEithers)
92import Control.DeepSeq
92import Control.DeepSeq
94+import Numeric ( readHex )
94import Debug.Trace
96import Debug.Trace
96-- | Run the REPL
98-- | Run the REPL
@@ -206,44 +208,68 @@ runClient str = withSocketsDo $ do
206 else do l <- hGetLine h
208 else do l <- hGetLine h
207 hGetResp (acc ++ l ++ "\n") h
209 hGetResp (acc ++ l ++ "\n") h
211+initIdeslaveSocket :: IO (Handle)
212+initIdeslaveSocket = do
213+ (sock, port) <- listenOnLocalhostAnyPort
214+ putStrLn $ show port
215+ (h, _, _) <- accept sock
209-- | Run the IdeSlave
219-- | Run the IdeSlave
210−ideslaveStart :: IState -> [FilePath] -> Idris ()
220+ideslaveStart :: Bool -> IState -> [FilePath] -> Idris ()
211−ideslaveStart orig mods
221+ideslaveStart s orig mods
222+ = do h <- runIO $ if s then initIdeslaveSocket else return stdout
212− = do i <- getIState
224+ i <- getIState
213 case idris_outputmode i of
225 case idris_outputmode i of
214− IdeSlave n ->
226+ IdeSlave n h ->
227+ do runIO $ hPutStrLn h $ IdeSlave.convSExp "protocol-version" IdeSlave.ideSlaveEpoch n
215− when (mods /= []) (do isetPrompt (mkPrompt mods))
228+ when (mods /= []) (do isetPrompt (mkPrompt mods))
216− ideslave orig mods
229+ ideslave h orig mods
218−
231+getNChar :: Handle -> Int -> String -> IO (String)
232+getNChar _ 0 s = return (reverse s)
233+getNChar h n s = do c <- hGetChar h
234+ getNChar h (n - 1) (c : s)
236+getLen :: Handle -> Idris (Int)
237+getLen h = do s <- runIO $ getNChar h 6 ""
239+ ((num, ""):_) -> return num
240+ _ -> ierror (Msg $ "Couldn't read length " ++ s)
219−ideslave :: IState -> [FilePath] -> Idris ()
242+ideslave :: Handle -> IState -> [FilePath] -> Idris ()
220−ideslave orig mods
243+ideslave h orig mods
221 = do idrisCatch
244 = do idrisCatch
222− (do l <- runIO $ getLine
245+ (do let inh = if h == stdout then stdin else h
247+ l <- runIO $ getNChar inh len ""
223 (sexp, id) <- case IdeSlave.parseMessage l of
248 (sexp, id) <- case IdeSlave.parseMessage l of
224 Left err -> ierror err
249 Left err -> ierror err
225 Right (sexp, id) -> return (sexp, id)
250 Right (sexp, id) -> return (sexp, id)
226 i <- getIState
251 i <- getIState
227− putIState $ i { idris_outputmode = (IdeSlave id) }
252+ putIState $ i { idris_outputmode = (IdeSlave id h) }
228 idrisCatch -- to report correct id back!
253 idrisCatch -- to report correct id back!
229 (do let fn = case mods of
254 (do let fn = case mods of
230 (f:_) -> f
255 (f:_) -> f
232 case IdeSlave.sexpToCommand sexp of
257 case IdeSlave.sexpToCommand sexp of
233− Just cmd -> runIdeSlaveCommand id orig fn mods cmd
258+ Just cmd -> runIdeSlaveCommand h id orig fn mods cmd
234 Nothing -> iPrintError "did not understand" )
259 Nothing -> iPrintError "did not understand" )
235 (\e -> do iPrintError $ show e))
260 (\e -> do iPrintError $ show e))
236 (\e -> do iPrintError $ show e)
261 (\e -> do iPrintError $ show e)
237− ideslave orig mods
262+ ideslave h orig mods
239-- | Run IDESlave commands
264-- | Run IDESlave commands
265+runIdeSlaveCommand :: Handle -- ^^ The handle for communication
240−runIdeSlaveCommand :: Integer -- ^^ The continuation ID for the client
266+ -> Integer -- ^^ The continuation ID for the client
241 -> IState -- ^^ The original IState
267 -> IState -- ^^ The original IState
242 -> FilePath -- ^^ The current open file
268 -> FilePath -- ^^ The current open file
243 -> [FilePath] -- ^^ The currently loaded modules
269 -> [FilePath] -- ^^ The currently loaded modules
244 -> IdeSlave.IdeSlaveCommand -- ^^ The command to process
270 -> IdeSlave.IdeSlaveCommand -- ^^ The command to process
245 -> Idris ()
271 -> Idris ()
246−runIdeSlaveCommand id orig fn mods (IdeSlave.Interpret cmd) =
272+runIdeSlaveCommand h id orig fn mods (IdeSlave.Interpret cmd) =
247 do c <- colourise
273 do c <- colourise
248 i <- getIState
274 i <- getIState
249 case parseCmd i "(input)" cmd of
275 case parseCmd i "(input)" cmd of
@@ -253,8 +279,8 @@ runIdeSlaveCommand id orig fn mods (IdeSlave.Interpret cmd) =
253 (do process stdout fn (Prove n')
279 (do process stdout fn (Prove n')
254 isetPrompt (mkPrompt mods)
280 isetPrompt (mkPrompt mods)
255 case idris_outputmode i of
281 case idris_outputmode i of
256− IdeSlave n -> -- signal completion of proof to ide
282+ IdeSlave n h -> -- signal completion of proof to ide
257− runIO . hPutStrLn stdout $
283+ runIO . hPutStrLn h $
258 IdeSlave.convSExp "return"
284 IdeSlave.convSExp "return"
259 (IdeSlave.SymbolAtom "ok", "")
285 (IdeSlave.SymbolAtom "ok", "")
@@ -262,25 +288,25 @@ runIdeSlaveCommand id orig fn mods (IdeSlave.Interpret cmd) =
262 (\e -> do ist <- getIState
288 (\e -> do ist <- getIState
263 isetPrompt (mkPrompt mods)
289 isetPrompt (mkPrompt mods)
264 case idris_outputmode i of
290 case idris_outputmode i of
265− IdeSlave n ->
291+ IdeSlave n h ->
266− runIO . hPutStrLn stdout $
292+ runIO . hPutStrLn h $
267 IdeSlave.convSExp "abandon-proof" "Abandoned" n
293 IdeSlave.convSExp "abandon-proof" "Abandoned" n
268 _ -> return ()
294 _ -> return ()
269− ihRenderError stdout $ pprintErr ist e)
295+ ihRenderError h $ pprintErr ist e)
270 Success cmd -> idrisCatch
296 Success cmd -> idrisCatch
271 (ideslaveProcess fn cmd)
297 (ideslaveProcess fn cmd)
272− (\e -> getIState >>= ihRenderError stdout . flip pprintErr e)
298+ (\e -> getIState >>= ihRenderError h . flip pprintErr e)
273−runIdeSlaveCommand id orig fn mods (IdeSlave.REPLCompletions str) =
299+runIdeSlaveCommand h id orig fn mods (IdeSlave.REPLCompletions str) =
274 do (unused, compls) <- replCompletion (reverse str, "")
300 do (unused, compls) <- replCompletion (reverse str, "")
275 let good = IdeSlave.SexpList [IdeSlave.SymbolAtom "ok",
301 let good = IdeSlave.SexpList [IdeSlave.SymbolAtom "ok",
276 IdeSlave.toSExp (map replacement compls,
302 IdeSlave.toSExp (map replacement compls,
277 reverse unused)]
303 reverse unused)]
278− runIO $ putStrLn $ IdeSlave.convSExp "return" good id
304+ runIO . hPutStrLn h $ IdeSlave.convSExp "return" good id
279−runIdeSlaveCommand id orig fn mods (IdeSlave.LoadFile filename toline) =
305+runIdeSlaveCommand h id orig fn mods (IdeSlave.LoadFile filename toline) =
280 do i <- getIState
306 do i <- getIState
282 putIState (orig { idris_options = idris_options i,
308 putIState (orig { idris_options = idris_options i,
283− idris_outputmode = (IdeSlave id) })
309+ idris_outputmode = (IdeSlave id h) })
284 loadInputs stdout [filename] toline
310 loadInputs stdout [filename] toline
285 isetPrompt (mkPrompt [filename])
311 isetPrompt (mkPrompt [filename])
286 -- Report either success or failure
312 -- Report either success or failure
@@ -291,10 +317,10 @@ runIdeSlaveCommand id orig fn mods (IdeSlave.LoadFile filename toline) =
291 (\fc -> IdeSlave.SexpList [IdeSlave.SymbolAtom "ok",
317 (\fc -> IdeSlave.SexpList [IdeSlave.SymbolAtom "ok",
292 IdeSlave.toSExp fc])
318 IdeSlave.toSExp fc])
293 (idris_parsedSpan i)
319 (idris_parsedSpan i)
294− in runIO . putStrLn $ IdeSlave.convSExp "return" msg id
320+ in runIO . hPutStrLn h $ IdeSlave.convSExp "return" msg id
295 Just x -> iPrintError $ "didn't load " ++ filename
321 Just x -> iPrintError $ "didn't load " ++ filename
296− ideslave orig [filename]
322+ ideslave h orig [filename]
297−runIdeSlaveCommand id orig fn mods (IdeSlave.TypeOf name) =
323+runIdeSlaveCommand h id orig fn mods (IdeSlave.TypeOf name) =
298 case splitName name of
324 case splitName name of
299 Left err -> iPrintError err
325 Left err -> iPrintError err
300 Right n -> process stdout "(ideslave)"
326 Right n -> process stdout "(ideslave)"
@@ -304,32 +330,32 @@ runIdeSlaveCommand id orig fn mods (IdeSlave.TypeOf name) =
304 [] -> Left ("Didn't understand name '" ++ s ++ "'")
330 [] -> Left ("Didn't understand name '" ++ s ++ "'")
305 [n] -> Right $ sUN n
331 [n] -> Right $ sUN n
306 (n:ns) -> Right $ sNS (sUN n) ns
332 (n:ns) -> Right $ sNS (sUN n) ns
307−runIdeSlaveCommand id orig fn mods (IdeSlave.DocsFor name) =
333+runIdeSlaveCommand h id orig fn mods (IdeSlave.DocsFor name) =
308 case parseConst orig name of
334 case parseConst orig name of
309 Success c -> process stdout "(ideslave)" (DocStr (Right c))
335 Success c -> process stdout "(ideslave)" (DocStr (Right c))
310 Failure _ ->
336 Failure _ ->
311 case splitName name of
337 case splitName name of
312 Left err -> iPrintError err
338 Left err -> iPrintError err
313 Right n -> process stdout "(ideslave)" (DocStr (Left n))
339 Right n -> process stdout "(ideslave)" (DocStr (Left n))
314−runIdeSlaveCommand id orig fn mods (IdeSlave.CaseSplit line name) =
340+runIdeSlaveCommand h id orig fn mods (IdeSlave.CaseSplit line name) =
315 process stdout fn (CaseSplitAt False line (sUN name))
341 process stdout fn (CaseSplitAt False line (sUN name))
316−runIdeSlaveCommand id orig fn mods (IdeSlave.AddClause line name) =
342+runIdeSlaveCommand h id orig fn mods (IdeSlave.AddClause line name) =
317 process stdout fn (AddClauseFrom False line (sUN name))
343 process stdout fn (AddClauseFrom False line (sUN name))
318−runIdeSlaveCommand id orig fn mods (IdeSlave.AddProofClause line name) =
344+runIdeSlaveCommand h id orig fn mods (IdeSlave.AddProofClause line name) =
319 process stdout fn (AddProofClauseFrom False line (sUN name))
345 process stdout fn (AddProofClauseFrom False line (sUN name))
320−runIdeSlaveCommand id orig fn mods (IdeSlave.AddMissing line name) =
346+runIdeSlaveCommand h id orig fn mods (IdeSlave.AddMissing line name) =
321 process stdout fn (AddMissing False line (sUN name))
347 process stdout fn (AddMissing False line (sUN name))
322−runIdeSlaveCommand id orig fn mods (IdeSlave.MakeWithBlock line name) =
348+runIdeSlaveCommand h id orig fn mods (IdeSlave.MakeWithBlock line name) =
323 process stdout fn (MakeWith False line (sUN name))
349 process stdout fn (MakeWith False line (sUN name))
324−runIdeSlaveCommand id orig fn mods (IdeSlave.ProofSearch r line name hints depth) =
350+runIdeSlaveCommand h id orig fn mods (IdeSlave.ProofSearch r line name hints depth) =
325 doProofSearch stdout fn False r line (sUN name) (map sUN hints) depth
351 doProofSearch stdout fn False r line (sUN name) (map sUN hints) depth
326−runIdeSlaveCommand id orig fn mods (IdeSlave.MakeLemma line name) =
352+runIdeSlaveCommand h id orig fn mods (IdeSlave.MakeLemma line name) =
327 case splitName name of
353 case splitName name of
328 Left err -> iPrintError err
354 Left err -> iPrintError err
329 Right n -> process stdout fn (MakeLemma False line n)
355 Right n -> process stdout fn (MakeLemma False line n)
330−runIdeSlaveCommand id orig fn mods (IdeSlave.Apropos a) =
356+runIdeSlaveCommand h id orig fn mods (IdeSlave.Apropos a) =
331 process stdout fn (Apropos a)
357 process stdout fn (Apropos a)
332−runIdeSlaveCommand id orig fn mods (IdeSlave.GetOpts) =
358+runIdeSlaveCommand h id orig fn mods (IdeSlave.GetOpts) =
333 do ist <- getIState
359 do ist <- getIState
334 let opts = idris_options ist
360 let opts = idris_options ist
335 let impshow = opt_showimp opts
361 let impshow = opt_showimp opts
@@ -337,16 +363,16 @@ runIdeSlaveCommand id orig fn mods (IdeSlave.GetOpts) =
337 let options = (IdeSlave.SymbolAtom "ok",
363 let options = (IdeSlave.SymbolAtom "ok",
338 [(IdeSlave.SymbolAtom "show-implicits", impshow),
364 [(IdeSlave.SymbolAtom "show-implicits", impshow),
339 (IdeSlave.SymbolAtom "error-context", errCtxt)])
365 (IdeSlave.SymbolAtom "error-context", errCtxt)])
340− runIO . putStrLn $ IdeSlave.convSExp "return" options id
366+ runIO . hPutStrLn h $ IdeSlave.convSExp "return" options id
341−runIdeSlaveCommand id orig fn mods (IdeSlave.SetOpt IdeSlave.ShowImpl b) =
367+runIdeSlaveCommand h id orig fn mods (IdeSlave.SetOpt IdeSlave.ShowImpl b) =
342 do setImpShow b
368 do setImpShow b
343 let msg = (IdeSlave.SymbolAtom "ok", b)
369 let msg = (IdeSlave.SymbolAtom "ok", b)
344− runIO . putStrLn $ IdeSlave.convSExp "return" msg id
370+ runIO . hPutStrLn h $ IdeSlave.convSExp "return" msg id
345−runIdeSlaveCommand id orig fn mods (IdeSlave.SetOpt IdeSlave.ErrContext b) =
371+runIdeSlaveCommand h id orig fn mods (IdeSlave.SetOpt IdeSlave.ErrContext b) =
346 do setErrContext b
372 do setErrContext b
347 let msg = (IdeSlave.SymbolAtom "ok", b)
373 let msg = (IdeSlave.SymbolAtom "ok", b)
348− runIO . putStrLn $ IdeSlave.convSExp "return" msg id
374+ runIO . hPutStrLn h $ IdeSlave.convSExp "return" msg id
349−runIdeSlaveCommand id orig fn mods (IdeSlave.Metavariables cols) =
375+runIdeSlaveCommand h id orig fn mods (IdeSlave.Metavariables cols) =
350 do ist <- getIState
376 do ist <- getIState
351 let mvs = reverse $ map fst (idris_metavars ist) \\ primDefs
377 let mvs = reverse $ map fst (idris_metavars ist) \\ primDefs
352 let ppo = ppOptionIst ist
378 let ppo = ppOptionIst ist
@@ -362,7 +388,7 @@ runIdeSlaveCommand id orig fn mods (IdeSlave.Metavariables cols) =
362 (zip bnds hs),
388 (zip bnds hs),
363 render ist bnd c pc))
389 render ist bnd c pc))
365− runIO . putStrLn $
391+ runIO . hPutStrLn h $
366 IdeSlave.convSExp "return" (IdeSlave.SymbolAtom "ok", mvOutput) id
392 IdeSlave.convSExp "return" (IdeSlave.SymbolAtom "ok", mvOutput) id
367 where mapPair f g xs = zip (map (f . fst) xs) (map (g . snd) xs)
393 where mapPair f g xs = zip (map (f . fst) xs) (map (g . snd) xs)
368 mapSnd f xs = zip (map fst xs) (map (f . snd) xs)
394 mapSnd f xs = zip (map fst xs) (map (f . snd) xs)
@@ -407,32 +433,32 @@ runIdeSlaveCommand id orig fn mods (IdeSlave.Metavariables cols) =
407 let (out, spans) = render ist bnd t pt in
433 let (out, spans) = render ist bnd t pt in
408 (show n , out, spans)
434 (show n , out, spans)
410−runIdeSlaveCommand id orig fn mods (IdeSlave.WhoCalls n) =
436+runIdeSlaveCommand h id orig fn mods (IdeSlave.WhoCalls n) =
411 case splitName n of
437 case splitName n of
412 Left err -> iPrintError err
438 Left err -> iPrintError err
413 Right n -> do calls <- whoCalls n
439 Right n -> do calls <- whoCalls n
414 ist <- getIState
440 ist <- getIState
415 let msg = (IdeSlave.SymbolAtom "ok",
441 let msg = (IdeSlave.SymbolAtom "ok",
416 map (\ (n,ns) -> (pn ist n, map (pn ist) ns)) calls)
442 map (\ (n,ns) -> (pn ist n, map (pn ist) ns)) calls)
417− runIO . putStrLn $ IdeSlave.convSExp "return" msg id
443+ runIO . hPutStrLn h $ IdeSlave.convSExp "return" msg id
418 where pn ist = displaySpans .
444 where pn ist = displaySpans .
419 renderPretty 0.9 1000 .
445 renderPretty 0.9 1000 .
420 fmap (fancifyAnnots ist) .
446 fmap (fancifyAnnots ist) .
421 prettyName True True []
447 prettyName True True []
422−runIdeSlaveCommand id orig fn mods (IdeSlave.CallsWho n) =
448+runIdeSlaveCommand h id orig fn mods (IdeSlave.CallsWho n) =
423 case splitName n of
449 case splitName n of
424 Left err -> iPrintError err
450 Left err -> iPrintError err
425 Right n -> do calls <- callsWho n
451 Right n -> do calls <- callsWho n
426 ist <- getIState
452 ist <- getIState
427 let msg = (IdeSlave.SymbolAtom "ok",
453 let msg = (IdeSlave.SymbolAtom "ok",
428 map (\ (n,ns) -> (pn ist n, map (pn ist) ns)) calls)
454 map (\ (n,ns) -> (pn ist n, map (pn ist) ns)) calls)
429− runIO . putStrLn $ IdeSlave.convSExp "return" msg id
455+ runIO . hPutStrLn h $ IdeSlave.convSExp "return" msg id
430 where pn ist = displaySpans .
456 where pn ist = displaySpans .
431 renderPretty 0.9 1000 .
457 renderPretty 0.9 1000 .
432 fmap (fancifyAnnots ist) .
458 fmap (fancifyAnnots ist) .
433 prettyName True True []
459 prettyName True True []
435−runIdeSlaveCommand id orig fn modes (IdeSlave.TermNormalise bnd tm) =
461+runIdeSlaveCommand h id orig fn modes (IdeSlave.TermNormalise bnd tm) =
436 do ctxt <- getContext
462 do ctxt <- getContext
437 ist <- getIState
463 ist <- getIState
438 let tm' = force (normaliseAll ctxt [] tm)
464 let tm' = force (normaliseAll ctxt [] tm)
@@ -446,15 +472,15 @@ runIdeSlaveCommand id orig fn modes (IdeSlave.TermNormalise bnd tm) =
446 displaySpans .
472 displaySpans .
447 renderPretty 0.9 80 .
473 renderPretty 0.9 80 .
448 fmap (fancifyAnnots ist) $ ptm)
474 fmap (fancifyAnnots ist) $ ptm)
449− runIO . putStrLn $ IdeSlave.convSExp "return" msg id
475+ runIO . hPutStrLn h $ IdeSlave.convSExp "return" msg id
450−runIdeSlaveCommand id orig fn modes (IdeSlave.TermShowImplicits bnd tm) =
476+runIdeSlaveCommand h id orig fn modes (IdeSlave.TermShowImplicits bnd tm) =
451− ideSlaveForceTermImplicits id bnd True tm
477+ ideSlaveForceTermImplicits h id bnd True tm
452−runIdeSlaveCommand id orig fn modes (IdeSlave.TermNoImplicits bnd tm) =
478+runIdeSlaveCommand h id orig fn modes (IdeSlave.TermNoImplicits bnd tm) =
453− ideSlaveForceTermImplicits id bnd False tm
479+ ideSlaveForceTermImplicits h id bnd False tm
455-- | Show a term for IDESlave with the specified implicitness
481-- | Show a term for IDESlave with the specified implicitness
456−ideSlaveForceTermImplicits :: Integer -> [(Name, Bool)] -> Bool -> Term -> Idris ()
482+ideSlaveForceTermImplicits :: Handle -> Integer -> [(Name, Bool)] -> Bool -> Term -> Idris ()
457−ideSlaveForceTermImplicits id bnd impl tm =
483+ideSlaveForceTermImplicits h id bnd impl tm =
458 do ist <- getIState
484 do ist <- getIState
459 let expl = annotate (AnnTerm bnd tm)
485 let expl = annotate (AnnTerm bnd tm)
460 (pprintPTerm ((ppOptionIst ist) { ppopt_impl = impl })
486 (pprintPTerm ((ppOptionIst ist) { ppopt_impl = impl })
@@ -464,7 +490,7 @@ ideSlaveForceTermImplicits id bnd impl tm =
464 displaySpans .
490 displaySpans .
465 renderPretty 0.9 80 .
491 renderPretty 0.9 80 .
466 fmap (fancifyAnnots ist) $ expl)
492 fmap (fancifyAnnots ist) $ expl)
467− runIO . putStrLn $ IdeSlave.convSExp "return" msg id
493+ runIO . hPutStrLn h $ IdeSlave.convSExp "return" msg id
469splitName :: String -> Either String Name
495splitName :: String -> Either String Name
470splitName s = case reverse $ splitOn "." s of
496splitName s = case reverse $ splitOn "." s of
@@ -950,8 +976,8 @@ process h fn Execute
950 case idris_outputmode ist of
976 case idris_outputmode ist of
951 RawOutput -> do runIO $ system tmpn
977 RawOutput -> do runIO $ system tmpn
952 return ()
978 return ()
953− IdeSlave n -> runIO . hPutStrLn h $
979+ IdeSlave n h -> runIO . hPutStrLn h $
954− IdeSlave.convSExp "run-program" tmpn n)
980+ IdeSlave.convSExp "run-program" tmpn n)
955 (\e -> getIState >>= ihRenderError stdout . flip pprintErr e)
981 (\e -> getIState >>= ihRenderError stdout . flip pprintErr e)
956 where fc = fileFC "main"
982 where fc = fileFC "main"
957process h fn (Compile codegen f)
983process h fn (Compile codegen f)
@@ -1275,7 +1301,6 @@ idrisMain opts =
1275 mapM_ addLangExt (opt getLanguageExt opts)
1301 mapM_ addLangExt (opt getLanguageExt opts)
1276 setREPL runrepl
1302 setREPL runrepl
1277 setQuiet (quiet || isJust script || not (null immediate))
1303 setQuiet (quiet || isJust script || not (null immediate))
1279 setVerbose verbose
1304 setVerbose verbose
1280 setCmdLine opts
1305 setCmdLine opts
1281 setOutputTy outty
1306 setOutputTy outty
@@ -1359,7 +1384,8 @@ idrisMain opts =
1359-- clearOrigPats
1384-- clearOrigPats
1360 startServer orig inputs
1385 startServer orig inputs
1361 runInputT (replSettings (Just historyFile)) $ repl orig inputs
1386 runInputT (replSettings (Just historyFile)) $ repl orig inputs
1387+ let idesock = IdeslaveSocket `elem` opts
1362− when (idesl) $ ideslaveStart orig inputs
1388+ when (idesl) $ ideslaveStart idesock orig inputs
1363 ok <- noErrors
1389 ok <- noErrors
1364 when (not ok) $ runIO (exitWith (ExitFailure 1))
1390 when (not ok) $ runIO (exitWith (ExitFailure 1))