Thread simple model of "ErasedLambdas" through proc layouts

But none of these paths are yet exercised.
This commit is contained in:
Ayaz Hafiz 2023-06-23 13:15:12 -05:00
parent 6eae480e36
commit c459757062
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
8 changed files with 79 additions and 11 deletions

View file

@ -8,20 +8,22 @@ use roc_mono::{
ir::{Proc, ProcLayout},
layout::STLayoutInterner,
};
use roc_solve::FunctionKind;
use tempfile::tempdir;
use test_solve_helpers::format_problems;
use crate::CompilerSettings;
#[derive(Default)]
pub struct MonoOptions {
pub(crate) struct MonoOptions {
pub no_check: bool,
}
pub fn write_compiled_ir<'a>(
pub(crate) fn write_compiled_ir<'a>(
writer: &mut impl io::Write,
test_module: &str,
dependencies: impl IntoIterator<Item = (&'a str, &'a str)>,
options: MonoOptions,
compiler_settings: CompilerSettings,
allow_can_errors: bool,
) -> io::Result<()> {
use roc_packaging::cache::RocCacheDir;
@ -42,8 +44,7 @@ pub fn write_compiled_ir<'a>(
let load_config = LoadConfig {
target_info: roc_target::TargetInfo::default_x86_64(),
// TODO parameterize
function_kind: FunctionKind::LambdaSet,
function_kind: compiler_settings.function_kind,
threading: Threading::Single,
render: roc_reporting::report::RenderTarget::Generic,
palette: roc_reporting::report::DEFAULT_PALETTE,