mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Remove more dead code
This commit is contained in:
parent
22c8719eed
commit
0ef0638862
1 changed files with 14 additions and 18 deletions
|
@ -320,7 +320,6 @@ impl<M: MetaCollector> Outcome<M> {
|
||||||
|
|
||||||
pub struct Env<'a> {
|
pub struct Env<'a> {
|
||||||
pub subs: &'a mut Subs,
|
pub subs: &'a mut Subs,
|
||||||
compute_outcome_only: bool,
|
|
||||||
seen_recursion: VecSet<(Variable, Variable)>,
|
seen_recursion: VecSet<(Variable, Variable)>,
|
||||||
fixed_variables: VecSet<Variable>,
|
fixed_variables: VecSet<Variable>,
|
||||||
is_inside_lambda_set: bool,
|
is_inside_lambda_set: bool,
|
||||||
|
@ -330,7 +329,6 @@ impl<'a> Env<'a> {
|
||||||
pub fn new(subs: &'a mut Subs) -> Self {
|
pub fn new(subs: &'a mut Subs) -> Self {
|
||||||
Self {
|
Self {
|
||||||
subs,
|
subs,
|
||||||
compute_outcome_only: false,
|
|
||||||
seen_recursion: Default::default(),
|
seen_recursion: Default::default(),
|
||||||
fixed_variables: Default::default(),
|
fixed_variables: Default::default(),
|
||||||
is_inside_lambda_set: false,
|
is_inside_lambda_set: false,
|
||||||
|
@ -3532,24 +3530,22 @@ fn unify_recursion<M: MetaCollector>(
|
||||||
pub fn merge<M: MetaCollector>(env: &mut Env, ctx: &Context, content: Content) -> Outcome<M> {
|
pub fn merge<M: MetaCollector>(env: &mut Env, ctx: &Context, content: Content) -> Outcome<M> {
|
||||||
let mut outcome: Outcome<M> = Outcome::default();
|
let mut outcome: Outcome<M> = Outcome::default();
|
||||||
|
|
||||||
if !env.compute_outcome_only {
|
let rank = ctx.first_desc.rank.min(ctx.second_desc.rank);
|
||||||
let rank = ctx.first_desc.rank.min(ctx.second_desc.rank);
|
let desc = Descriptor {
|
||||||
let desc = Descriptor {
|
content,
|
||||||
content,
|
rank,
|
||||||
rank,
|
mark: Mark::NONE,
|
||||||
mark: Mark::NONE,
|
copy: OptVariable::NONE,
|
||||||
copy: OptVariable::NONE,
|
};
|
||||||
};
|
|
||||||
|
|
||||||
outcome
|
outcome
|
||||||
.extra_metadata
|
.extra_metadata
|
||||||
.record_changed_variable(env.subs, ctx.first);
|
.record_changed_variable(env.subs, ctx.first);
|
||||||
outcome
|
outcome
|
||||||
.extra_metadata
|
.extra_metadata
|
||||||
.record_changed_variable(env.subs, ctx.second);
|
.record_changed_variable(env.subs, ctx.second);
|
||||||
|
|
||||||
env.subs.union(ctx.first, ctx.second, desc);
|
env.subs.union(ctx.first, ctx.second, desc);
|
||||||
}
|
|
||||||
|
|
||||||
outcome
|
outcome
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue