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 newtype Salign #104

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

Conversation

chris-martin
Copy link
Contributor

I've always been frustrated that base has ZipList in Control.Applicative that can give you a list-zipping Applicative, but no corresponding newtype in Data.Semigroup that would give you a list-zipping Semigroup.

This seems like it could be a nice place to put (a more general version of) such a thing -- a Salign type right next to the salign function. I think it'd be very nice to use in conjunction with DerivingVia to define types with aligning semigroups.

@phadej
Copy link
Collaborator

phadej commented Feb 12, 2019 via email

@chris-martin
Copy link
Contributor Author

Added the Monoid instance.

You want Salign to have instances of all these? Alternative, Applicative, Enum, Eq, Functor, Generic, Generic1, Monad, MonadFail, MonadPlus, Ord, Read, Show

@phadej
Copy link
Collaborator

phadej commented Feb 12, 2019 via email

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.

2 participants