Problem is found in the typeable test file.
Core issue is that a perfectly valid instance definition can infer a type that is actually more general than the overload. In this case we can let it pass, but we need to be careful that the instance actually consumes and produces the expected number of elements from the stack still. If it does not consume and produce enough, any function which uses that instance will be unsoundly typed.
Problem is found in the
typeabletest file.Core issue is that a perfectly valid instance definition can infer a type that is actually more general than the overload. In this case we can let it pass, but we need to be careful that the instance actually consumes and produces the expected number of elements from the stack still. If it does not consume and produce enough, any function which uses that instance will be unsoundly typed.