-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 SplitLaws, SplitTests, and SplitSyntax #232
Conversation
I think I've derived the So every |
Seems good to me 👍 |
def eqv(x: (A, B), y: (A, B)): Boolean = | ||
A.eqv(x._1, y._1) && B.eqv(x._2, y._2) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be defined in the std
module instead of in laws?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see the issue is that laws
currently doesn't depend on std
does it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That instance is required in tests
but defined in laws
because the Eq[A => B]
instance was already there. I think it should ultimately come from algebra.std
. Guess I need to open a PR there.
I'd like to not hold up this PR by waiting until this instance appears in algebra.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it's smart to define the instances we need here, and then remove them when algebra adds them.
👍 |
Add SplitLaws, SplitTests, and SplitSyntax
This PR adds
SplitLaws
,SplitTests
, andSplitSyntax
. I'm submitting this PR although I'm not totally confident that thesplitInterchange
law I've defined is sound. I just tried to relatesplit
withandThen
in a minimal fashion. I've not seen this law anywhere else and I still want to check if it can be derived from the arrow laws.Anyone know where
Split
is originally coming from and which laws it should obey?