summaryrefslogtreecommitdiff
path: root/src/System/IO/Terminal/Render.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/System/IO/Terminal/Render.hs')
-rw-r--r--src/System/IO/Terminal/Render.hs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/System/IO/Terminal/Render.hs b/src/System/IO/Terminal/Render.hs
index 6939c9f..86b5cb3 100644
--- a/src/System/IO/Terminal/Render.hs
+++ b/src/System/IO/Terminal/Render.hs
@@ -49,7 +49,6 @@ module System.IO.Terminal.Render
,module System.IO.Terminal.Characters)
where
-import Control.Concurrent
import Control.Monad.State.Strict
import Data.Array.IO
import Data.Colour.SRGB hiding (RGB)
@@ -131,12 +130,8 @@ withRender act = do
whenM (liftIO $ not <$> hIsTerminalDevice stdout) $
liftIO $ die "ERROR: Stdout is not connected to a terminal!"
- liftIO $ A.hSupportsANSIWithoutEmulation stdout >>= \case
- Just True -> return ()
- Just False -> die "ERROR: Terminal is not capable of interpreting ANSI escape sequences!"
- Nothing -> do
- hPutStrLn stderr "WARNING: Cannot determine terminal capabilities; continuing anyway..."
- threadDelay 1000000
+ liftIO $ whenM (not <$> A.hSupportsANSI stdout) $
+ die "ERROR: Terminal is not capable of interpreting ANSI escape sequences!"
liftIO IO.toAlternateScreen
liftIO A.clearScreen