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
Thus, even though a MonoFunctor instance for Set could theoretically be defined, it is omitted since it could violate the functor law of omap f . omap g = omap (f . g).
The current docs in Data.Eq specifies that Eq is expected to follow the substitutivity law (modulo private functions, such as showTree and friends), so this functor law could only be violated via an unlawful instance.
Since it is well established that laws are not expected to hold in the presence of law violating instances (Foldable for Set onto a non-associative Monoid violates laws for example), I think it's worth considering adding this instance.
The text was updated successfully, but these errors were encountered:
The current docs in
Data.Eq
specifies thatEq
is expected to follow the substitutivity law (modulo private functions, such asshowTree
and friends), so this functor law could only be violated via an unlawful instance.Since it is well established that laws are not expected to hold in the presence of law violating instances (
Foldable
forSet
onto a non-associativeMonoid
violates laws for example), I think it's worth considering adding this instance.The text was updated successfully, but these errors were encountered: