fix: prompt was not visible outside interactive mode, flush stdout so it's visible
This commit is contained in:
parent
c8079cb914
commit
4ecd8803af
1 changed files with 2 additions and 0 deletions
2
Main.hs
2
Main.hs
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue