relude icon indicating copy to clipboard operation
relude copied to clipboard

Should we reexport 'Solo' from 'Data.Tuple'?

Open chshersh opened this issue 4 years ago • 0 comments

base-4.16 started to reexport the unary tuple type Solo from the Data.Tuple module. A data type like this one is helpful in various library. I'm usually using Only from the Only package in libraries like postgresql-simple.

  • https://hackage.haskell.org/package/Only

Key differences between Solo and Only:

  • Different names
  • Solo is data and Only is newtype (I see this as a drawback of Solo)
  • Solo is available without extra dependencies but only since GHC-9.2

It's not clear to me whether we should reexport Solo. I believe, all other libraries will continue to use Only as there's no benefit in switching to Solo. But still, maybe there're use cases I'm not aware of 🙂

chshersh avatar Apr 04 '22 09:04 chshersh