Parameterize program solving on a FunctionKind

This new flag determines whether we should introduce a new kind to
represent lambda sets, or whether lambdas should be erased. The latter
is not yet implemented.
This commit is contained in:
Ayaz Hafiz 2023-06-19 21:43:42 -05:00
parent 60c98ea5d5
commit 44c4797d9a
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
29 changed files with 126 additions and 13 deletions

View file

@ -10,6 +10,7 @@ use roc_load::{EntryPoint, ExecutionMode, ExposedToHost, LoadConfig, Threading};
use roc_module::symbol::Interns;
use roc_packaging::cache::RocCacheDir;
use roc_reporting::report::{RenderTarget, DEFAULT_PALETTE};
use roc_solve::FunctionKind;
use roc_target::get_target_triple_str;
use std::cmp::Ordering;
use std::mem;
@ -88,6 +89,7 @@ pub fn generate_stub_lib(
input_path: &Path,
roc_cache_dir: RocCacheDir<'_>,
triple: &Triple,
function_kind: FunctionKind,
) -> std::io::Result<i32> {
// Note: this should theoretically just be able to load the host, I think.
// Instead, I am loading an entire app because that was simpler and had example code.
@ -101,6 +103,7 @@ pub fn generate_stub_lib(
roc_cache_dir,
LoadConfig {
target_info,
function_kind,
render: RenderTarget::Generic,
palette: DEFAULT_PALETTE,
threading: Threading::AllAvailable,