When attempting to repair a missing constraint, we end up with curried constraints:
foo :: (A, B) => C -> D
bar :: C -> D
bar c = foo c
-- after two repairs, the type of bar is:
-- bar :: A => B => C -> D
While this is entirely correct, it is not idiomatic, so I was wondering if it was possible to detect existing constraints, add parentheses if needed, and insert constraints after the first one in the parentheses so that repair would yield
When attempting to repair a missing constraint, we end up with curried constraints:
While this is entirely correct, it is not idiomatic, so I was wondering if it was possible to detect existing constraints, add parentheses if needed, and insert constraints after the first one in the parentheses so that repair would yield