Use terminal-size library
It still doesn't work yet in GHCID or GHCIWatch, but it seems more likely to, and it runs a lot faster.
This commit is contained in:
parent
98acc016a6
commit
83b14ed6ed
@ -16,11 +16,11 @@ import Puzzles.Day6 qualified as Day6
|
||||
import Puzzles.Day7 qualified as Day7
|
||||
import Puzzles.Day8 qualified as Day8
|
||||
import Puzzles.Day9 qualified as Day9
|
||||
import System.Console.ANSI (getTerminalSize)
|
||||
import System.Console.Terminal.Size qualified as Terminal.Size
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
-- terminalWidth <- fmap snd <$> getTerminalSize -- TODO this doesn't work in GHCID or GHCIWatch...
|
||||
-- terminalWidth <- fmap Terminal.Size.width <$> Terminal.Size.size -- TODO this doesn't work in GHCID or GHCIWatch...
|
||||
terminalWidth <- pure $ Just 60
|
||||
putStrLn $ drawTree $ show <$> getTestTree tests
|
||||
TL.putStrLn . displayTestResultsConsole terminalWidth =<< runTests () tests
|
||||
|
||||
@ -68,6 +68,7 @@ executable aoc
|
||||
safe,
|
||||
stm,
|
||||
streams,
|
||||
terminal-size,
|
||||
text,
|
||||
time,
|
||||
transformers,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user