Fix error filtering region math

This commit is contained in:
Richard Feldman 2022-11-01 01:17:16 -04:00
parent 167e8a40de
commit 560c984d30
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
5 changed files with 53 additions and 69 deletions

View file

@ -21,9 +21,9 @@ use roc_types::pretty_print::{name_and_print_var, DebugPrint};
use roc_types::subs::Subs;
use target_lexicon::Triple;
pub fn gen_and_eval_llvm(
pub fn gen_and_eval_llvm<'a, I: Iterator<Item = &'a str>>(
defs: I,
src: &str,
filter_errors_before_offset: usize,
target: Triple,
opt_level: OptLevel,
) -> (Option<ReplOutput>, Problems) {
@ -33,13 +33,7 @@ pub fn gen_and_eval_llvm(
let mut loaded;
let problems;
match compile_to_mono(
&arena,
src,
filter_errors_before_offset,
target_info,
DEFAULT_PALETTE,
) {
match compile_to_mono(&arena, defs, src, target_info, DEFAULT_PALETTE) {
(Some(mono), probs) => {
loaded = mono;
problems = probs;