aboutsummaryrefslogtreecommitdiff
path: root/src/type/display.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/type/display.rs')
-rw-r--r--src/type/display.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/type/display.rs b/src/type/display.rs
index 99394df..586483c 100644
--- a/src/type/display.rs
+++ b/src/type/display.rs
@@ -119,12 +119,17 @@ impl fmt::Display for TypeError {
letexp
)
},
- DifferentTypeCaseArms(ty1, ty2) => write!(f, "arms of match have different types, '{ty1}' and '{ty2}'"),
- FunAsAtom => write!(f, "'fn' used as atom doesn't make sense"),
+ DifferentTypeCaseArms(ty1, ty2)
+ => write!(f, "arms of match have different types, '{ty1}' and '{ty2}'"),
+ FunAsAtom => write!(f, "'fn' used as atom doesn't make sense"),
CaseAsAtom => write!(f, "'case' used as atom doesn't make sense"),
RestAsAtom => write!(f, "'..[name]' used as atom doesn't make sense"),
- InvalidFunDef(exp, err) => write!(f, "invalid function definition '{exp}': {err}"),
- NoWildcardInCase(exp) => write!(f, "no wildcard in cases: '{exp}'"),
+ InvalidFunDef(exp, err)
+ => write!(f, "invalid function definition '{exp}': {err}"),
+ NoWildcardInCase(exp)
+ => write!(f, "no wildcard in cases: '{exp}'"),
+ SumDefNoTypeLiteral(exp)
+ => write!(f, "other arm of coproduct should've been a type in {exp}"),
OtherError => write!(f, "uncategorized error"),
}
}