mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 03:42:17 +00:00
remove argument from the from_str functions
This commit is contained in:
parent
e44bf59334
commit
26e5ac85d4
6 changed files with 2 additions and 11 deletions
|
@ -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,
|
||||
|
|
|
@ -96,7 +96,6 @@ mod solve_expr {
|
|||
module_src = &temp;
|
||||
}
|
||||
|
||||
let exposed_types = Default::default();
|
||||
let loaded = {
|
||||
let dir = tempdir()?;
|
||||
let filename = PathBuf::from("Test.roc");
|
||||
|
@ -106,7 +105,6 @@ mod solve_expr {
|
|||
file_path,
|
||||
module_src,
|
||||
dir.path().to_path_buf(),
|
||||
exposed_types,
|
||||
roc_target::TargetInfo::default_x86_64(),
|
||||
roc_reporting::report::RenderTarget::Generic,
|
||||
RocCacheDir::Disallowed,
|
||||
|
|
|
@ -80,7 +80,6 @@ fn create_llvm_module<'a>(
|
|||
filename,
|
||||
module_src,
|
||||
src_dir,
|
||||
Default::default(),
|
||||
RocCacheDir::Disallowed,
|
||||
load_config,
|
||||
);
|
||||
|
|
|
@ -114,7 +114,6 @@ fn compiles_to_ir(test_name: &str, src: &str, mode: &str, no_check: bool) {
|
|||
filename,
|
||||
module_src,
|
||||
src_dir,
|
||||
Default::default(),
|
||||
RocCacheDir::Disallowed,
|
||||
load_config,
|
||||
);
|
||||
|
|
|
@ -54,13 +54,11 @@ pub fn compile_to_mono<'a, 'i, I: Iterator<Item = &'i str>>(
|
|||
let filename = PathBuf::from("");
|
||||
let src_dir = PathBuf::from("fake/test/path");
|
||||
let (bytes_before_expr, module_src) = promote_expr_to_module(arena, defs, expr);
|
||||
let exposed_types = Default::default();
|
||||
let loaded = roc_load::load_and_monomorphize_from_str(
|
||||
arena,
|
||||
filename,
|
||||
module_src,
|
||||
src_dir,
|
||||
exposed_types,
|
||||
RocCacheDir::Persistent(cache::roc_cache_dir().as_path()),
|
||||
LoadConfig {
|
||||
target_info,
|
||||
|
|
|
@ -133,7 +133,6 @@ mod test {
|
|||
filename,
|
||||
source,
|
||||
src_dir.path().to_path_buf(),
|
||||
Default::default(),
|
||||
RocCacheDir::Disallowed,
|
||||
load_config,
|
||||
) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue