I've got a series of network requests, that each take >10 seconds.
So that the user knows what's happening, I give updates:
main = do putStr "Downloading the first thing... "
{- Net request -}
putStrLn "DONE"
putStr "Downloading the second thing... "
{- Net request -}
putStrLn "DONE"
With GHCi this works as expected, but compiled or with runghc, "Downloading" doesn't print till "DONE" does.
I've rewritten it with (>>=) and (>>), but I get the same problem.
What's going on?