Decision tree compilation of list patterns

This commit is contained in:
Ayaz Hafiz 2022-11-01 13:59:44 -05:00
parent da1d937277
commit ae71c7efe2
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
7 changed files with 479 additions and 38 deletions

View file

@ -93,7 +93,7 @@ impl ListArity {
/// The trivially-exhaustive list pattern `[..]`
const ANY: ListArity = ListArity::Slice(0, 0);
fn min_len(&self) -> usize {
pub fn min_len(&self) -> usize {
match self {
ListArity::Exact(n) => *n,
ListArity::Slice(l, r) => l + r,