mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Support importing local files in the REPL
This commit is contained in:
parent
e500d664fd
commit
52f84910a7
5 changed files with 57 additions and 10 deletions
|
@ -9,7 +9,7 @@ use roc_repl_eval::gen::Problems;
|
|||
use roc_repl_ui::colors::{CYAN, END_COL};
|
||||
use roc_repl_ui::repl_state::{ReplAction, ReplState};
|
||||
use roc_repl_ui::{format_output, is_incomplete, CONT_PROMPT, PROMPT, SHORT_INSTRUCTIONS, TIPS};
|
||||
use roc_reporting::report::{ANSI_STYLE_CODES, DEFAULT_PALETTE};
|
||||
use roc_reporting::report::{to_file_problem_report_string, ANSI_STYLE_CODES, DEFAULT_PALETTE};
|
||||
use roc_target::Target;
|
||||
use rustyline::highlight::{Highlighter, PromptInfo};
|
||||
use rustyline::validate::{self, ValidationContext, ValidationResult, Validator};
|
||||
|
@ -74,6 +74,9 @@ pub fn main() -> i32 {
|
|||
ReplAction::Exit => {
|
||||
return 0;
|
||||
}
|
||||
ReplAction::FileProblem { filename, error } => {
|
||||
println!("{}", to_file_problem_report_string(filename, error));
|
||||
}
|
||||
ReplAction::Help => {
|
||||
println!("{TIPS}");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue