aboutsummaryrefslogtreecommitdiff
path: root/Types/DesktopNotify.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Types/DesktopNotify.hs')
-rw-r--r--Types/DesktopNotify.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Types/DesktopNotify.hs b/Types/DesktopNotify.hs
index e6df05ab1..0b2da9377 100644
--- a/Types/DesktopNotify.hs
+++ b/Types/DesktopNotify.hs
@@ -1,6 +1,7 @@
{- git-annex DesktopNotify type
-
- Copyright 2014 Joey Hess <id@joeyh.name>
+ - Copyright 2022 Benjamin Barenblat <bbarenblat@gmail.com>
-
- Licensed under the GNU GPL version 3 or higher.
-}
@@ -16,10 +17,12 @@ data DesktopNotify = DesktopNotify
}
deriving (Show)
+instance Semigroup DesktopNotify where
+ DesktopNotify s1 f1 <> DesktopNotify s2 f2 =
+ DesktopNotify (s1 || s2) (f1 || f2)
+
instance Monoid DesktopNotify where
mempty = DesktopNotify False False
- mappend (DesktopNotify s1 f1) (DesktopNotify s2 f2) =
- DesktopNotify (s1 || s2) (f1 || f2)
mkNotifyStart :: DesktopNotify
mkNotifyStart = DesktopNotify True False