Closed
Description
Semiring
has the following law:
zero * a = zero
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.
Metadata
Metadata
Assignees
Labels
No labels