irrefutable pattern

This commit is contained in:
Willem Van Onsem 2021-06-10 23:15:48 +02:00
parent ed04989938
commit 81b6151d51
No known key found for this signature in database
GPG Key ID: 1D22C3A122D794F4

View File

@ -154,7 +154,7 @@ instance (NFData v) => NFData (MaybeDefault v) where
instance Eq v => Semigroup (MaybeDefault v) where instance Eq v => Semigroup (MaybeDefault v) where
_ <> v@(SetTo _) = v _ <> v@(SetTo _) = v
x <> KeepCurrent = x x <> KeepCurrent = x
_ <> Default = Default _ <> ~Default = Default
instance Eq v => Monoid ( MaybeDefault v ) where instance Eq v => Monoid ( MaybeDefault v ) where
mempty = KeepCurrent mempty = KeepCurrent