on master help sign in
Make IdeSlave mode follow :consolewidth commands
commit49df32953856348f8f4a669bd5ea809f066d04ee authorMelvar Chen <Melvar.Chen@googlemail.com> dateMon 3 Feb 2014, 18:00 (13 years ago) parent1953d4a
2 files changed+7−5
src/Idris/AbsSyntax.hs+5−5 src/Idris/REPL.hs+2
src/Idris/AbsSyntax.hs+5−5
@@ -456,11 +456,11 @@ consoleDisplayAnnotated h output = do ist <- getIState
456456-- | Write pretty-printed output to IDESlave with semantic annotations
457457ideSlaveReturnAnnotated :: Integer -> Handle -> Doc OutputAnnotation -> Idris ()
458458ideSlaveReturnAnnotated n h out = do ist <- getIState
459− let (str, spans) = displaySpans .
460− renderPretty 0.8 80 .
461− fmap (fancifyAnnots ist) $
462− out
463− good = [SymbolAtom "ok", toSExp str, toSExp spans]
459+ (str, spans) <- fmap displaySpans .
460+ iRender .
461+ fmap (fancifyAnnots ist) $
462+ out
463+ let good = [SymbolAtom "ok", toSExp str, toSExp spans]
464464 runIO . hPutStrLn h $ convSExp "return" good n
465465
466466ihPrintTermWithType :: Handle -> Doc OutputAnnotation -> Doc OutputAnnotation -> Idris ()
src/Idris/REPL.hs+2
@@ -325,6 +325,8 @@ ideslaveProcess fn (AddClauseFrom False pos str) = process stdout fn (AddClauseF
325325ideslaveProcess fn (AddMissing False pos str) = process stdout fn (AddMissing False pos str)
326326ideslaveProcess fn (MakeWith False pos str) = process stdout fn (MakeWith False pos str)
327327ideslaveProcess fn (DoProofSearch False pos str xs) = process stdout fn (DoProofSearch False pos str xs)
328+ideslaveProcess fn (SetConsoleWidth w) = do process stdout fn (SetConsoleWidth w)
329+ iPrintResult ""
328330ideslaveProcess fn _ = iPrintError "command not recognized or not supported"
329331
330332