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

@ -2703,7 +2703,7 @@ fn pattern_to_when<'a>(
) -> (Symbol, Loc<roc_can::expr::Expr>) {
use roc_can::expr::Expr::*;
use roc_can::expr::{WhenBranch, WhenBranchPattern};
use roc_can::pattern::Pattern::*;
use roc_can::pattern::Pattern::{self, *};
match &pattern.value {
Identifier(symbol) => (*symbol, body),
@ -2766,6 +2766,8 @@ fn pattern_to_when<'a>(
(symbol, Loc::at_zero(wrapped_body))
}
Pattern::List { .. } => todo!(),
IntLiteral(..)
| NumLiteral(..)
| FloatLiteral(..)
@ -9604,6 +9606,8 @@ fn from_can_pattern_help<'a>(
field_layouts.into_bump_slice(),
))
}
List { .. } => todo!(),
}
}