Improve interactivity in REPL

E.g.

    λ> do l <- getLine; p <- getLine; print (l ++ p)
    hey
    hey
    "heyhey"
    λ> do l <- getLine; putStrLn "ok"; p <- getLine; print (l ++ p)
    hi
    ok
    world
    "hiworld"