mirror of
https://github.com/xmonad/xmonad.git
synced 2025-07-26 01:31:53 -07:00
Merge pull request #153 from vmchale/master
update to work with latest GHC
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
the focus follows when the mouse enters another workspace
|
||||
but not moving into any window.
|
||||
|
||||
* Compiles with GHC 8.4.0
|
||||
|
||||
* Restored compatability with GHC version prior to 8.0.1 by removing the
|
||||
dependency on directory version 1.2.3.
|
||||
|
||||
|
@@ -39,6 +39,7 @@ import qualified Control.Exception.Extensible as E
|
||||
import Control.Applicative
|
||||
import Control.Monad.State
|
||||
import Control.Monad.Reader
|
||||
import Data.Semigroup
|
||||
import Data.Default
|
||||
import System.FilePath
|
||||
import System.IO
|
||||
@@ -56,7 +57,7 @@ import Graphics.X11.Xlib.Extras (getWindowAttributes, WindowAttributes, Event)
|
||||
import Data.Typeable
|
||||
import Data.List ((\\))
|
||||
import Data.Maybe (isJust,fromMaybe)
|
||||
import Data.Monoid
|
||||
import Data.Monoid hiding ((<>))
|
||||
import System.Environment (lookupEnv)
|
||||
|
||||
import qualified Data.Map as M
|
||||
@@ -152,6 +153,9 @@ instance Applicative X where
|
||||
pure = return
|
||||
(<*>) = ap
|
||||
|
||||
instance Semigroup a => Semigroup (X a) where
|
||||
(<>) = liftM2 (<>)
|
||||
|
||||
instance (Monoid a) => Monoid (X a) where
|
||||
mempty = return mempty
|
||||
mappend = liftM2 mappend
|
||||
@@ -166,6 +170,9 @@ newtype Query a = Query (ReaderT Window X a)
|
||||
runQuery :: Query a -> Window -> X a
|
||||
runQuery (Query m) w = runReaderT m w
|
||||
|
||||
instance Semigroup a => Semigroup (Query a) where
|
||||
(<>) = liftM2 (<>)
|
||||
|
||||
instance Monoid a => Monoid (Query a) where
|
||||
mempty = return mempty
|
||||
mappend = liftM2 mappend
|
||||
|
@@ -32,7 +32,8 @@ tested-with:
|
||||
GHC==7.6.3,
|
||||
GHC==7.8.4,
|
||||
GHC==7.10.3,
|
||||
GHC==8.0.1
|
||||
GHC==8.0.1,
|
||||
GHC==8.2.2
|
||||
|
||||
data-files: man/xmonad.hs, man/xmonad.1, man/xmonad.1.html
|
||||
|
||||
@@ -78,7 +79,8 @@ library
|
||||
process,
|
||||
unix,
|
||||
utf8-string >= 0.3 && < 1.1,
|
||||
X11>=1.8 && < 1.9
|
||||
X11>=1.8 && < 1.9,
|
||||
semigroups
|
||||
|
||||
if true
|
||||
ghc-options: -funbox-strict-fields -Wall
|
||||
|
Reference in New Issue
Block a user