mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
Merge pull request #2917 from rtfeldman/move-exhaustiveness-checking
Moves exhaustiveness checking to type solving phase
This commit is contained in:
commit
6da39aa296
21 changed files with 1067 additions and 177 deletions
|
@ -2333,7 +2333,8 @@ impl UnionTags {
|
|||
|
||||
pub fn iter_all(
|
||||
&self,
|
||||
) -> impl Iterator<Item = (SubsIndex<TagName>, SubsIndex<VariableSubsSlice>)> {
|
||||
) -> impl Iterator<Item = (SubsIndex<TagName>, SubsIndex<VariableSubsSlice>)> + ExactSizeIterator
|
||||
{
|
||||
self.tag_names()
|
||||
.into_iter()
|
||||
.zip(self.variables().into_iter())
|
||||
|
@ -2436,7 +2437,7 @@ impl<'a> UnsortedUnionTags<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
pub type SortedTagsIterator<'a> = Box<dyn Iterator<Item = (TagName, &'a [Variable])> + 'a>;
|
||||
pub type SortedTagsIterator<'a> = Box<dyn ExactSizeIterator<Item = (TagName, &'a [Variable])> + 'a>;
|
||||
pub type SortedTagsSlicesIterator<'a> = Box<dyn Iterator<Item = (TagName, VariableSubsSlice)> + 'a>;
|
||||
|
||||
pub fn is_empty_tag_union(subs: &Subs, mut var: Variable) -> bool {
|
||||
|
|
|
@ -1815,6 +1815,9 @@ pub enum Category {
|
|||
DefaultValue(Lowercase), // for setting optional fields
|
||||
|
||||
AbilityMemberSpecialization(Symbol),
|
||||
|
||||
Expect,
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue