about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/haskell-modules/patches/xmonad-contrib-ghc-8.4.1-fix.patch
blob: 3917c2f0afd72187337cc74033ae40fffe3da636 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
From 86595e193e8d46c769ab2a1cee961e8e04dfd1b9 Mon Sep 17 00:00:00 2001
From: Michiel Derhaeg <derhaeg.michiel@gmail.com>
Date: Tue, 20 Mar 2018 22:06:18 +0100
Subject: [PATCH] update to work with GHC 8.4.1

---
 XMonad/Hooks/FadeWindows.hs     |  6 +++++-
 XMonad/Hooks/WallpaperSetter.hs |  6 +++++-
 XMonad/Layout/Mosaic.hs         |  6 +++++-
 xmonad-contrib.cabal            |  5 +++--
 5 files changed, 33 insertions(+), 5 deletions(-)

diff --git a/XMonad/Hooks/FadeWindows.hs b/XMonad/Hooks/FadeWindows.hs
index 4b8e62b6..01d06792 100644
--- a/XMonad/Hooks/FadeWindows.hs
+++ b/XMonad/Hooks/FadeWindows.hs
@@ -61,7 +61,8 @@ import           Control.Monad.Reader                    (ask
                                                          ,asks)
 import           Control.Monad.State                     (gets)
 import qualified Data.Map                    as M
-import           Data.Monoid
+import           Data.Monoid                      hiding ((<>))
+import           Data.Semigroup
 
 import           Graphics.X11.Xlib.Extras                (Event(..))
 
@@ -134,6 +135,9 @@ instance Monoid Opacity where
   r      `mappend` OEmpty = r
   _      `mappend` r      = r
 
+instance Semigroup Opacity where
+  (<>) = mappend
+
 -- | A FadeHook is similar to a ManageHook, but records window opacity.
 type FadeHook = Query Opacity
 
diff --git a/XMonad/Hooks/WallpaperSetter.hs b/XMonad/Hooks/WallpaperSetter.hs
index 00a3b1c3..d4f5ccb2 100644
--- a/XMonad/Hooks/WallpaperSetter.hs
+++ b/XMonad/Hooks/WallpaperSetter.hs
@@ -41,7 +41,8 @@ import Data.Ord (comparing)
 import Control.Monad
 import Control.Applicative
 import Data.Maybe
-import Data.Monoid
+import Data.Monoid hiding ((<>))
+import Data.Semigroup
 
 -- $usage
 -- This module requires imagemagick and feh to be installed, as these are utilized
@@ -86,6 +87,9 @@ instance Monoid WallpaperList where
   mappend (WallpaperList w1) (WallpaperList w2) =
     WallpaperList $ M.toList $ (M.fromList w2) `M.union` (M.fromList w1)
 
+instance Semigroup WallpaperList where
+  (<>) = mappend
+
 -- | Complete wallpaper configuration passed to the hook
 data WallpaperConf = WallpaperConf {
     wallpaperBaseDir :: FilePath  -- ^ Where the wallpapers reside (if empty, will look in \~\/.wallpapers/)
diff --git a/XMonad/Layout/Mosaic.hs b/XMonad/Layout/Mosaic.hs
index 05655d4c..da44fc50 100644
--- a/XMonad/Layout/Mosaic.hs
+++ b/XMonad/Layout/Mosaic.hs
@@ -38,7 +38,8 @@ import Control.Monad(mplus)
 import Data.Foldable(Foldable,foldMap, sum)
 import Data.Function(on)
 import Data.List(sortBy)
-import Data.Monoid(Monoid,mempty, mappend)
+import Data.Monoid(Monoid,mempty, mappend, (<>))
+import Data.Semigroup
 
 
 -- $usage
@@ -202,6 +203,9 @@ instance Monoid (Tree a) where
     mappend x Empty = x
     mappend x y = Branch x y
 
+instance Semigroup (Tree a) where
+    (<>) = mappend
+
 makeTree ::  (Num a1, Ord a1) => (a -> a1) -> [a] -> Tree a
 makeTree _ [] = Empty
 makeTree _ [x] = Leaf x
diff --git a/xmonad-contrib.cabal b/xmonad-contrib.cabal
index dde3ccda..c401c6e6 100644
--- a/xmonad-contrib.cabal
+++ b/xmonad-contrib.cabal
@@ -36,7 +36,7 @@ cabal-version:      >= 1.6
 build-type:         Simple
 bug-reports:        https://github.com/xmonad/xmonad-contrib/issues
 
-tested-with: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.1
+tested-with: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.1, GHC==8.2.2, GHC==8.4.1
 
 source-repository head
   type:     git
@@ -66,7 +66,8 @@ library
                    unix,
                    X11>=1.6.1 && < 1.9,
                    xmonad>=0.13   && < 0.14,
-                   utf8-string
+                   utf8-string,
+                   semigroups
 
     if flag(use_xft)
         build-depends: X11-xft >= 0.2