mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
cleanup
This commit is contained in:
parent
19aa3ade45
commit
30ce1ad4bb
1 changed files with 15 additions and 26 deletions
|
@ -267,22 +267,22 @@ where
|
||||||
captures_niche: CapturesNiche::no_niche(),
|
captures_niche: CapturesNiche::no_niche(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut env = Env::new(arena);
|
|
||||||
|
|
||||||
let host_exposed: Vec<_> = symbols
|
let host_exposed: Vec<_> = symbols
|
||||||
.iter()
|
.iter()
|
||||||
.map(|symbol| {
|
.map(|symbol| {
|
||||||
let bytes = func_name_bytes_help(
|
(
|
||||||
*symbol,
|
func_name_bytes_help(
|
||||||
[],
|
*symbol,
|
||||||
CapturesNiche::no_niche(),
|
[],
|
||||||
&layout.result,
|
CapturesNiche::no_niche(),
|
||||||
);
|
&layout.result,
|
||||||
|
),
|
||||||
(bytes, [].as_slice())
|
[].as_slice(),
|
||||||
|
)
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
let mut env = Env::new(arena);
|
||||||
let entry_point_function =
|
let entry_point_function =
|
||||||
build_entry_point(&mut env, interner, layout, None, &host_exposed)?;
|
build_entry_point(&mut env, interner, layout, None, &host_exposed)?;
|
||||||
|
|
||||||
|
@ -327,22 +327,11 @@ where
|
||||||
let mut p = ProgramBuilder::new();
|
let mut p = ProgramBuilder::new();
|
||||||
p.add_mod(MOD_APP, main_module)?;
|
p.add_mod(MOD_APP, main_module)?;
|
||||||
|
|
||||||
match entry_point {
|
p.add_entry_point(
|
||||||
EntryPoint::Single { .. } => {
|
EntryPointName(ENTRY_POINT_NAME),
|
||||||
p.add_entry_point(
|
MOD_APP,
|
||||||
EntryPointName(ENTRY_POINT_NAME),
|
FuncName(ENTRY_POINT_NAME),
|
||||||
MOD_APP,
|
)?;
|
||||||
FuncName(ENTRY_POINT_NAME),
|
|
||||||
)?;
|
|
||||||
}
|
|
||||||
EntryPoint::Expects { .. } => {
|
|
||||||
p.add_entry_point(
|
|
||||||
EntryPointName(ENTRY_POINT_NAME),
|
|
||||||
MOD_APP,
|
|
||||||
FuncName(ENTRY_POINT_NAME),
|
|
||||||
)?;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
p.build()?
|
p.build()?
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue