on master help sign in
Merge pull request #852 from david-christiansen/ideslave-really-no-curses
bbee4afEdwin Brady
src/Idris/AbsSyntax.hs+7−2
@@ -425,14 +425,19 @@ renderWidth = do iw <- getWidth
425
425
426iRender :: Doc a -> Idris (SimpleDoc a)
426iRender :: Doc a -> Idris (SimpleDoc a)
427iRender d = do w <- getWidth
427iRender d = do w <- getWidth
428+ ist <- getIState
429+ let ideSlave = case idris_outputmode ist of
430+ IdeSlave _ -> True
431+ _ -> False
428 case w of
432 case w of
429 InfinitelyWide -> return $ renderPretty 1.0 1000000000 d
433 InfinitelyWide -> return $ renderPretty 1.0 1000000000 d
430 ColsWide n -> return $
434 ColsWide n -> return $
431 if n < 1
435 if n < 1
432 then renderPretty 1.0 1000000000 d
436 then renderPretty 1.0 1000000000 d
433 else renderPretty 0.8 n d
437 else renderPretty 0.8 n d
438+ AutomaticWidth | ideSlave -> return $ renderPretty 1.0 1000000000 d
434− AutomaticWidth -> do width <- runIO getScreenWidth
439+ | otherwise -> do width <- runIO getScreenWidth
435− return $ renderPretty 0.8 width d
440+ return $ renderPretty 0.8 width d
436
441
437ihPrintResult :: Handle -> String -> Idris ()
442ihPrintResult :: Handle -> String -> Idris ()
438ihPrintResult h s = do i <- getIState
443ihPrintResult h s = do i <- getIState
src/Idris/IBC.hs+8−1
@@ -26,7 +26,7 @@ import Util.Zlib (decompressEither)
26
26
27
27
28ibcVersion :: Word8
28ibcVersion :: Word8
29−ibcVersion = 58
29+ibcVersion = 59
30
30
31
31
32data IBCFile = IBCFile { ver :: Word8,
32data IBCFile = IBCFile { ver :: Word8,
@@ -1650,6 +1650,10 @@ instance Binary PTerm where
1650 put x1
1650 put x1
1651 PNoImplicits x1 -> do putWord8 36
1651 PNoImplicits x1 -> do putWord8 36
1652 put x1
1652 put x1
1653+ PDisamb x1 x2 -> do putWord8 37
1654+ put x1
1655+ put x2
1656+
1653 get
1657 get
1654 = do i <- getWord8
1658 = do i <- getWord8
1655 case i of
1659 case i of
@@ -1759,6 +1763,9 @@ instance Binary PTerm where
1759 return (PUnifyLog x1)
1763 return (PUnifyLog x1)
1760 36 -> do x1 <- get
1764 36 -> do x1 <- get
1761 return (PNoImplicits x1)
1765 return (PNoImplicits x1)
1766+ 37 -> do x1 <- get
1767+ x2 <- get
1768+ return (PDisamb x1 x2)
1762 _ -> error "Corrupted binary data for PTerm"
1769 _ -> error "Corrupted binary data for PTerm"
1763
1770
1764instance (Binary t) => Binary (PTactic' t) where
1771instance (Binary t) => Binary (PTactic' t) where