diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2025-03-27 22:01:39 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-03-27 22:01:39 +0100 |
commit | f739541b7e9ef680cc6473d0303f6e1892ddc4f7 (patch) | |
tree | 984f1d4a4674082feff296f3aa5aed8b581ba033 /main | |
parent | c536547d742cde13042792e60f28893578adc331 (diff) |
Build with ansi-terminal-0.11devel
Present in Debian bookworm.
Diffstat (limited to 'main')
-rw-r--r-- | main/Terminal.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/main/Terminal.hs b/main/Terminal.hs index 63b8ea2..5dc3612 100644 --- a/main/Terminal.hs +++ b/main/Terminal.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + module Terminal ( Terminal, hasTerminalUI, @@ -72,7 +74,11 @@ hasTerminalUI = termAnsi initTerminal :: CompletionFunc IO -> IO Terminal initTerminal termCompletionFunc = do termLock <- newMVar () +#if MIN_VERSION_ansi_terminal(1, 0, 1) termAnsi <- hNowSupportsANSI stdout +#else + termAnsi <- hSupportsANSI stdout +#endif termPrompt <- newTVarIO "" termShowPrompt <- newTVarIO False termInput <- newTVarIO ( "", "" ) |