mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
hook everything up in the gen tests
This commit is contained in:
parent
05d1f28e83
commit
c00cd2f415
5 changed files with 47 additions and 18 deletions
|
@ -157,6 +157,33 @@ pub fn run(
|
|||
(Solved(subs), state.env)
|
||||
}
|
||||
|
||||
/// Modify an existing subs in-place instead
|
||||
pub fn run_in_place(
|
||||
env: &Env,
|
||||
problems: &mut Vec<TypeError>,
|
||||
subs: &mut Subs,
|
||||
constraint: &Constraint,
|
||||
) -> Env {
|
||||
let mut pools = Pools::default();
|
||||
let state = State {
|
||||
env: env.clone(),
|
||||
mark: Mark::NONE.next(),
|
||||
};
|
||||
let rank = Rank::toplevel();
|
||||
let state = solve(
|
||||
env,
|
||||
state,
|
||||
rank,
|
||||
&mut pools,
|
||||
problems,
|
||||
&mut MutMap::default(),
|
||||
subs,
|
||||
constraint,
|
||||
);
|
||||
|
||||
state.env
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn solve(
|
||||
env: &Env,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue