title: Messages printed at the wrong moment with putStr
body: <pre><code>import Control.Monad
  import Data.Char
  
  main = forever $ do
      putStr "Give me some input: "
      l &lt;- getLine
      putStrLn $ map toUpper l
  </code></pre>
  
  <p>I have been learning Haskell from learn you haskell. When i try to run this code it does not behave like it should.</p>
  
  <pre><code>l
  Give me some input: L
  abc
  Give me some input: ABC
  </code></pre>
  
  <p>When i run this it doesn't print the string first and i can input. After providing some input, in this case <code>l</code> it returns me like this : <code>Give me some input: L</code>.</p>
  
  <p>What it should do is, ask for input by printing <code>Give me some input:</code> and after putting the input it shall return the input in uppercase.</p>
  
  <p>How can i fix this?</p>