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

Typeclass for right monoid actions? #37

Open
madgen opened this issue Dec 10, 2018 · 2 comments
Open

Typeclass for right monoid actions? #37

madgen opened this issue Dec 10, 2018 · 2 comments

Comments

@madgen
Copy link

madgen commented Dec 10, 2018

Can we perhaps have a typeclass for right monoid actions as well? Something called RightAction perhaps and maybe even have LeftAction which aliases Action?

@byorgey
Copy link
Member

byorgey commented Dec 17, 2018

That sounds reasonable. I'd be happy to consider a pull request which adds this.

I'm curious to hear about your use case / application for RightAction.

@madgen
Copy link
Author

madgen commented Dec 17, 2018

It's a bit of work in progress, but I'm working on a monoid that unifiers associativity, precedence, fixity for pretty printers and parenthesising expressions turn out to be monoid actions. It's a left monoid action if the child is going to appear to the left of the parent operator and a right monoid action if it is to the right. Sorry, it's a bit sketchy at moment. I'd be happy to keep you posted when I make some more progress.

As for the PR, I'll send one this week. Thanks!

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