Canonicalization of list patterns

This commit is contained in:
Ayaz Hafiz 2022-10-31 11:57:02 -05:00
parent 55ea3bbea2
commit b0a8b85de3
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
13 changed files with 189 additions and 4 deletions

View file

@ -101,6 +101,14 @@ fn headers_from_annotation_help(
_ => false,
},
List { .. } => {
// There are no interesting headers to introduce for list patterns, since the only
// exhaustive list pattern is
// \[..] -> <body>
// which does not introduce any symbols.
false
},
AppliedTag {
tag_name,
arguments,
@ -501,6 +509,18 @@ pub fn constrain_pattern(
state.constraints.push(whole_con);
state.constraints.push(record_con);
}
List {
list_var,
elem_var,
patterns: _,
} => {
state.vars.push(*list_var);
state.vars.push(*elem_var);
todo!();
}
AppliedTag {
whole_var,
ext_var,