Thanks a lot. .this really helps..

On Feb 3, 2015 10:35 PM, "Tristan Seligmann" <mithrandi@mithrandi.net> wrote:
On 4 February 2015 at 05:23, Madhu Babu <madhub.bits@gmail.com> wrote:
> Basically, in the following code, we print a line first and the read the
> line from stdin. This behavior works perfectly fine when using “runhaskell
> guess.hs”. But when i say “./guess”, i had to type in a number directly (
> i.e. first prompt is skipped ).

This is most likely due to stdio buffering; usually stdin/stdout are
line buffered, so data you write with putStr may not actually be
written until a newline is written. This post / thread details some
ways to handle this problem:

https://www.haskell.org/pipermail/beginners/2010-March/003692.html
--
mithrandi, i Ainil en-Balandor, a faer Ambar