implement layout for Tag

This commit is contained in:
Folkert 2020-03-16 13:09:01 +01:00
parent 8c7124aba6
commit d875f8bfce
5 changed files with 28 additions and 11 deletions

View file

@ -124,7 +124,9 @@ fn flatten_patterns<'a>(branch: Branch<'a>) -> Branch<'a> {
fn flatten<'a>(path_pattern: (Path, Pattern<'a>), path_patterns: &mut Vec<(Path, Pattern<'a>)>) {
match &path_pattern.1 {
Pattern::AppliedTag { union, .. } => {
Pattern::AppliedTag {
union, arguments, ..
} => {
if union.alternatives.len() == 1 {
// case map dearg ctorArgs of
// [arg] ->