
On Nov 25, 2020, at 3:26 PM, Zemyla
wrote: Except we would, because we need to be able to express instances like first in Arrow using builtin pairs, rather than try and write some sort of combination for every pair and arrow. And I'm pretty sure there are other libraries which depend on pairs too.
This is why I posted the not terribly ergonomic: newtype T2 a b = T2 { _unT2 :: (a, b) } which has a free coercion to a pair, so you can pass a pair to any library that needs one, without any runtime overhead. This of course takes much discipline to use when refactoring data types, in order to avoid missing needed changes obscured by unwanted instances of the built-in pair. Wherever you need a pair, you'd have to write "(coerce t2)", rather than "t2". -- Viktor.