Merge pull request #6685 from roc-lang/repl-import

Support imports in REPL
This commit is contained in:
Anton-4 2024-04-30 19:49:26 +02:00 committed by GitHub
commit c3cabf7840
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 72 additions and 13 deletions

View file

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