update to work with GHC 8.4.1

This commit is contained in:
Michiel Derhaeg 2018-03-20 22:06:18 +01:00
parent 3d3e898166
commit 86595e193e
5 changed files with 33 additions and 5 deletions

View File

@ -96,6 +96,21 @@
### Bug Fixes and Minor Changes ### Bug Fixes and Minor Changes
* XMonad.Hooks.FadeWindows
Added support for GHC version 8.4.x by adding a Semigroup instance for
Monoids
* XMonad.Hooks.WallpaperSetter
Added support for GHC version 8.4.x by adding a Semigroup instance for
Monoids
* XMonad.Hooks.Mosaic
Added support for GHC version 8.4.x by adding a Semigroup instance for
Monoids
* `XMonad.Actions.Navigation2D` * `XMonad.Actions.Navigation2D`
Added `sideNavigation` and a parameterised variant, providing a navigation Added `sideNavigation` and a parameterised variant, providing a navigation

View File

@ -61,7 +61,8 @@ import Control.Monad.Reader (ask
,asks) ,asks)
import Control.Monad.State (gets) import Control.Monad.State (gets)
import qualified Data.Map as M import qualified Data.Map as M
import Data.Monoid import Data.Monoid hiding ((<>))
import Data.Semigroup
import Graphics.X11.Xlib.Extras (Event(..)) import Graphics.X11.Xlib.Extras (Event(..))
@ -134,6 +135,9 @@ instance Monoid Opacity where
r `mappend` OEmpty = r r `mappend` OEmpty = r
_ `mappend` r = r _ `mappend` r = r
instance Semigroup Opacity where
(<>) = mappend
-- | A FadeHook is similar to a ManageHook, but records window opacity. -- | A FadeHook is similar to a ManageHook, but records window opacity.
type FadeHook = Query Opacity type FadeHook = Query Opacity

View File

@ -41,7 +41,8 @@ import Data.Ord (comparing)
import Control.Monad import Control.Monad
import Control.Applicative import Control.Applicative
import Data.Maybe import Data.Maybe
import Data.Monoid import Data.Monoid hiding ((<>))
import Data.Semigroup
-- $usage -- $usage
-- This module requires imagemagick and feh to be installed, as these are utilized -- 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) = mappend (WallpaperList w1) (WallpaperList w2) =
WallpaperList $ M.toList $ (M.fromList w2) `M.union` (M.fromList w1) WallpaperList $ M.toList $ (M.fromList w2) `M.union` (M.fromList w1)
instance Semigroup WallpaperList where
(<>) = mappend
-- | Complete wallpaper configuration passed to the hook -- | Complete wallpaper configuration passed to the hook
data WallpaperConf = WallpaperConf { data WallpaperConf = WallpaperConf {
wallpaperBaseDir :: FilePath -- ^ Where the wallpapers reside (if empty, will look in \~\/.wallpapers/) wallpaperBaseDir :: FilePath -- ^ Where the wallpapers reside (if empty, will look in \~\/.wallpapers/)

View File

@ -38,7 +38,8 @@ import Control.Monad(mplus)
import Data.Foldable(Foldable,foldMap, sum) import Data.Foldable(Foldable,foldMap, sum)
import Data.Function(on) import Data.Function(on)
import Data.List(sortBy) import Data.List(sortBy)
import Data.Monoid(Monoid,mempty, mappend) import Data.Monoid(Monoid,mempty, mappend, (<>))
import Data.Semigroup
-- $usage -- $usage
@ -202,6 +203,9 @@ instance Monoid (Tree a) where
mappend x Empty = x mappend x Empty = x
mappend x y = Branch x y mappend x y = Branch x y
instance Semigroup (Tree a) where
(<>) = mappend
makeTree :: (Num a1, Ord a1) => (a -> a1) -> [a] -> Tree a makeTree :: (Num a1, Ord a1) => (a -> a1) -> [a] -> Tree a
makeTree _ [] = Empty makeTree _ [] = Empty
makeTree _ [x] = Leaf x makeTree _ [x] = Leaf x

View File

@ -36,7 +36,7 @@ cabal-version: >= 1.6
build-type: Simple build-type: Simple
bug-reports: https://github.com/xmonad/xmonad-contrib/issues 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 source-repository head
type: git type: git
@ -66,7 +66,8 @@ library
unix, unix,
X11>=1.6.1 && < 1.9, X11>=1.6.1 && < 1.9,
xmonad>=0.13 && < 0.14, xmonad>=0.13 && < 0.14,
utf8-string utf8-string,
semigroups
if flag(use_xft) if flag(use_xft)
build-depends: X11-xft >= 0.2 build-depends: X11-xft >= 0.2