I'm writing a console application that needs to prompt the user for several things. I'm using the turtle library.
My function looks like this:
askInput :: IO (Maybe Text)
askInput = do
echo "Input something: "
s <- readline
return s
But echo
is implemented using putStrLn
and as a result, will print its argument with a trailing newline.
Is there an input function in the turtle library similar to Python's raw_input
, that combines prompting followed by reading the user input?