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

@ -24,6 +24,7 @@ pub use roc_load_internal::file::{
pub use roc_load_internal::module::{
EntryPoint, Expectations, ExposedToHost, LoadedModule, MonomorphizedModule,
};
pub use roc_solve::FunctionKind;
#[allow(clippy::too_many_arguments)]
fn load<'a>(
@ -51,6 +52,7 @@ pub fn load_single_threaded<'a>(
arena: &'a Bump,
load_start: LoadStart<'a>,
target_info: TargetInfo,
function_kind: FunctionKind,
render: RenderTarget,
palette: Palette,
roc_cache_dir: RocCacheDir<'_>,
@ -64,6 +66,7 @@ pub fn load_single_threaded<'a>(
load_start,
exposed_types,
target_info,
function_kind,
cached_subs,
render,
palette,
@ -170,6 +173,7 @@ pub fn load_and_typecheck_str<'a>(
source: &'a str,
src_dir: PathBuf,
target_info: TargetInfo,
function_kind: FunctionKind,
render: RenderTarget,
roc_cache_dir: RocCacheDir<'_>,
palette: Palette,
@ -185,6 +189,7 @@ pub fn load_and_typecheck_str<'a>(
arena,
load_start,
target_info,
function_kind,
render,
palette,
roc_cache_dir,