mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 15:15:36 +00:00
108 lines
3.7 KiB
Diff
108 lines
3.7 KiB
Diff
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
|