Skip to content
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

Which of the predefined Selective instances are rigid? #33

Open
kozross opened this issue Dec 20, 2020 · 3 comments
Open

Which of the predefined Selective instances are rigid? #33

kozross opened this issue Dec 20, 2020 · 3 comments

Comments

@kozross
Copy link

kozross commented Dec 20, 2020

It would be really useful to know this. While it can be inferred from the implementations, having this information in the documentation for the instances would be great.

@snowleopard
Copy link
Owner

Most of the instances are rigid. Three notable exceptions are: Under and Validation, as well as Lift f that inherits the rigidity of the underlying selective functor f.

I agree that we should document this. Perhaps, marking the few non-rigid instances should be sufficient?

@kozross
Copy link
Author

kozross commented Dec 21, 2020

@snowleopard If as you say most instances are rigid, marking the exceptions alone, while adding something like "Unless stated otherwise, the instances of Selective defined in this package are rigid.` to the paragraph describing rigidity, would do.

Out of curiosity, how does rigidity interact with Compose? I assume it inherits the rigidity of the Selective 'component'? This kind of thing is also worth explaining on 'lifty' instances (that is, instances of types similar to Compose).

@snowleopard
Copy link
Owner

Hmm, interesting. It's not immediately clear to me whether Selective (Compose f g) inherits the rigidity of the inner instance Selective g.

For Product f g the answer seems simple: the result is rigid only if both f and g are rigid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants