Merge pull request #7179 from JRI98/unused_emptytuple

Remove unused EmptyTuple variant from FlatType enum
This commit is contained in:
Ayaz 2024-10-25 09:19:57 -04:00 committed by GitHub
commit e1183e58e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 34 additions and 111 deletions

View file

@ -612,14 +612,6 @@ trait DerivableVisitor {
})
}
#[inline(always)]
fn visit_empty_tuple(var: Variable) -> Result<(), NotDerivable> {
Err(NotDerivable {
var,
context: NotDerivableContext::NoContext,
})
}
#[inline(always)]
fn visit_empty_tag_union(var: Variable) -> Result<(), NotDerivable> {
Err(NotDerivable {
@ -786,7 +778,6 @@ trait DerivableVisitor {
}
}
EmptyRecord => Self::visit_empty_record(var)?,
EmptyTuple => Self::visit_empty_tuple(var)?,
EmptyTagUnion => Self::visit_empty_tag_union(var)?,
},
Alias(

View file

@ -186,7 +186,7 @@ fn deep_copy_var_help(
Func(new_arguments, new_closure_var, new_ret_var)
}
same @ EmptyRecord | same @ EmptyTuple | same @ EmptyTagUnion => same,
same @ EmptyRecord | same @ EmptyTagUnion => same,
Record(fields, ext_var) => {
let record_fields = {

View file

@ -2184,7 +2184,7 @@ fn adjust_rank_content(
rank
}
EmptyRecord | EmptyTuple => {
EmptyRecord => {
// from elm-compiler: THEORY: an empty record never needs to get generalized
//
// But for us, that theory does not hold, because there might be type variables hidden