fix: prompt was not visible outside interactive mode, flush stdout so it's visible

This commit is contained in:
wi11-holdsworth 2025-09-25 11:15:07 +10:00
parent c8079cb914
commit 4ecd8803af

View file

@ -9,6 +9,7 @@ module Main where
import Data.List
import Data.Maybe
import Proj2
import System.IO (hFlush, stdout)
-- | Guess the given target, counting and showing the guesses.
guessTest :: [Pitch] -> IO ()
@ -39,5 +40,6 @@ toChord = fromJust . mapM toPitch . words
main :: IO ()
main = do
putStr "Target chord (3 pitches separated by spaces): "
hFlush stdout
text <- getLine
guessTest $ toChord text