You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's missing. I can't tell if it follows from other laws, but I suspect that it might, particularly the associativity law and the fmap id = id law. It's hard to do much nasty with a lawful functor. I have no proof of this.
If this test is added for Alt, is it added for Alternative too? I would think Alternative should satisfy all the properties Alt should. But this law is not mentioned in the Alternative docs. So what happens?
It's missing. I can't tell if it follows from other laws, but I suspect that it might, particularly the associativity law and the fmap id = id law. It's hard to do much nasty with a lawful functor. I have no proof of this.
Worth bugging Ed maybe?
If this test is added for Alt, is it added for Alternative too? I would think Alternative should satisfy all the properties Alt should. But this law is not mentioned in the Alternative docs. So what happens?
I think I'd want to test that one empirically. Could make a separate test that pulls in a bunch of packages and checks the law for a bunch of types. Possibly by making something that uses TH to gin it up.
Not suggesting you necessarily you do that here for checkers, but I'd like to know how the existing ecosystem behaves WRT the law and if there are prominent or frequent violations I'd want to dig in and understand why before I start enforcing it above and beyond what Alternative is conventionally understood to require.
Greetings from https://github.com/bitemyapp/hedgehog-checkers
Two laws are mentioned for Alt, is there a reason
checkers
only validates the associativity and not left-distribution?Cf. https://hackage.haskell.org/package/semigroupoids-5.2.1/docs/Data-Functor-Alt.html#t:Alt
And
Is it like Functor distribution being derivable from identity or is it missing?
/cc @gwils
The text was updated successfully, but these errors were encountered: