Closed neongreen closed 9 years ago
+1
Ultimately, I can't get the text
and containers
and Haskell Platform packages of the world to invert their dependencies on these classes. This simply won't happen.
The reasons vary. Haskell Platform packages can't incur new dependencies easily. Other Haskell Platform packages fight to stay entirely Haskell 98, etc. At the same time, nobody wants to incur any new dependencies! Sound familiar?
Over the years I've been developing Haskell I can count the number of times a Haskell Platform package picking up a new dependency has happened on one hand, and I don't even need any fingers to do so.
So what you are asking for is a transition to a state that the world will never adopt, or whole packages full of orphans. Neither one of those is an acceptable solution.
Orphan instance packages get dropped. You get users forgetting to add the magic import line at the top of their source files that now becomes necessary to ensure the correctness of their code.
There is a lot of useful classes (in this library and elsewhere):
Profunctor
Choice
Contravariant
Distributive
It'd be really, really nice if they were available in some library which wouldn't depend on
transformers
,tagged
,ghc-prim
,semigroupoids
, etc. Just classes, without instances (apart frombase
ones). Instances would live in packages they already live in.(Background: I'm writing a
lens
-compatible lenses library which would have 0 dependencies (and hopefully be compilable with JHC), and it is upsetting that I can't providePrism
,Iso
... heck, evenSetter
.)The package could be called
classes
, if you want a short/simple name.