@@ -22,7 +22,7 @@ import Idris.Primitives
22import Idris.Coverage
22import Idris.Coverage
23import Idris.Docs hiding (Doc)
23import Idris.Docs hiding (Doc)
24import Idris.Completion
24import Idris.Completion
25−import qualified Idris.IdeSlave as IdeSlave
25+import qualified Idris.IdeMode as IdeMode
26import Idris.Chaser
26import Idris.Chaser
27import Idris.Imports
27import Idris.Imports
28import Idris.Colours hiding (colourise)
28import Idris.Colours hiding (colourise)
@@ -165,7 +165,7 @@ startServer port orig fn_in = do tid <- runIO $ forkOS (serverLoop port)
165 cmd <- hGetLine h
165 cmd <- hGetLine h
166 let isth = case idris_outputmode ist of
166 let isth = case idris_outputmode ist of
167 RawOutput _ -> ist {idris_outputmode = RawOutput h}
167 RawOutput _ -> ist {idris_outputmode = RawOutput h}
168− IdeSlave n _ -> ist {idris_outputmode = IdeSlave n h}
168+ IdeMode n _ -> ist {idris_outputmode = IdeMode n h}
169 (ist', fn) <- processNetCmd orig isth h fn cmd
169 (ist', fn) <- processNetCmd orig isth h fn cmd
171 loop fn ist' sock
171 loop fn ist' sock
@@ -204,7 +204,7 @@ processNetCmd orig i h fn cmd
204 do ist <- getIState
204 do ist <- getIState
205 putIState $ case idris_outputmode ist of
205 putIState $ case idris_outputmode ist of
206 RawOutput _ -> ist {idris_outputmode = RawOutput h}
206 RawOutput _ -> ist {idris_outputmode = RawOutput h}
207− IdeSlave n _ -> ist {idris_outputmode = IdeSlave n h}
207+ IdeMode n _ -> ist {idris_outputmode = IdeMode n h}
209-- | Run a command on the server on localhost
209-- | Run a command on the server on localhost
210runClient :: PortID -> String -> IO ()
210runClient :: PortID -> String -> IO ()
@@ -232,25 +232,25 @@ runClient port str = withSocketsDo $ do
232 putStrLn "Unable to connect to a running Idris repl"
232 putStrLn "Unable to connect to a running Idris repl"
235−initIdeslaveSocket :: IO Handle
235+initIdemodeSocket :: IO Handle
236−initIdeslaveSocket = do
236+initIdemodeSocket = do
237 (sock, port) <- listenOnLocalhostAnyPort
237 (sock, port) <- listenOnLocalhostAnyPort
238 putStrLn $ show port
238 putStrLn $ show port
239 (h, _, _) <- accept sock
239 (h, _, _) <- accept sock
240 hSetEncoding h utf8
240 hSetEncoding h utf8
243−-- | Run the IdeSlave
243+-- | Run the IdeMode
244ideslaveStart :: Bool -> IState -> [FilePath] -> Idris ()
244ideslaveStart :: Bool -> IState -> [FilePath] -> Idris ()
245ideslaveStart s orig mods
245ideslaveStart s orig mods
246− = do h <- runIO $ if s then initIdeslaveSocket else return stdout
246+ = do h <- runIO $ if s then initIdemodeSocket else return stdout
247− setIdeSlave True h
247+ setIdeMode True h
248 i <- getIState
248 i <- getIState
249 case idris_outputmode i of
249 case idris_outputmode i of
250− IdeSlave n h ->
250+ IdeMode n h ->
251− do runIO $ hPutStrLn h $ IdeSlave.convSExp "protocol-version" IdeSlave.ideSlaveEpoch n
251+ do runIO $ hPutStrLn h $ IdeMode.convSExp "protocol-version" IdeMode.ideModeEpoch n
252 case mods of
252 case mods of
253− a:_ -> runIdeSlaveCommand h n i "" [] (IdeSlave.LoadFile a Nothing)
253+ a:_ -> runIdeModeCommand h n i "" [] (IdeMode.LoadFile a Nothing)
254 _ -> return ()
254 _ -> return ()
255 ideslave h orig mods
255 ideslave h orig mods
@@ -258,36 +258,36 @@ ideslave :: Handle -> IState -> [FilePath] -> Idris ()
258ideslave h orig mods
258ideslave h orig mods
259 = do idrisCatch
259 = do idrisCatch
260 (do let inh = if h == stdout then stdin else h
260 (do let inh = if h == stdout then stdin else h
261− len' <- runIO $ IdeSlave.getLen inh
261+ len' <- runIO $ IdeMode.getLen inh
262 len <- case len' of
262 len <- case len' of
263 Left err -> ierror err
263 Left err -> ierror err
264 Right n -> return n
264 Right n -> return n
265− l <- runIO $ IdeSlave.getNChar inh len ""
265+ l <- runIO $ IdeMode.getNChar inh len ""
266− (sexp, id) <- case IdeSlave.parseMessage l of
266+ (sexp, id) <- case IdeMode.parseMessage l of
267 Left err -> ierror err
267 Left err -> ierror err
268 Right (sexp, id) -> return (sexp, id)
268 Right (sexp, id) -> return (sexp, id)
269 i <- getIState
269 i <- getIState
270− putIState $ i { idris_outputmode = (IdeSlave id h) }
270+ putIState $ i { idris_outputmode = (IdeMode id h) }
271 idrisCatch -- to report correct id back!
271 idrisCatch -- to report correct id back!
272 (do let fn = case mods of
272 (do let fn = case mods of
273 (f:_) -> f
273 (f:_) -> f
275− case IdeSlave.sexpToCommand sexp of
275+ case IdeMode.sexpToCommand sexp of
276− Just cmd -> runIdeSlaveCommand h id orig fn mods cmd
276+ Just cmd -> runIdeModeCommand h id orig fn mods cmd
277 Nothing -> iPrintError "did not understand" )
277 Nothing -> iPrintError "did not understand" )
278 (\e -> do iPrintError $ show e))
278 (\e -> do iPrintError $ show e))
279 (\e -> do iPrintError $ show e)
279 (\e -> do iPrintError $ show e)
280 ideslave h orig mods
280 ideslave h orig mods
282−-- | Run IDESlave commands
282+-- | Run IDEMode commands
283−runIdeSlaveCommand :: Handle -- ^^ The handle for communication
283+runIdeModeCommand :: Handle -- ^^ The handle for communication
284 -> Integer -- ^^ The continuation ID for the client
284 -> Integer -- ^^ The continuation ID for the client
285 -> IState -- ^^ The original IState
285 -> IState -- ^^ The original IState
286 -> FilePath -- ^^ The current open file
286 -> FilePath -- ^^ The current open file
287 -> [FilePath] -- ^^ The currently loaded modules
287 -> [FilePath] -- ^^ The currently loaded modules
288− -> IdeSlave.IdeSlaveCommand -- ^^ The command to process
288+ -> IdeMode.IdeModeCommand -- ^^ The command to process
289 -> Idris ()
289 -> Idris ()
290−runIdeSlaveCommand h id orig fn mods (IdeSlave.Interpret cmd) =
290+runIdeModeCommand h id orig fn mods (IdeMode.Interpret cmd) =
291 do c <- colourise
291 do c <- colourise
292 i <- getIState
292 i <- getIState
293 case parseCmd i "(input)" cmd of
293 case parseCmd i "(input)" cmd of
@@ -297,96 +297,96 @@ runIdeSlaveCommand h id orig fn mods (IdeSlave.Interpret cmd) =
297 (do process fn (Prove n')
297 (do process fn (Prove n')
298 isetPrompt (mkPrompt mods)
298 isetPrompt (mkPrompt mods)
299 case idris_outputmode i of
299 case idris_outputmode i of
300− IdeSlave n h -> -- signal completion of proof to ide
300+ IdeMode n h -> -- signal completion of proof to ide
301 runIO . hPutStrLn h $
301 runIO . hPutStrLn h $
302− IdeSlave.convSExp "return"
302+ IdeMode.convSExp "return"
303− (IdeSlave.SymbolAtom "ok", "")
303+ (IdeMode.SymbolAtom "ok", "")
305 _ -> return ())
305 _ -> return ())
306 (\e -> do ist <- getIState
306 (\e -> do ist <- getIState
307 isetPrompt (mkPrompt mods)
307 isetPrompt (mkPrompt mods)
308 case idris_outputmode i of
308 case idris_outputmode i of
309− IdeSlave n h ->
309+ IdeMode n h ->
310 runIO . hPutStrLn h $
310 runIO . hPutStrLn h $
311− IdeSlave.convSExp "abandon-proof" "Abandoned" n
311+ IdeMode.convSExp "abandon-proof" "Abandoned" n
312 _ -> return ()
312 _ -> return ()
313 iRenderError $ pprintErr ist e)
313 iRenderError $ pprintErr ist e)
314 Success (Right cmd) -> idrisCatch
314 Success (Right cmd) -> idrisCatch
315 (ideslaveProcess fn cmd)
315 (ideslaveProcess fn cmd)
316 (\e -> getIState >>= iRenderError . flip pprintErr e)
316 (\e -> getIState >>= iRenderError . flip pprintErr e)
317 Success (Left err) -> iPrintError err
317 Success (Left err) -> iPrintError err
318−runIdeSlaveCommand h id orig fn mods (IdeSlave.REPLCompletions str) =
318+runIdeModeCommand h id orig fn mods (IdeMode.REPLCompletions str) =
319 do (unused, compls) <- replCompletion (reverse str, "")
319 do (unused, compls) <- replCompletion (reverse str, "")
320− let good = IdeSlave.SexpList [IdeSlave.SymbolAtom "ok",
320+ let good = IdeMode.SexpList [IdeMode.SymbolAtom "ok",
321− IdeSlave.toSExp (map replacement compls,
321+ IdeMode.toSExp (map replacement compls,
322 reverse unused)]
322 reverse unused)]
323− runIO . hPutStrLn h $ IdeSlave.convSExp "return" good id
323+ runIO . hPutStrLn h $ IdeMode.convSExp "return" good id
324−runIdeSlaveCommand h id orig fn mods (IdeSlave.LoadFile filename toline) =
324+runIdeModeCommand h id orig fn mods (IdeMode.LoadFile filename toline) =
325 do i <- getIState
325 do i <- getIState
327 putIState (orig { idris_options = idris_options i,
327 putIState (orig { idris_options = idris_options i,
328− idris_outputmode = (IdeSlave id h) })
328+ idris_outputmode = (IdeMode id h) })
329 mods <- loadInputs [filename] toline
329 mods <- loadInputs [filename] toline
330 isetPrompt (mkPrompt mods)
330 isetPrompt (mkPrompt mods)
331 -- Report either success or failure
331 -- Report either success or failure
332 i <- getIState
332 i <- getIState
333 case (errSpan i) of
333 case (errSpan i) of
334− Nothing -> let msg = maybe (IdeSlave.SexpList [IdeSlave.SymbolAtom "ok",
334+ Nothing -> let msg = maybe (IdeMode.SexpList [IdeMode.SymbolAtom "ok",
335− IdeSlave.SexpList []])
335+ IdeMode.SexpList []])
336− (\fc -> IdeSlave.SexpList [IdeSlave.SymbolAtom "ok",
336+ (\fc -> IdeMode.SexpList [IdeMode.SymbolAtom "ok",
337− IdeSlave.toSExp fc])
337+ IdeMode.toSExp fc])
338 (idris_parsedSpan i)
338 (idris_parsedSpan i)
339− in runIO . hPutStrLn h $ IdeSlave.convSExp "return" msg id
339+ in runIO . hPutStrLn h $ IdeMode.convSExp "return" msg id
340 Just x -> iPrintError $ "didn't load " ++ filename
340 Just x -> iPrintError $ "didn't load " ++ filename
341 ideslave h orig mods
341 ideslave h orig mods
342−runIdeSlaveCommand h id orig fn mods (IdeSlave.TypeOf name) =
342+runIdeModeCommand h id orig fn mods (IdeMode.TypeOf name) =
343 case splitName name of
343 case splitName name of
344 Left err -> iPrintError err
344 Left err -> iPrintError err
345 Right n -> process "(ideslave)"
345 Right n -> process "(ideslave)"
346 (Check (PRef (FC "(ideslave)" (0,0) (0,0)) n))
346 (Check (PRef (FC "(ideslave)" (0,0) (0,0)) n))
347−runIdeSlaveCommand h id orig fn mods (IdeSlave.DocsFor name) =
347+runIdeModeCommand h id orig fn mods (IdeMode.DocsFor name) =
348 case parseConst orig name of
348 case parseConst orig name of
349 Success c -> process "(ideslave)" (DocStr (Right c))
349 Success c -> process "(ideslave)" (DocStr (Right c))
350 Failure _ ->
350 Failure _ ->
351 case splitName name of
351 case splitName name of
352 Left err -> iPrintError err
352 Left err -> iPrintError err
353 Right n -> process "(ideslave)" (DocStr (Left n))
353 Right n -> process "(ideslave)" (DocStr (Left n))
354−runIdeSlaveCommand h id orig fn mods (IdeSlave.CaseSplit line name) =
354+runIdeModeCommand h id orig fn mods (IdeMode.CaseSplit line name) =
355 process fn (CaseSplitAt False line (sUN name))
355 process fn (CaseSplitAt False line (sUN name))
356−runIdeSlaveCommand h id orig fn mods (IdeSlave.AddClause line name) =
356+runIdeModeCommand h id orig fn mods (IdeMode.AddClause line name) =
357 process fn (AddClauseFrom False line (sUN name))
357 process fn (AddClauseFrom False line (sUN name))
358−runIdeSlaveCommand h id orig fn mods (IdeSlave.AddProofClause line name) =
358+runIdeModeCommand h id orig fn mods (IdeMode.AddProofClause line name) =
359 process fn (AddProofClauseFrom False line (sUN name))
359 process fn (AddProofClauseFrom False line (sUN name))
360−runIdeSlaveCommand h id orig fn mods (IdeSlave.AddMissing line name) =
360+runIdeModeCommand h id orig fn mods (IdeMode.AddMissing line name) =
361 process fn (AddMissing False line (sUN name))
361 process fn (AddMissing False line (sUN name))
362−runIdeSlaveCommand h id orig fn mods (IdeSlave.MakeWithBlock line name) =
362+runIdeModeCommand h id orig fn mods (IdeMode.MakeWithBlock line name) =
363 process fn (MakeWith False line (sUN name))
363 process fn (MakeWith False line (sUN name))
364−runIdeSlaveCommand h id orig fn mods (IdeSlave.ProofSearch r line name hints depth) =
364+runIdeModeCommand h id orig fn mods (IdeMode.ProofSearch r line name hints depth) =
365 doProofSearch fn False r line (sUN name) (map sUN hints) depth
365 doProofSearch fn False r line (sUN name) (map sUN hints) depth
366−runIdeSlaveCommand h id orig fn mods (IdeSlave.MakeLemma line name) =
366+runIdeModeCommand h id orig fn mods (IdeMode.MakeLemma line name) =
367 case splitName name of
367 case splitName name of
368 Left err -> iPrintError err
368 Left err -> iPrintError err
369 Right n -> process fn (MakeLemma False line n)
369 Right n -> process fn (MakeLemma False line n)
370−runIdeSlaveCommand h id orig fn mods (IdeSlave.Apropos a) =
370+runIdeModeCommand h id orig fn mods (IdeMode.Apropos a) =
371 process fn (Apropos [] a)
371 process fn (Apropos [] a)
372−runIdeSlaveCommand h id orig fn mods (IdeSlave.GetOpts) =
372+runIdeModeCommand h id orig fn mods (IdeMode.GetOpts) =
373 do ist <- getIState
373 do ist <- getIState
374 let opts = idris_options ist
374 let opts = idris_options ist
375 let impshow = opt_showimp opts
375 let impshow = opt_showimp opts
376 let errCtxt = opt_errContext opts
376 let errCtxt = opt_errContext opts
377− let options = (IdeSlave.SymbolAtom "ok",
377+ let options = (IdeMode.SymbolAtom "ok",
378− [(IdeSlave.SymbolAtom "show-implicits", impshow),
378+ [(IdeMode.SymbolAtom "show-implicits", impshow),
379− (IdeSlave.SymbolAtom "error-context", errCtxt)])
379+ (IdeMode.SymbolAtom "error-context", errCtxt)])
380− runIO . hPutStrLn h $ IdeSlave.convSExp "return" options id
380+ runIO . hPutStrLn h $ IdeMode.convSExp "return" options id
381−runIdeSlaveCommand h id orig fn mods (IdeSlave.SetOpt IdeSlave.ShowImpl b) =
381+runIdeModeCommand h id orig fn mods (IdeMode.SetOpt IdeMode.ShowImpl b) =
382 do setImpShow b
382 do setImpShow b
383− let msg = (IdeSlave.SymbolAtom "ok", b)
383+ let msg = (IdeMode.SymbolAtom "ok", b)
384− runIO . hPutStrLn h $ IdeSlave.convSExp "return" msg id
384+ runIO . hPutStrLn h $ IdeMode.convSExp "return" msg id
385−runIdeSlaveCommand h id orig fn mods (IdeSlave.SetOpt IdeSlave.ErrContext b) =
385+runIdeModeCommand h id orig fn mods (IdeMode.SetOpt IdeMode.ErrContext b) =
386 do setErrContext b
386 do setErrContext b
387− let msg = (IdeSlave.SymbolAtom "ok", b)
387+ let msg = (IdeMode.SymbolAtom "ok", b)
388− runIO . hPutStrLn h $ IdeSlave.convSExp "return" msg id
388+ runIO . hPutStrLn h $ IdeMode.convSExp "return" msg id
389−runIdeSlaveCommand h id orig fn mods (IdeSlave.Metavariables cols) =
389+runIdeModeCommand h id orig fn mods (IdeMode.Metavariables cols) =
390 do ist <- getIState
390 do ist <- getIState
391 let mvs = reverse $ map fst (idris_metavars ist) \\ primDefs
391 let mvs = reverse $ map fst (idris_metavars ist) \\ primDefs
392 let ppo = ppOptionIst ist
392 let ppo = ppOptionIst ist
@@ -403,7 +403,7 @@ runIdeSlaveCommand h id orig fn mods (IdeSlave.Metavariables cols) =
403 render ist bnd c pc))
403 render ist bnd c pc))
405 runIO . hPutStrLn h $
405 runIO . hPutStrLn h $
406− IdeSlave.convSExp "return" (IdeSlave.SymbolAtom "ok", mvOutput) id
406+ IdeMode.convSExp "return" (IdeMode.SymbolAtom "ok", mvOutput) id
407 where mapPair f g xs = zip (map (f . fst) xs) (map (g . snd) xs)
407 where mapPair f g xs = zip (map (f . fst) xs) (map (g . snd) xs)
408 mapSnd f xs = zip (map fst xs) (map (f . snd) xs)
408 mapSnd f xs = zip (map fst xs) (map (f . snd) xs)
@@ -447,32 +447,32 @@ runIdeSlaveCommand h id orig fn mods (IdeSlave.Metavariables cols) =
447 let (out, spans) = render ist bnd t pt in
447 let (out, spans) = render ist bnd t pt in
448 (show n , out, spans)
448 (show n , out, spans)
450−runIdeSlaveCommand h id orig fn mods (IdeSlave.WhoCalls n) =
450+runIdeModeCommand h id orig fn mods (IdeMode.WhoCalls n) =
451 case splitName n of
451 case splitName n of
452 Left err -> iPrintError err
452 Left err -> iPrintError err
453 Right n -> do calls <- whoCalls n
453 Right n -> do calls <- whoCalls n
454 ist <- getIState
454 ist <- getIState
455− let msg = (IdeSlave.SymbolAtom "ok",
455+ let msg = (IdeMode.SymbolAtom "ok",
456 map (\ (n,ns) -> (pn ist n, map (pn ist) ns)) calls)
456 map (\ (n,ns) -> (pn ist n, map (pn ist) ns)) calls)
457− runIO . hPutStrLn h $ IdeSlave.convSExp "return" msg id
457+ runIO . hPutStrLn h $ IdeMode.convSExp "return" msg id
458 where pn ist = displaySpans .
458 where pn ist = displaySpans .
459 renderPretty 0.9 1000 .
459 renderPretty 0.9 1000 .
460 fmap (fancifyAnnots ist) .
460 fmap (fancifyAnnots ist) .
461 prettyName True True []
461 prettyName True True []
462−runIdeSlaveCommand h id orig fn mods (IdeSlave.CallsWho n) =
462+runIdeModeCommand h id orig fn mods (IdeMode.CallsWho n) =
463 case splitName n of
463 case splitName n of
464 Left err -> iPrintError err
464 Left err -> iPrintError err
465 Right n -> do calls <- callsWho n
465 Right n -> do calls <- callsWho n
466 ist <- getIState
466 ist <- getIState
467− let msg = (IdeSlave.SymbolAtom "ok",
467+ let msg = (IdeMode.SymbolAtom "ok",
468 map (\ (n,ns) -> (pn ist n, map (pn ist) ns)) calls)
468 map (\ (n,ns) -> (pn ist n, map (pn ist) ns)) calls)
469− runIO . hPutStrLn h $ IdeSlave.convSExp "return" msg id
469+ runIO . hPutStrLn h $ IdeMode.convSExp "return" msg id
470 where pn ist = displaySpans .
470 where pn ist = displaySpans .
471 renderPretty 0.9 1000 .
471 renderPretty 0.9 1000 .
472 fmap (fancifyAnnots ist) .
472 fmap (fancifyAnnots ist) .
473 prettyName True True []
473 prettyName True True []
475−runIdeSlaveCommand h id orig fn modes (IdeSlave.TermNormalise bnd tm) =
475+runIdeModeCommand h id orig fn modes (IdeMode.TermNormalise bnd tm) =
476 do ctxt <- getContext
476 do ctxt <- getContext
477 ist <- getIState
477 ist <- getIState
478 let tm' = force (normaliseAll ctxt [] tm)
478 let tm' = force (normaliseAll ctxt [] tm)
@@ -482,46 +482,46 @@ runIdeSlaveCommand h id orig fn modes (IdeSlave.TermNormalise bnd tm) =
483 (idris_infixes ist)
483 (idris_infixes ist)
484 (delab ist tm'))
484 (delab ist tm'))
485− msg = (IdeSlave.SymbolAtom "ok",
485+ msg = (IdeMode.SymbolAtom "ok",
486 displaySpans .
486 displaySpans .
487 renderPretty 0.9 80 .
487 renderPretty 0.9 80 .
488 fmap (fancifyAnnots ist) $ ptm)
488 fmap (fancifyAnnots ist) $ ptm)
489− runIO . hPutStrLn h $ IdeSlave.convSExp "return" msg id
489+ runIO . hPutStrLn h $ IdeMode.convSExp "return" msg id
490−runIdeSlaveCommand h id orig fn modes (IdeSlave.TermShowImplicits bnd tm) =
490+runIdeModeCommand h id orig fn modes (IdeMode.TermShowImplicits bnd tm) =
491− ideSlaveForceTermImplicits h id bnd True tm
491+ ideModeForceTermImplicits h id bnd True tm
492−runIdeSlaveCommand h id orig fn modes (IdeSlave.TermNoImplicits bnd tm) =
492+runIdeModeCommand h id orig fn modes (IdeMode.TermNoImplicits bnd tm) =
493− ideSlaveForceTermImplicits h id bnd False tm
493+ ideModeForceTermImplicits h id bnd False tm
494−runIdeSlaveCommand h id orig fn mods (IdeSlave.PrintDef name) =
494+runIdeModeCommand h id orig fn mods (IdeMode.PrintDef name) =
495 case splitName name of
495 case splitName name of
496 Left err -> iPrintError err
496 Left err -> iPrintError err
497 Right n -> process "(ideslave)" (PrintDef n)
497 Right n -> process "(ideslave)" (PrintDef n)
498−runIdeSlaveCommand h id orig fn modes (IdeSlave.ErrString e) =
498+runIdeModeCommand h id orig fn modes (IdeMode.ErrString e) =
499 do ist <- getIState
499 do ist <- getIState
500 let out = displayS . renderPretty 1.0 60 $ pprintErr ist e
500 let out = displayS . renderPretty 1.0 60 $ pprintErr ist e
501− msg = (IdeSlave.SymbolAtom "ok", IdeSlave.StringAtom $ out "")
501+ msg = (IdeMode.SymbolAtom "ok", IdeMode.StringAtom $ out "")
502− runIO . hPutStrLn h $ IdeSlave.convSExp "return" msg id
502+ runIO . hPutStrLn h $ IdeMode.convSExp "return" msg id
503−runIdeSlaveCommand h id orig fn modes (IdeSlave.ErrPPrint e) =
503+runIdeModeCommand h id orig fn modes (IdeMode.ErrPPrint e) =
504 do ist <- getIState
504 do ist <- getIState
505 let (out, spans) =
505 let (out, spans) =
506 displaySpans .
506 displaySpans .
507 renderPretty 0.9 80 .
507 renderPretty 0.9 80 .
508 fmap (fancifyAnnots ist) $ pprintErr ist e
508 fmap (fancifyAnnots ist) $ pprintErr ist e
509− msg = (IdeSlave.SymbolAtom "ok", out, spans)
509+ msg = (IdeMode.SymbolAtom "ok", out, spans)
510− runIO . hPutStrLn h $ IdeSlave.convSExp "return" msg id
510+ runIO . hPutStrLn h $ IdeMode.convSExp "return" msg id
512−-- | Show a term for IDESlave with the specified implicitness
512+-- | Show a term for IDEMode with the specified implicitness
513−ideSlaveForceTermImplicits :: Handle -> Integer -> [(Name, Bool)] -> Bool -> Term -> Idris ()
513+ideModeForceTermImplicits :: Handle -> Integer -> [(Name, Bool)] -> Bool -> Term -> Idris ()
514−ideSlaveForceTermImplicits h id bnd impl tm =
514+ideModeForceTermImplicits h id bnd impl tm =
515 do ist <- getIState
515 do ist <- getIState
516 let expl = annotate (AnnTerm bnd tm)
516 let expl = annotate (AnnTerm bnd tm)
517 (pprintPTerm ((ppOptionIst ist) { ppopt_impl = impl })
517 (pprintPTerm ((ppOptionIst ist) { ppopt_impl = impl })
518 bnd [] (idris_infixes ist)
518 bnd [] (idris_infixes ist)
519 (delab ist tm))
519 (delab ist tm))
520− msg = (IdeSlave.SymbolAtom "ok",
520+ msg = (IdeMode.SymbolAtom "ok",
521 displaySpans .
521 displaySpans .
522 renderPretty 0.9 80 .
522 renderPretty 0.9 80 .
523 fmap (fancifyAnnots ist) $ expl)
523 fmap (fancifyAnnots ist) $ expl)
524− runIO . hPutStrLn h $ IdeSlave.convSExp "return" msg id
524+ runIO . hPutStrLn h $ IdeMode.convSExp "return" msg id
526splitName :: String -> Either String Name
526splitName :: String -> Either String Name
527splitName s = case reverse $ splitOn "." s of
527splitName s = case reverse $ splitOn "." s of
@@ -1101,8 +1101,8 @@ process fn Execute
1101 case idris_outputmode ist of
1101 case idris_outputmode ist of
1102 RawOutput h -> do runIO $ rawSystem tmpn []
1102 RawOutput h -> do runIO $ rawSystem tmpn []
1103 return ()
1103 return ()
1104− IdeSlave n h -> runIO . hPutStrLn h $
1104+ IdeMode n h -> runIO . hPutStrLn h $
1105− IdeSlave.convSExp "run-program" tmpn n)
1105+ IdeMode.convSExp "run-program" tmpn n)
1106 (\e -> getIState >>= iRenderError . flip pprintErr e)
1106 (\e -> getIState >>= iRenderError . flip pprintErr e)
1107 where fc = fileFC "main"
1107 where fc = fileFC "main"
1108process fn (Compile codegen f)
1108process fn (Compile codegen f)
@@ -1487,7 +1487,7 @@ idrisMain opts =
1487 do let inputs = opt getFile opts
1487 do let inputs = opt getFile opts
1488 let quiet = Quiet `elem` opts
1488 let quiet = Quiet `elem` opts
1489 let nobanner = NoBanner `elem` opts
1489 let nobanner = NoBanner `elem` opts
1490− let idesl = Ideslave `elem` opts || IdeslaveSocket `elem` opts
1490+ let idesl = Idemode `elem` opts || IdemodeSocket `elem` opts
1491 let runrepl = not (NoREPL `elem` opts)
1491 let runrepl = not (NoREPL `elem` opts)
1492 let verbose = runrepl || Verbose `elem` opts
1492 let verbose = runrepl || Verbose `elem` opts
1493 let output = opt getOutput opts
1493 let output = opt getOutput opts
@@ -1612,7 +1612,7 @@ idrisMain opts =
1612-- clearOrigPats
1612-- clearOrigPats
1613 startServer port orig mods
1613 startServer port orig mods
1614 runInputT (replSettings (Just historyFile)) $ repl orig mods efile
1614 runInputT (replSettings (Just historyFile)) $ repl orig mods efile
1615− let idesock = IdeslaveSocket `elem` opts
1615+ let idesock = IdemodeSocket `elem` opts
1616 when (idesl) $ ideslaveStart idesock orig inputs
1616 when (idesl) $ ideslaveStart idesock orig inputs
1617 ok <- noErrors
1617 ok <- noErrors
1618 when (not ok) $ runIO (exitWith (ExitFailure 1))
1618 when (not ok) $ runIO (exitWith (ExitFailure 1))