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

Accidentally wrote the same library #3

Open
andrewthad opened this issue Apr 12, 2016 · 2 comments
Open

Accidentally wrote the same library #3

andrewthad opened this issue Apr 12, 2016 · 2 comments

Comments

@andrewthad
Copy link

This isn't really an issue, but @mckeankylej just pointed out to me that we inadvertently wrote the same library. In particular, your Union is identical to my CoRec and your lens machinery is identical to my optics. (The typeclass in that module should actually redefine rput, rget, etc. as well, but it looks like I got lazy and forgot to add those).

@int-index
Copy link
Owner

The typeclass in that module should actually redefine rput, rget, etc. as well

That's a useful insight, thanks. I thought about unifying RElem and UElem, but my initial ideas were more complex than just smashing all methods together.

your lens machinery is identical to my optics

Well, similar, but not identical. You define ccast :: CoRec f sub -> CoRec f super whereas I define usubset :: Prism' (Union f bs) (Union f as), which is strictly more powerful. vinyl also defines rsubset as a lens, not a simple projection.

@andrewthad
Copy link
Author

Ah, I didn't realize there was a prism for corecord subset. Thanks for pointing that out.

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