I am using windows XP, and both in cygwin and cmd, it first pauses to get the input, and then displays the prompt and the hello message in the same line. <br><br><br>c:\haskell&gt;runghc Test.hs<br>test<br>Please Enter Your Name: Hello test<br>
<br>Ali<br><div class="gmail_quote">On Thu, Mar 4, 2010 at 1:13 PM, Deniz Dogan <span dir="ltr">&lt;<a href="mailto:deniz.a.m.dogan@gmail.com">deniz.a.m.dogan@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
2010/3/4 Ali Razavi &lt;<a href="mailto:ali.razavi@gmail.com">ali.razavi@gmail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Why doesn&#39;t this work the way it&#39;s supposed to, or the way it&#39;s intuitively<br>
&gt; apparent from the code, that is, showing the prompt first, getting the line<br>
&gt; next, and printing the result finally?<br>
&gt;<br>
&gt; main = do<br>
&gt;         putStr &quot;Please Enter Your Name: &quot;<br>
&gt;         name &lt;- getLine<br>
&gt;         putStrLn (&quot;Hello &quot; ++ name)<br>
&gt;<br>
&gt;<br>
&gt; changing putStr with putStrLn rectifies it to the expected behavior, but I<br>
&gt; wonder why this version misbehaves. FWIW, I use ghc in cygwin.<br>
&gt;<br>
&gt; Ali<br>
&gt;<br>
<br>
</div></div>FWIW using GHCi in standard Windows Vista, this works like it should.<br>
<br>
--<br>
<font color="#888888">Deniz Dogan<br>
</font></blockquote></div><br>