mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
Remove Unified BadType
This commit is contained in:
parent
09748aec48
commit
fb643758bb
4 changed files with 3 additions and 54 deletions
|
@ -91,7 +91,7 @@ impl Env<'_> {
|
|||
internal_error!("Did not expect derivers to need to specialize unspecialized lambda sets, but we got some: {:?}", lambda_sets_to_specialize)
|
||||
}
|
||||
}
|
||||
Unified::Failure(..) | Unified::BadType(..) => {
|
||||
Unified::Failure(..) => {
|
||||
internal_error!("Unification failed in deriver - that's a deriver bug!")
|
||||
}
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ impl Env<'_> {
|
|||
}
|
||||
specialization_lsets
|
||||
}
|
||||
Unified::Failure(..) | Unified::BadType(..) => {
|
||||
Unified::Failure(..) => {
|
||||
internal_error!("Unification failed in deriver - that's a deriver bug!")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -401,6 +401,6 @@ pub fn unify(
|
|||
|
||||
Ok(extra_metadata.changed)
|
||||
}
|
||||
Unified::Failure(..) | Unified::BadType(..) => Err(UnificationFailed),
|
||||
Unified::Failure(..) => Err(UnificationFailed),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -943,13 +943,6 @@ fn solve(
|
|||
|
||||
problems.push(problem);
|
||||
|
||||
state
|
||||
}
|
||||
BadType(vars, problem) => {
|
||||
introduce(subs, rank, pools, &vars);
|
||||
|
||||
problems.push(TypeError::BadType(problem));
|
||||
|
||||
state
|
||||
}
|
||||
}
|
||||
|
@ -1067,13 +1060,6 @@ fn solve(
|
|||
|
||||
problems.push(problem);
|
||||
|
||||
state
|
||||
}
|
||||
BadType(vars, problem) => {
|
||||
introduce(subs, rank, pools, &vars);
|
||||
|
||||
problems.push(TypeError::BadType(problem));
|
||||
|
||||
state
|
||||
}
|
||||
}
|
||||
|
@ -1181,13 +1167,6 @@ fn solve(
|
|||
|
||||
problems.push(problem);
|
||||
|
||||
state
|
||||
}
|
||||
BadType(vars, problem) => {
|
||||
introduce(subs, rank, pools, &vars);
|
||||
|
||||
problems.push(TypeError::BadType(problem));
|
||||
|
||||
state
|
||||
}
|
||||
}
|
||||
|
@ -1401,13 +1380,6 @@ fn solve(
|
|||
);
|
||||
problems.push(problem);
|
||||
|
||||
state
|
||||
}
|
||||
BadType(vars, problem) => {
|
||||
introduce(subs, rank, pools, &vars);
|
||||
|
||||
problems.push(TypeError::BadType(problem));
|
||||
|
||||
state
|
||||
}
|
||||
}
|
||||
|
@ -1609,15 +1581,6 @@ fn solve(
|
|||
}
|
||||
}
|
||||
}
|
||||
BadType(vars, problem) => {
|
||||
subs.commit_snapshot(snapshot);
|
||||
|
||||
introduce(subs, rank, pools, &vars);
|
||||
|
||||
problems.push(TypeError::BadType(problem));
|
||||
|
||||
should_check_exhaustiveness = false;
|
||||
}
|
||||
}
|
||||
|
||||
let sketched_rows = constraints.sketched_rows[sketched_rows.index()].clone();
|
||||
|
@ -2099,14 +2062,6 @@ fn check_ability_specialization(
|
|||
|
||||
problems.push(problem);
|
||||
|
||||
Err(())
|
||||
}
|
||||
BadType(vars, problem) => {
|
||||
subs.commit_snapshot(snapshot);
|
||||
introduce(subs, rank, pools, &vars);
|
||||
|
||||
problems.push(TypeError::BadType(problem));
|
||||
|
||||
Err(())
|
||||
}
|
||||
};
|
||||
|
@ -3046,11 +3001,6 @@ fn type_to_variable<'a>(
|
|||
|
||||
problems.push(problem);
|
||||
}
|
||||
BadType(_vars, problem) => {
|
||||
// No introduction needed
|
||||
|
||||
problems.push(TypeError::BadType(problem));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -225,7 +225,6 @@ pub enum Unified<M: MetaCollector = NoCollector> {
|
|||
extra_metadata: M,
|
||||
},
|
||||
Failure(Pool, ErrorType, ErrorType, DoesNotImplementAbility),
|
||||
BadType(Pool, roc_types::types::Problem),
|
||||
}
|
||||
|
||||
impl<M: MetaCollector> Unified<M> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue