repl now uses replfile.roc

Previously this was using an empty filename but that seems potentially confusing during debugging.
This commit is contained in:
Anton-4 2024-02-09 15:18:51 +01:00
parent d62cc0b1d3
commit fa48f9713e
No known key found for this signature in database
GPG Key ID: 0971D718C0A9B937
2 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ pub fn compile_to_mono<'a, 'i, I: Iterator<Item = &'i str>>(
target_info: TargetInfo,
palette: Palette,
) -> (Option<MonomorphizedModule<'a>>, Problems) {
let filename = PathBuf::from("");
let filename = PathBuf::from("replfile.roc");
let src_dir = PathBuf::from("fake/test/path");
let (bytes_before_expr, module_src) = promote_expr_to_module(arena, defs, expr);
let loaded = roc_load::load_and_monomorphize_from_str(

View File

@ -166,7 +166,7 @@ impl<'b> Report<'b> {
if self.title.is_empty() {
self.doc
} else {
let header = if self.filename == PathBuf::from("") {
let header = if self.filename == PathBuf::from("replfile.roc") {
crate::report::pretty_header(&self.title)
} else {
crate::report::pretty_header_with_path(&self.title, &self.filename)