mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Canonicalization of list patterns
This commit is contained in:
parent
55ea3bbea2
commit
b0a8b85de3
13 changed files with 189 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue