on master help sign in
Merge pull request #842 from Melvar/ideslave-consolewidth
6a77afaEdwin Brady
src/Idris/AbsSyntax.hs+5−5
@@ -456,11 +456,11 @@ consoleDisplayAnnotated h output = do ist <- getIState
456-- | Write pretty-printed output to IDESlave with semantic annotations
456-- | Write pretty-printed output to IDESlave with semantic annotations
457ideSlaveReturnAnnotated :: Integer -> Handle -> Doc OutputAnnotation -> Idris ()
457ideSlaveReturnAnnotated :: Integer -> Handle -> Doc OutputAnnotation -> Idris ()
458ideSlaveReturnAnnotated n h out = do ist <- getIState
458ideSlaveReturnAnnotated n h out = do ist <- getIState
459− let (str, spans) = displaySpans .
459+ (str, spans) <- fmap displaySpans .
460− renderPretty 0.8 80 .
460+ iRender .
461− fmap (fancifyAnnots ist) $
461+ fmap (fancifyAnnots ist) $
462− out
462+ out
463− good = [SymbolAtom "ok", toSExp str, toSExp spans]
463+ let good = [SymbolAtom "ok", toSExp str, toSExp spans]
464 runIO . hPutStrLn h $ convSExp "return" good n
464 runIO . hPutStrLn h $ convSExp "return" good n
465
465
466ihPrintTermWithType :: Handle -> Doc OutputAnnotation -> Doc OutputAnnotation -> Idris ()
466ihPrintTermWithType :: 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
325ideslaveProcess fn (AddMissing False pos str) = process stdout fn (AddMissing False pos str)
325ideslaveProcess fn (AddMissing False pos str) = process stdout fn (AddMissing False pos str)
326ideslaveProcess fn (MakeWith False pos str) = process stdout fn (MakeWith False pos str)
326ideslaveProcess fn (MakeWith False pos str) = process stdout fn (MakeWith False pos str)
327ideslaveProcess fn (DoProofSearch False pos str xs) = process stdout fn (DoProofSearch False pos str xs)
327ideslaveProcess 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 ""
328ideslaveProcess fn _ = iPrintError "command not recognized or not supported"
330ideslaveProcess fn _ = iPrintError "command not recognized or not supported"
329
331
330
332