mirror of
https://github.com/Jaxan/ons-hs.git
synced 2025-04-27 22:57:44 +02:00
Adds hFlush for IO
This commit is contained in:
parent
2ee2f091cb
commit
2b6a011551
1 changed files with 4 additions and 0 deletions
|
@ -15,6 +15,7 @@ import qualified EquivariantSet as Set
|
||||||
|
|
||||||
import Data.List (tails)
|
import Data.List (tails)
|
||||||
import Control.Monad.State
|
import Control.Monad.State
|
||||||
|
import System.IO (hFlush, stdout)
|
||||||
import Prelude hiding (filter, null, elem, lookup, product, Word, map, take, init)
|
import Prelude hiding (filter, null, elem, lookup, product, Word, map, take, init)
|
||||||
|
|
||||||
-- We use Lists, as they provide a bit more laziness
|
-- We use Lists, as they provide a bit more laziness
|
||||||
|
@ -158,6 +159,7 @@ askMember w = do
|
||||||
putStr "MQ \""
|
putStr "MQ \""
|
||||||
putStr (toStr w)
|
putStr (toStr w)
|
||||||
putStrLn "\""
|
putStrLn "\""
|
||||||
|
hFlush stdout
|
||||||
a <- getLine
|
a <- getLine
|
||||||
case a of
|
case a of
|
||||||
"Y" -> return True
|
"Y" -> return True
|
||||||
|
@ -169,6 +171,7 @@ askEquiv aut = do
|
||||||
putStr "EQ \""
|
putStr "EQ \""
|
||||||
putStr (toStr aut)
|
putStr (toStr aut)
|
||||||
putStrLn "\""
|
putStrLn "\""
|
||||||
|
hFlush stdout
|
||||||
a <- getLine
|
a <- getLine
|
||||||
case a of
|
case a of
|
||||||
"Y" -> return Nothing
|
"Y" -> return Nothing
|
||||||
|
@ -186,6 +189,7 @@ init alph = Observations
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main = do
|
||||||
putStrLn "ALPHABET"
|
putStrLn "ALPHABET"
|
||||||
|
hFlush stdout
|
||||||
alph <- getLine
|
alph <- getLine
|
||||||
case alph of
|
case alph of
|
||||||
"ATOMS" -> do
|
"ATOMS" -> do
|
||||||
|
|
Loading…
Add table
Reference in a new issue