diff --git a/bidir/src/main.rs b/bidir/src/main.rs index 0a9e1f3..9bdd70a 100644 --- a/bidir/src/main.rs +++ b/bidir/src/main.rs @@ -1,11 +1,12 @@ use anyhow::Result; use bidir::{bidir::synthesize, data::Context, parser::TermParser}; -use rustyline::DefaultEditor; +use rustyline::{Config, DefaultEditor}; fn main() -> Result<()> { let term_parser = TermParser::new(); - let mut rl = DefaultEditor::new()?; + let rl_config = Config::builder().auto_add_history(true).build(); + let mut rl = DefaultEditor::with_config(rl_config)?; loop { let line = match rl.readline(">> ") { @@ -17,7 +18,7 @@ fn main() -> Result<()> { let parsed_term = match term_parser.parse(&line) { Ok(term) => term, Err(err) => { - eprintln!("SHIET sucks bro: {err}"); + eprintln!("parser error: {err}"); continue; } };