diff --git a/schala-repl/src/repl/mod.rs b/schala-repl/src/repl/mod.rs index bfd5d63..9eb1924 100644 --- a/schala-repl/src/repl/mod.rs +++ b/schala-repl/src/repl/mod.rs @@ -189,14 +189,20 @@ impl Repl { }; let ref mut language_state = self.get_cur_language_state(); + let response = language_state.run_computation(request); - let ComputationResponse { main_output, global_output_stats, debug_responses } - = language_state.run_computation(request); + self.handle_computation_response(response) + } - match main_output { + fn handle_computation_response(&mut self, response: ComputationResponse) -> String { + let mut buf = String::new(); + + buf.push_str(&match response.main_output { Ok(s) => s, Err(e) => format!("{} {}", "Error".red(), e) - } + }); + + buf } fn get_directives(&mut self) -> CommandTree {