When using the following type:
it should be legal to pass the following hash
but this fails because the inferred type of the hash is:
which is considered incompatible, and correctly so.
The solution is probably to let infer_set reduce the type of each pair in the hash rather than attempting to combine the reduced type of all keys with the reduced type of all values. The pair semantics must be retained during reduction in order to guarantee that the result is assignable to a struct.