Currently expected only supports type-calculation of the graded monad only if either side of the expected (that is value or error) agrees with the fixed type. This is not correct; graded monad support needs to work also if both types do not match, as long as they are the sum-of-types kind of type.
Currently
expected
only supports type-calculation of the graded monad only if either side of theexpected
(that isvalue
orerror
) agrees with the fixed type. This is not correct; graded monad support needs to work also if both types do not match, as long as they are the sum-of-types kind of type.