How to readline in Haskell without transfer to the next line?
<p>I am trying to use readline in Haskell without transfer cursor to the next line.</p>

<p>For example, I wrote the following code:</p>

<pre><code>readEvalPrintLoop :: IO()
readEvalPrintLoop = do
    line &lt;- getLine
    case line of
            "bye" -&gt; return ()
            line   -&gt; do putStrLn $ interpret line
                         readEvalPrintLoop
</code></pre>

<p>After starting the program:</p>

<pre><code>&gt; 1 2 + . &lt;enter&gt;
3
</code></pre>

<p>But I want <strong>to find the easiest way to get follow</strong>:</p>

<pre><code>&gt; 1 2 + . &lt;enter&gt; 3
</code></pre>