-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Higher-order functors are defined in barbies, parameterized-utils, rank2classes, category-extras... #12
Comments
They are indeed the same classes; and I just noticed that I could end up introducing equivalents of I agree that it could be preferable to reduce duplication, if possible. Did you have anything in mind? From my point of view, of course, the simplest thing would be for But because of the default instances in |
@jcpetruzza Thanks for the thoughtful reply! I guess I didn't have anything in mind, for the reasons you outline 😄 The default instances look quite helpful, we do something somewhat similar for GADTs with template haskell. It's worth noting that at least the I would think that the most generally useful solution would probably be to create a small package (e.g. |
Thanks for the pointers! I think that Now, all of So, let's say we were to start
|
@jcpetruzza I just noticed that there's some conceptual duplication between |
So..
all licensed under BSD (2/3 clause). I am to blame for the third in that list. rank2classes came first, but for some reason now has a strange lower bound and no upper bound on base, and its repo is shared with some other packages.. but it does have the most comprehensive collection of rank2 classes. And the most sensible name for this kind of package, to be honest. |
For posterity, here are even more instances of higher-order functors |
Not only are the |
@jcpetruzza @langston-barrett I'd be super interested in working on factoring out a common core here, but as @jcpetruzza mentioned, a high level plan for something that would work in both libraries is needed.
Another alternative would be to drop the defaults, create a newtype like |
@masaeedu Having a newtype wrapper to use with deriving-via would be nice, independently of the larger issue. I think I ran into some issues when I tried it some time ago, but I don't remember the details. If you make it work, that'd be great :) |
@jcpetruzza Might it have been the |
It looks like this library has some typeclasses that are also defined in
parameterized-utils
. I wonder if we could reduce the duplication of effort.In particular:
FunctorB <-> Data.Parameterized.TraversableF.FunctorF
TraversableB <-> Data.Parameterized.TraversableF.TraversableF
The text was updated successfully, but these errors were encountered: