If an expression is annotated with a type, but the final expression is a case-match, we get a weird error message. E.g.:
x : '{IO, Exception} Text
x = do
match 1 with
1 -> 90
_ -> 128
Will result in the following:
Each case of a match / with expression need to have the same type.
Here, one is: Text
and another is: Nat
4 | 1 -> 90
from right here:
1 | x : '{IO, Exception} Text
This suggests there's a Text branch in the case, but actually that's just the annotated type.
If an expression is annotated with a type, but the final expression is a case-match, we get a weird error message. E.g.:
Will result in the following:
This suggests there's a
Text
branch in the case, but actually that's just the annotated type.