-
Notifications
You must be signed in to change notification settings - Fork 33
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 NonEmptyDMap --- depends on #26 #31
base: master
Are you sure you want to change the base?
Conversation
Depends on obsidiansystems/dependent-sum#23. Also should depend on getting rid of GHC <8 support. In this repo.
Do this by factor out just about all explicity recursive DMap functions into mutually recursive DMap and NonEmptyDMap functions. This largely deduplicates the implementation of both, while ensuring that neither has extra indirection/imbalances.
These required creating an `adjustF` function, which was added to both the empty and non empty map modules for consistency.
This looks like it would impose a very large maintenance overhead going forward; I'm not convinced it's worth it. One very valuable thing about the way this package is currently constructed is that it is nothing more than a simple search-and-replace of |
@ryantrinkle make containers itself do the same thing! :D. In serious, I can make the containers issue now that this exists enough to quantify the overhead and call out the benefits with tree rotations. Hopefully the existing non-empty containers packages are good enough to point to as a need, but I'd make the version of vessel using this too to bolster the argument. |
Sounds good! I think the main thing is that the containers issue needs to go first; I don't want to merge this here in the hope that we'll eventually become maintainable. |
Need this to curry maps. Example usage forthcoming
CC @cgibbard