Closed kozross closed 5 years ago
No, I don't think that can work very well. Using overlapping instances will definitely cause trouble for typed holes (even worse error messages! Yay!). Using incoherent instances will work okay in many cases, but I'm not sure how reliable it is and it limits some other potential future changes. Additionally, ad hoc instances here seem likely to confuse a lot of people. I'm not a fan. I'd much rather add new combinators to get the power you need, and resurrect the old API.
Yeah, in retrospect, this doesn't even address the problem I thought it did. Thank you for clarifying though - it'll help me come up with a good motivating example explaining what I need more clearly.
From further investigations regarding issues raised in #24, I found that a possible solution to all my concerns would be the ability to have an instance
Similar (Identity a) a
. That would mean that I could recover the older flexibility ofover2
by writingunpack . over2
. However, as I don't know the details of the implementation, I'm not sure if this is feasible or if it would break some other assumptions.