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
With the instance (Semiring a) => Semiring (Maybe a), neither of these hold for a = Nothing - since mul is defined as liftA2 mul, zero * Nothing = Nothing, but zero = Just zero. Changing the definition of zero to be Nothing could fix this but might break other laws, I'm not sure. Maybe we should just remove this instance.
The text was updated successfully, but these errors were encountered:
Semiring
has the following law:zero * a = zero
With the instance
(Semiring a) => Semiring (Maybe a)
, neither of these hold fora = Nothing
- sincemul
is defined asliftA2 mul
,zero * Nothing = Nothing
, butzero = Just zero
. Changing the definition ofzero
to beNothing
could fix this but might break other laws, I'm not sure. Maybe we should just remove this instance.The text was updated successfully, but these errors were encountered: