From 2b6a011551ecef37f9f02a9fb5be508974a0dabc Mon Sep 17 00:00:00 2001 From: Joshua Moerman Date: Thu, 17 Jan 2019 15:01:40 +0100 Subject: [PATCH] Adds hFlush for IO --- app/LStar.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/LStar.hs b/app/LStar.hs index 53c4166..d24a8ec 100644 --- a/app/LStar.hs +++ b/app/LStar.hs @@ -15,6 +15,7 @@ import qualified EquivariantSet as Set import Data.List (tails) import Control.Monad.State +import System.IO (hFlush, stdout) import Prelude hiding (filter, null, elem, lookup, product, Word, map, take, init) -- We use Lists, as they provide a bit more laziness @@ -158,6 +159,7 @@ askMember w = do putStr "MQ \"" putStr (toStr w) putStrLn "\"" + hFlush stdout a <- getLine case a of "Y" -> return True @@ -169,6 +171,7 @@ askEquiv aut = do putStr "EQ \"" putStr (toStr aut) putStrLn "\"" + hFlush stdout a <- getLine case a of "Y" -> return Nothing @@ -186,6 +189,7 @@ init alph = Observations main :: IO () main = do putStrLn "ALPHABET" + hFlush stdout alph <- getLine case alph of "ATOMS" -> do