If an expression returns a value that doesn't have the same number of type parameters as the expected type, then the type error message is confusing and shows types with kind errors.
Instead of:
I found a value of type: Either Text
where I expected to find: Optional
I would expect:
I found a value of type: Either Text a
where I expected to find: Optional Nat
or something like that...I'm not quite sure what it should infer for the right side of the Either.
Loading changes detected in scratch.u.
I found a value of type: Either Text
where I expected to find: Optional
1 | foo : Optional Nat
2 | foo = Left "error"
🛑
The transcript failed due to an error in the stanza above. The error is:
I found a value of type: Either Text
where I expected to find: Optional
1 | foo : Optional Nat
2 | foo = Left "error"
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Environment (please complete the following information):**
- `ucm --version` c8f412655
Describe and demonstrate the bug
If an expression returns a value that doesn't have the same number of type parameters as the expected type, then the type error message is confusing and shows types with kind errors.
Instead of:
I would expect:
or something like that...I'm not quite sure what it should infer for the right side of the
Either
.Input:
🛑
The transcript failed due to an error in the stanza above. The error is:
I found a value of type: Either Text where I expected to find: Optional