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

Add Context instances for Contravariant, Divisible, Decidable #577

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maxsnew
Copy link

@maxsnew maxsnew commented Oct 31, 2017

This gives us a few useful new combinators for manipulating Contexts.
Most useful are probably

divided :: Context a -> Context b -> Context (a, b)

Which lets you combine two existing contexts to make a context for a pair and

chosen :: Context a -> Context b -> Context (Either a b)

Which lets you write a context for data which might be one of two cases.

I've needed divided for my site, and currently the only way to get it is to peek under the definition of Context.

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

Successfully merging this pull request may close these issues.

1 participant