fn read_input(rl: &mut Editor<()>, prompt: &str, history: bool) -> Option<String> {
    let raw_readline = rl.readline(prompt);
    match raw_readline {
        Ok(raw_readline) => {
            if history {
                rl.add_history_entry(&raw_readline);
            }
            let trimmed = raw_readline.trim();
            Some(trimmed.to_string())
        }
        Err(ReadlineError::Interrupted) => {
            println!("Exiting!");
            None
        }
        Err(ReadlineError::Eof) => {
            println!("Exiting!");
            None
        }
        Err(err) => {
            println!("Error: {:?}", err);
            None
        }
    }
}
Reads a line of input, returning the read line or `None` if an error occurred
or the user exits.
weld-repl/src/main.rs