-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add a Distributive
instance for Solo
#68
base: 0
Are you sure you want to change the base?
Conversation
I ... guess? It's really awkward though. distribute :: Functor f => f (Solo a) -> Solo (f a) The only way to implement this is distribute = Solo . fmap getSolo
|
Sure. That's why a nitpick on many changes for the motivation or the reasoning is there, so it's possible to remember. The motivation here is to allow writing |
|
So |
It's all contextual, isn't it? Any tabulateNow :: (Rep f -> Solo a) -> f a but I have no idea if reasonable laws could be formulated for such a thing. |
Are you saying that It feels I lack a lot of background knowledge, so I guess I should not comment more. @RyanGlScott you may drop this instance, and apparently the one in |
@phadej , @RyanGlScott , I want to be very clear that I'm not saying the instance shouldn't be added. I'm just saying I have misgivings about it. |
I don't have strong feelings about this at all—I was merely submitting this to achieve parity with the |
Inspired by a similar patch on the
main
branch from #65.Fixes #67.