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
|
||||
#
|
||||
# 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
|
||||
on:
|
||||
@ -40,9 +40,9 @@ jobs:
|
||||
compilerVersion: 9.4.2
|
||||
setup-method: ghcup
|
||||
allow-failure: false
|
||||
- compiler: ghc-9.2.4
|
||||
- compiler: ghc-9.2.5
|
||||
compilerKind: ghc
|
||||
compilerVersion: 9.2.4
|
||||
compilerVersion: 9.2.5
|
||||
setup-method: ghcup
|
||||
allow-failure: false
|
||||
- compiler: ghc-9.0.2
|
||||
@ -66,11 +66,6 @@ jobs:
|
||||
compilerVersion: 8.6.5
|
||||
setup-method: hvr-ppa
|
||||
allow-failure: false
|
||||
- compiler: ghc-8.4.4
|
||||
compilerKind: ghc
|
||||
compilerVersion: 8.4.4
|
||||
setup-method: hvr-ppa
|
||||
allow-failure: false
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: apt
|
||||
|
2
.github/workflows/stack.yml
vendored
2
.github/workflows/stack.yml
vendored
@ -12,11 +12,11 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- resolver: lts-12 # GHC 8.4
|
||||
- resolver: lts-14 # GHC 8.6
|
||||
- resolver: lts-16 # GHC 8.8
|
||||
- resolver: lts-18 # GHC 8.10
|
||||
- resolver: lts-19 # GHC 9.0
|
||||
- resolver: lts-20 # GHC 9.2
|
||||
|
||||
steps:
|
||||
- name: Clone project
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
* Dropped support for GHC 8.4.
|
||||
|
||||
### Enhancements
|
||||
|
||||
* Exported `sendRestart` and `sendReplace` from `XMonad.Operations`.
|
||||
|
@ -7,6 +7,7 @@
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE NamedFieldPuns #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE DerivingVia #-}
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- |
|
||||
@ -48,7 +49,7 @@ import Control.Monad.Fail
|
||||
import Control.Monad.Fix (fix)
|
||||
import Control.Monad.State
|
||||
import Control.Monad.Reader
|
||||
import Control.Monad (filterM, guard, liftM2, void, when)
|
||||
import Control.Monad (filterM, guard, void, when)
|
||||
import Data.Semigroup
|
||||
import Data.Traversable (for)
|
||||
import Data.Time.Clock (UTCTime)
|
||||
@ -70,6 +71,7 @@ import Graphics.X11.Xlib.Extras (getWindowAttributes, WindowAttributes, Event)
|
||||
import Data.Typeable
|
||||
import Data.List (isInfixOf, (\\))
|
||||
import Data.Maybe (isJust,fromMaybe)
|
||||
import Data.Monoid (Ap(..))
|
||||
|
||||
import qualified Data.Map as M
|
||||
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)
|
||||
deriving (Functor, Applicative, Monad, MonadFail, MonadIO, MonadState XState, MonadReader XConf)
|
||||
|
||||
instance Semigroup a => Semigroup (X a) where
|
||||
(<>) = liftM2 (<>)
|
||||
|
||||
instance (Monoid a) => Monoid (X a) where
|
||||
mempty = pure mempty
|
||||
deriving (Semigroup, Monoid) via Ap (ReaderT XConf (StateT XState IO)) a
|
||||
|
||||
instance Default a => Default (X a) where
|
||||
def = return def
|
||||
@ -178,16 +175,11 @@ instance Default a => Default (X a) where
|
||||
type ManageHook = Query (Endo WindowSet)
|
||||
newtype Query a = Query (ReaderT Window X a)
|
||||
deriving (Functor, Applicative, Monad, MonadReader Window, MonadIO)
|
||||
deriving (Semigroup, Monoid) via Ap (ReaderT Window X) a
|
||||
|
||||
runQuery :: Query a -> Window -> X a
|
||||
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
|
||||
def = return def
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
resolver: lts-19.6
|
||||
resolver: lts-20.0
|
||||
|
||||
packages:
|
||||
- ./
|
||||
@ -6,13 +6,6 @@ packages:
|
||||
extra-deps:
|
||||
- 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:
|
||||
packages:
|
||||
- zlib
|
||||
|
@ -1,9 +1,5 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
|
||||
#ifdef VERSION_quickcheck_classes
|
||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||
#endif
|
||||
|
||||
module Properties.Stack where
|
||||
|
||||
@ -15,13 +11,11 @@ import qualified XMonad.StackSet as S (filter)
|
||||
|
||||
import Data.Maybe
|
||||
|
||||
#ifdef VERSION_quickcheck_classes
|
||||
import Data.Proxy
|
||||
import Test.QuickCheck.Classes (
|
||||
Laws (lawsTypeclass, lawsProperties), Proxy1 (Proxy1),
|
||||
foldableLaws, traversableLaws,
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
-- The list returned by index should be the same length as the actual
|
||||
@ -65,7 +59,6 @@ prop_differentiate xs =
|
||||
where _ = xs :: [Int]
|
||||
|
||||
|
||||
#ifdef VERSION_quickcheck_classes
|
||||
-- Check type class laws of 'Data.Foldable.Foldable' and 'Data.Traversable.Traversable'.
|
||||
newtype TestStack a = TestStack (Stack a)
|
||||
deriving (Eq, Read, Show, Foldable, Functor)
|
||||
@ -82,6 +75,3 @@ prop_laws_Stack = format (foldableLaws p) <> format (traversableLaws p)
|
||||
p = Proxy :: Proxy TestStack
|
||||
format laws = [ ("Stack: " <> lawsTypeclass laws <> ": " <> name, prop)
|
||||
| (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,
|
||||
Trevor Elliott, Wouter Swierstra, Conrad Irwin, Tim Thelion, Tony Zorman
|
||||
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
|
||||
homepage: http://xmonad.org
|
||||
bug-reports: https://github.com/xmonad/xmonad/issues
|
||||
@ -54,8 +54,6 @@ flag pedantic
|
||||
default: False
|
||||
manual: True
|
||||
|
||||
flag quickcheck-classes
|
||||
|
||||
library
|
||||
exposed-modules: XMonad
|
||||
XMonad.Config
|
||||
@ -83,7 +81,7 @@ library
|
||||
default-language: Haskell2010
|
||||
|
||||
-- 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
|
||||
|
||||
if flag(pedantic)
|
||||
@ -96,7 +94,7 @@ executable xmonad
|
||||
default-language: Haskell2010
|
||||
|
||||
-- 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
|
||||
|
||||
if flag(pedantic)
|
||||
@ -125,15 +123,11 @@ test-suite properties
|
||||
hs-source-dirs: tests
|
||||
build-depends: base
|
||||
, QuickCheck >= 2
|
||||
, quickcheck-classes >= 0.4.3
|
||||
, X11
|
||||
, containers
|
||||
, xmonad
|
||||
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)
|
||||
ghc-options: -Werror
|
||||
|
Loading…
x
Reference in New Issue
Block a user