Stacked instance of Lattice, conversion functions from Either and Maybe#99
Closed
erykciepiela wants to merge 3 commits intohaskellari:masterfrom
Closed
Conversation
…ked, from Maybe to Dropped and Lifted
phadej
requested changes
Feb 15, 2020
Collaborator
phadej
left a comment
There was a problem hiding this comment.
Looks good, few comments inline.
…om Maybe to Dropped/Lifted
Contributor
Author
|
Remarks applied. Please re-review. |
Merged
Collaborator
|
I made few extra additions in #100 and published https://hackage.haskell.org/package/lattices-2.0.2 Thanks you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce Stacked data type isomorphic to Either.
Add (Lattice a, Lattice b) => Lattice (Stacked a b) instance constructed by considering all minimal elements of b covering all maximal elements of a.
Add conversion functions from Either to Stacked.
Add conversion functions from Maybe to Dropped and Lifted.
Motivation for conversion functions is to allow for easy integration with ecosystem that pervasively uses Either and Maybe.
Disclaimer: I didn't manage to include QC.CoArbitrary and QC.Function instances of Stacked, need help in that.
I'm open to idea/naming/code style suggestions.