mirror of
https://github.com/xmonad/xmonad.git
synced 2025-05-19 08:30:21 -07:00
commit
6e35910b62
13
.github/workflows/haskell-ci.yml
vendored
13
.github/workflows/haskell-ci.yml
vendored
@ -8,9 +8,9 @@
|
|||||||
#
|
#
|
||||||
# For more information, see https://github.com/haskell-CI/haskell-ci
|
# For more information, see https://github.com/haskell-CI/haskell-ci
|
||||||
#
|
#
|
||||||
# version: 0.15.20221009
|
# version: 0.15.202211107
|
||||||
#
|
#
|
||||||
# REGENDATA ("0.15.20221009",["github","cabal.project"])
|
# REGENDATA ("0.15.202211107",["github","cabal.project"])
|
||||||
#
|
#
|
||||||
name: Haskell-CI
|
name: Haskell-CI
|
||||||
on:
|
on:
|
||||||
@ -40,9 +40,9 @@ jobs:
|
|||||||
compilerVersion: 9.4.2
|
compilerVersion: 9.4.2
|
||||||
setup-method: ghcup
|
setup-method: ghcup
|
||||||
allow-failure: false
|
allow-failure: false
|
||||||
- compiler: ghc-9.2.4
|
- compiler: ghc-9.2.5
|
||||||
compilerKind: ghc
|
compilerKind: ghc
|
||||||
compilerVersion: 9.2.4
|
compilerVersion: 9.2.5
|
||||||
setup-method: ghcup
|
setup-method: ghcup
|
||||||
allow-failure: false
|
allow-failure: false
|
||||||
- compiler: ghc-9.0.2
|
- compiler: ghc-9.0.2
|
||||||
@ -66,11 +66,6 @@ jobs:
|
|||||||
compilerVersion: 8.6.5
|
compilerVersion: 8.6.5
|
||||||
setup-method: hvr-ppa
|
setup-method: hvr-ppa
|
||||||
allow-failure: false
|
allow-failure: false
|
||||||
- compiler: ghc-8.4.4
|
|
||||||
compilerKind: ghc
|
|
||||||
compilerVersion: 8.4.4
|
|
||||||
setup-method: hvr-ppa
|
|
||||||
allow-failure: false
|
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
- name: apt
|
- name: apt
|
||||||
|
2
.github/workflows/stack.yml
vendored
2
.github/workflows/stack.yml
vendored
@ -12,11 +12,11 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- resolver: lts-12 # GHC 8.4
|
|
||||||
- resolver: lts-14 # GHC 8.6
|
- resolver: lts-14 # GHC 8.6
|
||||||
- resolver: lts-16 # GHC 8.8
|
- resolver: lts-16 # GHC 8.8
|
||||||
- resolver: lts-18 # GHC 8.10
|
- resolver: lts-18 # GHC 8.10
|
||||||
- resolver: lts-19 # GHC 9.0
|
- resolver: lts-19 # GHC 9.0
|
||||||
|
- resolver: lts-20 # GHC 9.2
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone project
|
- name: Clone project
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
### Breaking Changes
|
### Breaking Changes
|
||||||
|
|
||||||
|
* Dropped support for GHC 8.4.
|
||||||
|
|
||||||
### Enhancements
|
### Enhancements
|
||||||
|
|
||||||
* Exported `sendRestart` and `sendReplace` from `XMonad.Operations`.
|
* Exported `sendRestart` and `sendReplace` from `XMonad.Operations`.
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||||
{-# LANGUAGE NamedFieldPuns #-}
|
{-# LANGUAGE NamedFieldPuns #-}
|
||||||
{-# LANGUAGE ScopedTypeVariables #-}
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
|
{-# LANGUAGE DerivingVia #-}
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
-- |
|
-- |
|
||||||
@ -48,7 +49,7 @@ import Control.Monad.Fail
|
|||||||
import Control.Monad.Fix (fix)
|
import Control.Monad.Fix (fix)
|
||||||
import Control.Monad.State
|
import Control.Monad.State
|
||||||
import Control.Monad.Reader
|
import Control.Monad.Reader
|
||||||
import Control.Monad (filterM, guard, liftM2, void, when)
|
import Control.Monad (filterM, guard, void, when)
|
||||||
import Data.Semigroup
|
import Data.Semigroup
|
||||||
import Data.Traversable (for)
|
import Data.Traversable (for)
|
||||||
import Data.Time.Clock (UTCTime)
|
import Data.Time.Clock (UTCTime)
|
||||||
@ -70,6 +71,7 @@ import Graphics.X11.Xlib.Extras (getWindowAttributes, WindowAttributes, Event)
|
|||||||
import Data.Typeable
|
import Data.Typeable
|
||||||
import Data.List (isInfixOf, (\\))
|
import Data.List (isInfixOf, (\\))
|
||||||
import Data.Maybe (isJust,fromMaybe)
|
import Data.Maybe (isJust,fromMaybe)
|
||||||
|
import Data.Monoid (Ap(..))
|
||||||
|
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
import qualified Data.Set as S
|
import qualified Data.Set as S
|
||||||
@ -165,12 +167,7 @@ newtype ScreenDetail = SD { screenRect :: Rectangle }
|
|||||||
--
|
--
|
||||||
newtype X a = X (ReaderT XConf (StateT XState IO) a)
|
newtype X a = X (ReaderT XConf (StateT XState IO) a)
|
||||||
deriving (Functor, Applicative, Monad, MonadFail, MonadIO, MonadState XState, MonadReader XConf)
|
deriving (Functor, Applicative, Monad, MonadFail, MonadIO, MonadState XState, MonadReader XConf)
|
||||||
|
deriving (Semigroup, Monoid) via Ap (ReaderT XConf (StateT XState IO)) a
|
||||||
instance Semigroup a => Semigroup (X a) where
|
|
||||||
(<>) = liftM2 (<>)
|
|
||||||
|
|
||||||
instance (Monoid a) => Monoid (X a) where
|
|
||||||
mempty = pure mempty
|
|
||||||
|
|
||||||
instance Default a => Default (X a) where
|
instance Default a => Default (X a) where
|
||||||
def = return def
|
def = return def
|
||||||
@ -178,16 +175,11 @@ instance Default a => Default (X a) where
|
|||||||
type ManageHook = Query (Endo WindowSet)
|
type ManageHook = Query (Endo WindowSet)
|
||||||
newtype Query a = Query (ReaderT Window X a)
|
newtype Query a = Query (ReaderT Window X a)
|
||||||
deriving (Functor, Applicative, Monad, MonadReader Window, MonadIO)
|
deriving (Functor, Applicative, Monad, MonadReader Window, MonadIO)
|
||||||
|
deriving (Semigroup, Monoid) via Ap (ReaderT Window X) a
|
||||||
|
|
||||||
runQuery :: Query a -> Window -> X a
|
runQuery :: Query a -> Window -> X a
|
||||||
runQuery (Query m) = runReaderT m
|
runQuery (Query m) = runReaderT m
|
||||||
|
|
||||||
instance Semigroup a => Semigroup (Query a) where
|
|
||||||
(<>) = liftM2 (<>)
|
|
||||||
|
|
||||||
instance Monoid a => Monoid (Query a) where
|
|
||||||
mempty = pure mempty
|
|
||||||
|
|
||||||
instance Default a => Default (Query a) where
|
instance Default a => Default (Query a) where
|
||||||
def = return def
|
def = return def
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
resolver: lts-19.6
|
resolver: lts-20.0
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
- ./
|
- ./
|
||||||
@ -6,13 +6,6 @@ packages:
|
|||||||
extra-deps:
|
extra-deps:
|
||||||
- X11-1.10
|
- X11-1.10
|
||||||
|
|
||||||
flags:
|
|
||||||
xmonad:
|
|
||||||
# stack doesn't support automatic flags
|
|
||||||
# https://cabal.readthedocs.io/en/latest/cabal-package.html#resolution-of-conditions-and-flags
|
|
||||||
# https://github.com/commercialhaskell/stack/issues/1313#issuecomment-157259270
|
|
||||||
quickcheck-classes: false
|
|
||||||
|
|
||||||
nix:
|
nix:
|
||||||
packages:
|
packages:
|
||||||
- zlib
|
- zlib
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
{-# LANGUAGE CPP #-}
|
|
||||||
{-# LANGUAGE ScopedTypeVariables #-}
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
|
|
||||||
#ifdef VERSION_quickcheck_classes
|
|
||||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||||
#endif
|
|
||||||
|
|
||||||
module Properties.Stack where
|
module Properties.Stack where
|
||||||
|
|
||||||
@ -15,13 +11,11 @@ import qualified XMonad.StackSet as S (filter)
|
|||||||
|
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
|
|
||||||
#ifdef VERSION_quickcheck_classes
|
|
||||||
import Data.Proxy
|
import Data.Proxy
|
||||||
import Test.QuickCheck.Classes (
|
import Test.QuickCheck.Classes (
|
||||||
Laws (lawsTypeclass, lawsProperties), Proxy1 (Proxy1),
|
Laws (lawsTypeclass, lawsProperties), Proxy1 (Proxy1),
|
||||||
foldableLaws, traversableLaws,
|
foldableLaws, traversableLaws,
|
||||||
)
|
)
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
-- The list returned by index should be the same length as the actual
|
-- The list returned by index should be the same length as the actual
|
||||||
@ -65,7 +59,6 @@ prop_differentiate xs =
|
|||||||
where _ = xs :: [Int]
|
where _ = xs :: [Int]
|
||||||
|
|
||||||
|
|
||||||
#ifdef VERSION_quickcheck_classes
|
|
||||||
-- Check type class laws of 'Data.Foldable.Foldable' and 'Data.Traversable.Traversable'.
|
-- Check type class laws of 'Data.Foldable.Foldable' and 'Data.Traversable.Traversable'.
|
||||||
newtype TestStack a = TestStack (Stack a)
|
newtype TestStack a = TestStack (Stack a)
|
||||||
deriving (Eq, Read, Show, Foldable, Functor)
|
deriving (Eq, Read, Show, Foldable, Functor)
|
||||||
@ -82,6 +75,3 @@ prop_laws_Stack = format (foldableLaws p) <> format (traversableLaws p)
|
|||||||
p = Proxy :: Proxy TestStack
|
p = Proxy :: Proxy TestStack
|
||||||
format laws = [ ("Stack: " <> lawsTypeclass laws <> ": " <> name, prop)
|
format laws = [ ("Stack: " <> lawsTypeclass laws <> ": " <> name, prop)
|
||||||
| (name, prop) <- lawsProperties laws ]
|
| (name, prop) <- lawsProperties laws ]
|
||||||
#else
|
|
||||||
prop_laws_Stack = []
|
|
||||||
#endif
|
|
||||||
|
14
xmonad.cabal
14
xmonad.cabal
@ -27,7 +27,7 @@ author: Spencer Janssen, Don Stewart, Adam Vogt, David Roundy, Jason
|
|||||||
Ondřej Súkup, Paul Hebble, Shachaf Ben-Kiki, Siim Põder, Tim McIver,
|
Ondřej Súkup, Paul Hebble, Shachaf Ben-Kiki, Siim Põder, Tim McIver,
|
||||||
Trevor Elliott, Wouter Swierstra, Conrad Irwin, Tim Thelion, Tony Zorman
|
Trevor Elliott, Wouter Swierstra, Conrad Irwin, Tim Thelion, Tony Zorman
|
||||||
maintainer: xmonad@haskell.org
|
maintainer: xmonad@haskell.org
|
||||||
tested-with: GHC == 8.4.4 || == 8.6.5 || == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.4 || == 9.4.2
|
tested-with: GHC == 8.6.5 || == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.5 || == 9.4.2
|
||||||
category: System
|
category: System
|
||||||
homepage: http://xmonad.org
|
homepage: http://xmonad.org
|
||||||
bug-reports: https://github.com/xmonad/xmonad/issues
|
bug-reports: https://github.com/xmonad/xmonad/issues
|
||||||
@ -54,8 +54,6 @@ flag pedantic
|
|||||||
default: False
|
default: False
|
||||||
manual: True
|
manual: True
|
||||||
|
|
||||||
flag quickcheck-classes
|
|
||||||
|
|
||||||
library
|
library
|
||||||
exposed-modules: XMonad
|
exposed-modules: XMonad
|
||||||
XMonad.Config
|
XMonad.Config
|
||||||
@ -83,7 +81,7 @@ library
|
|||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
|
||||||
-- Keep this in sync with the oldest version in 'tested-with'
|
-- Keep this in sync with the oldest version in 'tested-with'
|
||||||
if impl(ghc > 8.4.4)
|
if impl(ghc > 8.6.5)
|
||||||
ghc-options: -Wno-unused-imports
|
ghc-options: -Wno-unused-imports
|
||||||
|
|
||||||
if flag(pedantic)
|
if flag(pedantic)
|
||||||
@ -96,7 +94,7 @@ executable xmonad
|
|||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
|
||||||
-- Keep this in sync with the oldest version in 'tested-with'
|
-- Keep this in sync with the oldest version in 'tested-with'
|
||||||
if impl(ghc > 8.4.4)
|
if impl(ghc > 8.6.5)
|
||||||
ghc-options: -Wno-unused-imports
|
ghc-options: -Wno-unused-imports
|
||||||
|
|
||||||
if flag(pedantic)
|
if flag(pedantic)
|
||||||
@ -125,15 +123,11 @@ test-suite properties
|
|||||||
hs-source-dirs: tests
|
hs-source-dirs: tests
|
||||||
build-depends: base
|
build-depends: base
|
||||||
, QuickCheck >= 2
|
, QuickCheck >= 2
|
||||||
|
, quickcheck-classes >= 0.4.3
|
||||||
, X11
|
, X11
|
||||||
, containers
|
, containers
|
||||||
, xmonad
|
, xmonad
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
|
||||||
if flag(quickcheck-classes) && impl(ghc > 8.5)
|
|
||||||
-- no quickcheck-classes in LTS-12
|
|
||||||
-- GHC 8.4 and lower needs too much boilerplate (Eq1, Show1, …)
|
|
||||||
build-depends: quickcheck-classes >= 0.4.3
|
|
||||||
|
|
||||||
if flag(pedantic)
|
if flag(pedantic)
|
||||||
ghc-options: -Werror
|
ghc-options: -Werror
|
||||||
|
Loading…
x
Reference in New Issue
Block a user