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

Instances for ReaderT and MaybeT? #135

Open
Zemyla opened this issue Dec 11, 2019 · 1 comment
Open

Instances for ReaderT and MaybeT? #135

Zemyla opened this issue Dec 11, 2019 · 1 comment

Comments

@Zemyla
Copy link

Zemyla commented Dec 11, 2019

Because ReaderT e is pretty much Compose ((->) e), there should be derived Semialign, Zip, Repeat, and Unzip instances for it. Also, even though Compose ((->) e) doesn't have an Align instance, nil = ReaderT (const nil) should be law-abiding.

Additionally, MaybeT m is isomorphic to Compose m Maybe, so it also would get Semialign, Align, Zip, Repeat, and Unzip instances. There might also be a possible law-abiding Unalign instance, but I'm not sure right this moment.

@phadej
Copy link
Collaborator

phadej commented Dec 11, 2019

PRs are welcome

EDIT: "should" should be witnessed. It's not obvious to me that const nil would or wouldn't work.

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

No branches or pull requests

2 participants