remove argument from the from_str functions

This commit is contained in:
Folkert 2022-12-24 14:41:28 +01:00
parent e44bf59334
commit 26e5ac85d4
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
6 changed files with 2 additions and 11 deletions

View file

@ -47,7 +47,6 @@ fn load<'a>(
pub fn load_single_threaded<'a>(
arena: &'a Bump,
load_start: LoadStart<'a>,
exposed_types: ExposedByModule,
target_info: TargetInfo,
render: RenderTarget,
palette: Palette,
@ -55,6 +54,7 @@ pub fn load_single_threaded<'a>(
exec_mode: ExecutionMode,
) -> Result<LoadResult<'a>, LoadingProblem<'a>> {
let cached_subs = read_cached_types();
let exposed_types = ExposedByModule::default();
roc_load_internal::file::load_single_threaded(
arena,
@ -98,13 +98,13 @@ pub fn load_and_monomorphize_from_str<'a>(
filename: PathBuf,
src: &'a str,
src_dir: PathBuf,
exposed_types: ExposedByModule,
roc_cache_dir: RocCacheDir<'_>,
load_config: LoadConfig,
) -> Result<MonomorphizedModule<'a>, LoadMonomorphizedError<'a>> {
use LoadResult::*;
let load_start = LoadStart::from_str(arena, filename, src, roc_cache_dir, src_dir)?;
let exposed_types = ExposedByModule::default();
match load(arena, load_start, exposed_types, roc_cache_dir, load_config)? {
Monomorphized(module) => Ok(module),
@ -166,7 +166,6 @@ pub fn load_and_typecheck_str<'a>(
filename: PathBuf,
source: &'a str,
src_dir: PathBuf,
exposed_types: ExposedByModule,
target_info: TargetInfo,
render: RenderTarget,
roc_cache_dir: RocCacheDir<'_>,
@ -182,7 +181,6 @@ pub fn load_and_typecheck_str<'a>(
match load_single_threaded(
arena,
load_start,
exposed_types,
target_info,
render,
palette,