29 Commits

Author SHA1 Message Date
Tony Zorman
a09ca446fb cabal: Update tested GHC versions
This syncs the cabal file with the reality of our CI.
2023-04-02 13:27:59 +02:00
Tomas Janousek
5641038500 CHANGES: Fix typo 2023-04-02 13:26:11 +02:00
Tony Zorman
990555c8ab Bump version to 0.17.2 2023-04-02 10:39:43 +02:00
Tony Zorman
a207e30751 CHANGES.md: Add changes for 0.17.2 2023-04-02 10:39:43 +02:00
Tony Zorman
460096dfc5 ci: Bump 9.2 and 9.4 minor versions
The stack CI already tests against 9.2.7 instead of 9.2.5 (as the cabal
file said), since we just specify the major version of the LTS resolver,
and lts-20 is up to 9.2.7 by now. Not much has changed since 9.2.5, but
update the haskell-ci workflow regardless. Likewise, 9.4 can be bumped
one minor version, so do that as well.

Related: xmonad/xmonad-contrib@1d84db959c
2023-04-01 15:18:23 +02:00
Tony Zorman
0817c6a7ff ci: Test against GHC 9.6.1
+ Regenerate haskell-ci and adjust relevant patches.
  - Remove haskell-ci-dependabot.patch, as it is no longer necessary.

Related: xmonad/xmonad-contrib@635711e994
2023-04-01 15:18:23 +02:00
Tomas Janousek
b59473b016 ci: Unpin runner in hlint workflow; bump hlint to 3.5
hlint 3.5 is built against libtinfo6 and works on Ubuntu 22.04 without
needing to install libtinfo5.

Fixes: e6329968ff ("ci: Pin runner in hlint, nix workflows to ubuntu-20.04")
2023-04-01 15:18:08 +02:00
Tomas Janousek
c2aeaffc03 ci: Cabal install packdeps outside of project dir
Invoking cabal in the project directory with a cabal.project file might
fail on unrelated dependencies missing, see
4f539734be

Doesn't fail in this repo, but let's keep the workflows in sync.
2023-04-01 15:18:08 +02:00
Tomas Janousek
7f95f5ef07 ci: Pin runner in hlint, nix workflows to ubuntu-20.04
Both are now broken with ubuntu-22.04. Nix:

    error: could not set permissions on '/nix/var/nix/profiles/per-user' to 755: Operation not permitted

hlint:

    /opt/hostedtoolcache/hlint/3.4.1/x64/hlint: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
2023-04-01 15:18:08 +02:00
github-actions
57b715972b man: Update 2023-04-01 15:18:08 +02:00
Tomas Janousek
a9866836d9 ci: Drop ppa:hvr/ghc
Breaks `apt update` on the ubuntu-22.04 runner, which is what
ubuntu-latest resolves to these days.

Fixes: 3977a7a4e2 ("ci: Drop GHC installation via apt")
2023-04-01 15:18:08 +02:00
dependabot[bot]
099233812e build(deps): bump haskell/actions from 1 to 2
Bumps [haskell/actions](https://github.com/haskell/actions) from 1 to 2.
- [Release notes](https://github.com/haskell/actions/releases)
- [Commits](https://github.com/haskell/actions/compare/v1...v2)
2023-04-01 15:18:08 +02:00
Tomáš Janoušek
9cb13bdd3d ci: Configure dependabot to keep GH Actions up to date 2023-04-01 15:18:08 +02:00
Tomas Janousek
86bb4d2a21 ci: Bump actions/* to v3 in haskell-ci workflow
This gets rid of the deprecation warnings about
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2023-04-01 15:18:08 +02:00
Tomas Janousek
30103efbc8 ci: Update to GHC 9.4.3 2023-04-01 15:18:08 +02:00
Tony Zorman
a16541b834 ci: Drop support for GHC 8.4
Debian stable is not on 8.6, which was always our guide as to which GHC
versions we want to support.

In particular, this lets us get rid of all the quickcheck-classes
special treatment.

Related: 400730fe3b
2023-04-01 15:17:45 +02:00
Tony Zorman
202fecf7ba ci: Update to GHC 9.2.5
+ A new stackage LTS is out with GHC 9.2.5, so test for this.
+ Update the haskell-ci jobs accordingly from 9.2.4.
2023-04-01 15:17:09 +02:00
Tomas Janousek
dd1e02555e ci: Fix docs tarball
haskell-ci by default passes --haddock-all to cabal v2-haddock, which
builds docs for all components and the …-docs.tar.gz tarball ends up
containing the docs for the last component, which happens to be tests.
We need the tarball to contain the library docs, for upload to Hackage.

Fixes: 25a4ed69da ("ci: Bump haskell-ci")
2023-04-01 15:17:01 +02:00
Tomas Janousek
4931bc4e41 X.Config: Appease -Werror=type-equality-requires-operators
GHC 9.4 complains:

    The use of ‘~’ without TypeOperators
    will become an error in a future GHC release.
2023-04-01 15:17:01 +02:00
Tomas Janousek
67267b7346 ci: Add GHC 9.4 to tested-with matrix (haskell-ci workflow)
(Also bump 9.2 to 9.2.4)
2023-04-01 15:17:01 +02:00
Tomas Janousek
4806b51a23 ci: Bump cachix/install-nix-action to v18
This gets rid of the deprecation warnings about
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2023-04-01 15:17:01 +02:00
Tomas Janousek
98e5d1583d ci: Bump actions/{checkout,cache} to v3
This gets rid of the deprecation warnings about
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2023-04-01 15:17:01 +02:00
Tomas Janousek
dc48e9e9c9 ci: Drop GHC installation via apt
The apt repo hosting these packages has been unmaintained for quite a
while, and we've excluded ~/.stack/programs from the cache long time
ago, so we can just let stack handle the installation. It's not much
slower than installing via apt, and even if it was, some matrix jobs
need to use the slow path anyway.

Related: 9fce3805fc ("ci: Use system GHC in Stack to not waste GH Actions cache space")
Related: 7d10e470d7 ("ci: Avoid caching GHC")
2023-04-01 15:17:01 +02:00
Tomas Janousek
572d02d8e8 ci: Replace deprecated GHA set-output command
See https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2023-04-01 15:17:01 +02:00
Tomas Janousek
f53db04285 ci: Drop hlint from haskell-ci workflow
As we have a separate hlint workflow now, this is no longer needed.

Related: https://github.com/xmonad/xmonad-contrib/issues/669
Related: 7cee191516
2023-04-01 15:17:01 +02:00
Tomas Janousek
2324d21202 ci: Bump haskell-ci 2023-04-01 15:17:01 +02:00
Tomas Janousek
f2c9c75f67 ci: Add hlint workflow
The "haskell/actions/hlint-run" GitHub Action produces annotations which
GitHub shows in the code diff, in addition to just failing the workflow
when there are any suggestions. Also, now it runs in parallel to the
other workflows.

Related: https://github.com/xmonad/xmonad-contrib/issues/669
Related: dd26fcc3f1
2023-04-01 15:17:01 +02:00
a5ob7r
faf5cf7b27 Fix compatibilities with unix 2.8.0.0
The version of unix removes the 3rd Maybe FileMode argument of openFd,
so we need to handle this breaking change using a MIN_VERSION macro. The
argument is integrated with the OpenFileFlags argument and the
integrated value in defaultFileFlags is Nothing, so there's no
difference between the two function calls.
2023-03-28 19:33:14 +02:00
a5ob7r
9d0fd62cb2 Fix compatibilities with mtl 2.3.1
No longer the version of mtl re-exports Control.Monad, Control.Monad.Fix
and Data.Monoid modules, so we need to import them directly instead.
2023-03-28 19:33:07 +02:00
20 changed files with 239 additions and 237 deletions

6
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

View File

@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Clone project - name: Clone project
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Install dependencies - name: Install dependencies
run: | run: |

View File

@@ -45,24 +45,27 @@ set in GitHub repository secrets.
- compiler: ghc-8.10.7 - compiler: ghc-8.10.7
compilerKind: ghc compilerKind: ghc
compilerVersion: 8.10.7 compilerVersion: 8.10.7
@@ -209,8 +217,80 @@ @@ -237,7 +237,7 @@
${CABAL} -vnormal check ${CABAL} -vnormal check
- name: haddock - name: haddock
run: | run: |
- $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all - $CABAL v2-haddock --disable-documentation $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
+ $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH --haddock-for-hackage --builddir $GITHUB_WORKSPACE/haddock all + $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH --haddock-for-hackage --builddir $GITHUB_WORKSPACE/haddock all
- name: unconstrained build - name: unconstrained build
run: | run: |
rm -f cabal.project.local rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all @@ -248,3 +248,75 @@
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
+ - name: upload artifacts (sdist) + - name: upload artifacts (sdist)
+ if: matrix.upload + if: matrix.upload
+ uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3
+ with: + with:
+ path: ${{ github.workspace }}/sdist/*.tar.gz + path: ${{ github.workspace }}/sdist/*.tar.gz
+ - name: upload artifacts (haddock) + - name: upload artifacts (haddock)
+ if: matrix.upload + if: matrix.upload
+ uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3
+ with: + with:
+ path: ${{ github.workspace }}/haddock/*-docs.tar.gz + path: ${{ github.workspace }}/haddock/*-docs.tar.gz
+ - name: hackage upload (candidate) + - name: hackage upload (candidate)

View File

@@ -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.14.3 # version: 0.15.20230312
# #
# REGENDATA ("0.14.3",["github","cabal.project"]) # REGENDATA ("0.15.20230312",["github","cabal.project"])
# #
name: Haskell-CI name: Haskell-CI
on: on:
@@ -26,7 +26,7 @@ on:
jobs: jobs:
linux: linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }} name: Haskell-CI - Linux - ${{ matrix.compiler }}
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
timeout-minutes: timeout-minutes:
60 60
container: container:
@@ -35,9 +35,19 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- compiler: ghc-9.2.2 - compiler: ghc-9.6.1
compilerKind: ghc compilerKind: ghc
compilerVersion: 9.2.2 compilerVersion: 9.6.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.4
compilerKind: ghc
compilerVersion: 9.4.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.7
compilerKind: ghc
compilerVersion: 9.2.7
setup-method: ghcup setup-method: ghcup
allow-failure: false allow-failure: false
- compiler: ghc-9.0.2 - compiler: ghc-9.0.2
@@ -61,11 +71,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
@@ -74,10 +79,10 @@ jobs:
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
if [ "${{ matrix.setup-method }}" = ghcup ]; then if [ "${{ matrix.setup-method }}" = ghcup ]; then
mkdir -p "$HOME/.ghcup/bin" mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.17.5/x86_64-linux-ghcup-0.1.17.5 > "$HOME/.ghcup/bin/ghcup" curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
apt-get update apt-get update
apt-get install -y libx11-dev libxext-dev libxinerama-dev libxrandr-dev libxss-dev apt-get install -y libx11-dev libxext-dev libxinerama-dev libxrandr-dev libxss-dev
else else
@@ -85,9 +90,9 @@ jobs:
apt-get update apt-get update
apt-get install -y "$HCNAME" libx11-dev libxext-dev libxinerama-dev libxrandr-dev libxss-dev apt-get install -y "$HCNAME" libx11-dev libxext-dev libxinerama-dev libxrandr-dev libxss-dev
mkdir -p "$HOME/.ghcup/bin" mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.17.5/x86_64-linux-ghcup-0.1.17.5 > "$HOME/.ghcup/bin/ghcup" curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi fi
env: env:
HCKIND: ${{ matrix.compilerKind }} HCKIND: ${{ matrix.compilerKind }}
@@ -105,13 +110,13 @@ jobs:
echo "HC=$HC" >> "$GITHUB_ENV" echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV" echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV" echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
else else
HC=$HCDIR/bin/$HCKIND HC=$HCDIR/bin/$HCKIND
echo "HC=$HC" >> "$GITHUB_ENV" echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
fi fi
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
@@ -160,11 +165,6 @@ jobs:
- name: update cabal index - name: update cabal index
run: | run: |
$CABAL v2-update -v $CABAL v2-update -v
- name: cache (tools)
uses: actions/cache@v2
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-c0dbbd39
path: ~/.haskell-ci-tools
- name: install cabal-plan - name: install cabal-plan
run: | run: |
mkdir -p $HOME/.cabal/bin mkdir -p $HOME/.cabal/bin
@@ -174,14 +174,8 @@ jobs:
rm -f cabal-plan.xz rm -f cabal-plan.xz
chmod a+x $HOME/.cabal/bin/cabal-plan chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version cabal-plan --version
- name: install hlint
run: |
if [ $((HCNUMVER >= 90000 && HCNUMVER < 90200)) -ne 0 ] ; then HLINTVER=$(cd /tmp && (${CABAL} v2-install -v $ARG_COMPILER --dry-run hlint --constraint='hlint >=3.4 && <3.5' | perl -ne 'if (/\bhlint-(\d+(\.\d+)*)\b/) { print "$1"; last; }')); echo "HLint version $HLINTVER" ; fi
if [ $((HCNUMVER >= 90000 && HCNUMVER < 90200)) -ne 0 ] ; then if [ ! -e $HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint ]; then echo "Downloading HLint version $HLINTVER"; mkdir -p $HOME/.haskell-ci-tools; curl --write-out 'Status Code: %{http_code} Redirects: %{num_redirects} Total time: %{time_total} Total Dsize: %{size_download}\n' --silent --location --output $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz "https://github.com/ndmitchell/hlint/releases/download/v$HLINTVER/hlint-$HLINTVER-x86_64-linux.tar.gz"; tar -xzv -f $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz -C $HOME/.haskell-ci-tools; fi ; fi
if [ $((HCNUMVER >= 90000 && HCNUMVER < 90200)) -ne 0 ] ; then mkdir -p $CABAL_DIR/bin && ln -sf "$HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint" $CABAL_DIR/bin/hlint ; fi
if [ $((HCNUMVER >= 90000 && HCNUMVER < 90200)) -ne 0 ] ; then hlint --version ; fi
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
path: source path: source
- name: initial cabal.project for sdist - name: initial cabal.project for sdist
@@ -220,8 +214,8 @@ jobs:
run: | run: |
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
cabal-plan cabal-plan
- name: cache - name: restore cache
uses: actions/cache@v2 uses: actions/cache/restore@v3
with: with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store path: ~/.cabal/store
@@ -239,10 +233,6 @@ jobs:
- name: tests - name: tests
run: | run: |
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
- name: hlint
run: |
if [ $((HCNUMVER >= 90000 && HCNUMVER < 90200)) -ne 0 ] ; then (cd ${PKGDIR_xmonad} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml -XHaskell2010 src) ; fi
if [ $((HCNUMVER >= 90000 && HCNUMVER < 90200)) -ne 0 ] ; then (cd ${PKGDIR_xmonad} && hlint -h ${GITHUB_WORKSPACE}/source/.hlint.yaml -XHaskell2010 .) ; fi
- name: cabal check - name: cabal check
run: | run: |
cd ${PKGDIR_xmonad} || false cd ${PKGDIR_xmonad} || false
@@ -254,14 +244,20 @@ jobs:
run: | run: |
rm -f cabal.project.local rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: save cache
uses: actions/cache/save@v3
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
- name: upload artifacts (sdist) - name: upload artifacts (sdist)
if: matrix.upload if: matrix.upload
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
path: ${{ github.workspace }}/sdist/*.tar.gz path: ${{ github.workspace }}/sdist/*.tar.gz
- name: upload artifacts (haddock) - name: upload artifacts (haddock)
if: matrix.upload if: matrix.upload
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
path: ${{ github.workspace }}/haddock/*-docs.tar.gz path: ${{ github.workspace }}/haddock/*-docs.tar.gz
- name: hackage upload (candidate) - name: hackage upload (candidate)

22
.github/workflows/hlint.yaml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: hlint
on:
push:
pull_request:
jobs:
hlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Set up HLint'
uses: haskell/actions/hlint-setup@v2
with:
version: '3.5'
- name: 'Run HLint'
uses: haskell/actions/hlint-run@v2
with:
path: '.'
fail-on: status

View File

@@ -6,13 +6,13 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-20.04 # FIXME
name: Nix Flake - Linux name: Nix Flake - Linux
permissions: permissions:
contents: read contents: read
steps: steps:
- name: Install Nix - name: Install Nix
uses: cachix/install-nix-action@v13 uses: cachix/install-nix-action@v18
with: with:
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
@@ -20,6 +20,6 @@ jobs:
experimental-features = nix-command flakes experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Clone project - name: Clone project
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Build - name: Build
run: nix build --print-build-logs run: nix build --print-build-logs

View File

@@ -13,9 +13,9 @@ jobs:
steps: steps:
- name: Clone project - name: Clone project
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Setup Haskell - name: Setup Haskell
uses: haskell/actions/setup@v1 uses: haskell/actions/setup@v2
with: with:
# packdeps doesn't build with newer as of 2021-10 # packdeps doesn't build with newer as of 2021-10
ghc-version: '8.8' ghc-version: '8.8'
@@ -23,6 +23,7 @@ jobs:
run: | run: |
set -ex set -ex
echo "$HOME/.cabal/bin" >> $GITHUB_PATH echo "$HOME/.cabal/bin" >> $GITHUB_PATH
cd # go somewhere without a cabal.project
cabal install packdeps cabal install packdeps
- name: Check package bounds (all) - name: Check package bounds (all)
continue-on-error: true continue-on-error: true

View File

@@ -12,30 +12,20 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- resolver: lts-12 - resolver: lts-14 # GHC 8.6
ghc: 8.4.4 - resolver: lts-16 # GHC 8.8
- resolver: lts-14 - resolver: lts-18 # GHC 8.10
ghc: 8.6.5 - resolver: lts-19 # GHC 9.0
- resolver: lts-16 - resolver: lts-20 # GHC 9.2
ghc: 8.8.4
- resolver: lts-18
ghc: 8.10.7
- resolver: lts-19
ghc: 9.0.2
steps: steps:
- name: Clone project - name: Clone project
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Prepare apt sources
run: |
set -ex
sudo add-apt-repository -y ppa:hvr/ghc
sudo apt update -y
- name: Install C dependencies - name: Install C dependencies
run: | run: |
set -ex set -ex
sudo apt update -y
sudo apt install -y \ sudo apt install -y \
libx11-dev \ libx11-dev \
libxext-dev \ libxext-dev \
@@ -44,14 +34,6 @@ jobs:
libxss-dev \ libxss-dev \
# #
- name: Install GHC
# use system ghc (if available) in stack, don't waste GH Actions cache space
continue-on-error: true
run: |
set -ex
sudo apt install -y ghc-${{ matrix.ghc }}
echo /opt/ghc/${{ matrix.ghc }}/bin >> $GITHUB_PATH
- name: Refresh caches once a month - name: Refresh caches once a month
id: cache-date id: cache-date
# GHA writes caches on the first miss and then never updates them again; # GHA writes caches on the first miss and then never updates them again;
@@ -59,16 +41,16 @@ jobs:
# date is prefixed with an epoch number to let us manually refresh the # date is prefixed with an epoch number to let us manually refresh the
# cache when needed. This is a workaround for https://github.com/actions/cache/issues/2 # cache when needed. This is a workaround for https://github.com/actions/cache/issues/2
run: | run: |
echo "::set-output name=date::1-$(date +%Y-%m)" date +date=1-%Y-%m >> $GITHUB_OUTPUT
- name: Cache Haskell package metadata - name: Cache Haskell package metadata
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ~/.stack/pantry path: ~/.stack/pantry
key: stack-pantry-${{ runner.os }}-${{ steps.cache-date.outputs.date }} key: stack-pantry-${{ runner.os }}-${{ steps.cache-date.outputs.date }}
- name: Cache Haskell dependencies - name: Cache Haskell dependencies
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: | path: |
~/.stack/* ~/.stack/*

View File

@@ -1,6 +1,12 @@
# Change Log / Release Notes # Change Log / Release Notes
## 0.17.1 (September 3, 2021) ## 0.17.2 (April 2, 2023)
### Bug Fixes
* Fixed the build with GHC 9.6.
## 0.17.1 (September 3, 2022)
### Enhancements ### Enhancements

View File

@@ -101,7 +101,7 @@ This will give you the latest `HEAD`; if you want you can also check
out a tagged release, e.g.: out a tagged release, e.g.:
``` console ``` console
$ git clone --branch v0.17.1 https://github.com/xmonad/xmonad $ git clone --branch v0.17.2 https://github.com/xmonad/xmonad
$ git clone --branch v0.17.1 https://github.com/xmonad/xmonad-contrib $ git clone --branch v0.17.1 https://github.com/xmonad/xmonad-contrib
``` ```

View File

@@ -5,11 +5,6 @@ apt:
libxrandr-dev libxrandr-dev
libxss-dev libxss-dev
hlint: True
hlint-job: 9.0.2
hlint-yaml: .hlint.yaml
hlint-version: ==3.4.*
github-patches: github-patches:
.github/workflows/haskell-ci-hackage.patch .github/workflows/haskell-ci-hackage.patch
@@ -17,3 +12,6 @@ raw-project
optimization: False optimization: False
package xmonad package xmonad
flags: +pedantic flags: +pedantic
-- avoid --haddock-all which overwrites *-docs.tar.gz with tests docs
haddock-components: libs

View File

@@ -1,10 +1,10 @@
.\" Automatically generated by Pandoc 2.5 .\" Automatically generated by Pandoc 2.9.2.1
.\" .\"
.TH "XMONAD" "1" "27 October 2021" "Tiling Window Manager" "" .TH "XMONAD" "1" "27 October 2021" "Tiling Window Manager" ""
.hy .hy
.SH Name .SH Name
.PP .PP
xmonad \- Tiling Window Manager xmonad - Tiling Window Manager
.SH Description .SH Description
.PP .PP
\f[I]xmonad\f[R] is a minimalist tiling window manager for X, written in \f[I]xmonad\f[R] is a minimalist tiling window manager for X, written in
@@ -36,27 +36,27 @@ featureful window manager in less than 1200 lines of code, with an
emphasis on correctness and robustness. emphasis on correctness and robustness.
Internal properties of the window manager are checked using a Internal properties of the window manager are checked using a
combination of static guarantees provided by the type system, and combination of static guarantees provided by the type system, and
type\-based automated testing. type-based automated testing.
A benefit of this is that the code is simple to understand, and easy to A benefit of this is that the code is simple to understand, and easy to
modify. modify.
.SH Usage .SH Usage
.PP .PP
\f[I]xmonad\f[R] places each window into a \[lq]workspace\[rq]. \f[I]xmonad\f[R] places each window into a \[lq]workspace\[rq].
Each workspace can have any number of windows, which you can cycle Each workspace can have any number of windows, which you can cycle
though with mod\-j and mod\-k. though with mod-j and mod-k.
Windows are either displayed full screen, tiled horizontally, or tiled Windows are either displayed full screen, tiled horizontally, or tiled
vertically. vertically.
You can toggle the layout mode with mod\-space, which will cycle through You can toggle the layout mode with mod-space, which will cycle through
the available modes. the available modes.
.PP .PP
You can switch to workspace N with mod\-N. You can switch to workspace N with mod-N.
For example, to switch to workspace 5, you would press mod\-5. For example, to switch to workspace 5, you would press mod-5.
Similarly, you can move the current window to another workspace with Similarly, you can move the current window to another workspace with
mod\-shift\-N. mod-shift-N.
.PP .PP
When running with multiple monitors (Xinerama), each screen has exactly When running with multiple monitors (Xinerama), each screen has exactly
1 workspace visible. 1 workspace visible.
mod\-{w,e,r} switch the focus between screens, while shift\-mod\-{w,e,r} mod-{w,e,r} switch the focus between screens, while shift-mod-{w,e,r}
move the current window to that screen. move the current window to that screen.
When \f[I]xmonad\f[R] starts, workspace 1 is on screen 1, workspace 2 is When \f[I]xmonad\f[R] starts, workspace 1 is on screen 1, workspace 2 is
on screen 2, etc. on screen 2, etc.
@@ -67,115 +67,115 @@ and visible workspaces are swapped.
xmonad has several flags which you may pass to the executable. xmonad has several flags which you may pass to the executable.
These flags are: These flags are:
.TP .TP
.B \[en]recompile \[en]recompile
Recompiles your \f[I]xmonad.hs\f[R] configuration Recompiles your \f[I]xmonad.hs\f[R] configuration
.TP .TP
.B \[en]restart \[en]restart
Causes the currently running \f[I]xmonad\f[R] process to restart Causes the currently running \f[I]xmonad\f[R] process to restart
.TP .TP
.B \[en]replace \[en]replace
Replace the current window manager with xmonad Replace the current window manager with xmonad
.TP .TP
.B \[en]version \[en]version
Display version of \f[I]xmonad\f[R] Display version of \f[I]xmonad\f[R]
.TP .TP
.B \[en]verbose\-version \[en]verbose-version
Display detailed version of \f[I]xmonad\f[R] Display detailed version of \f[I]xmonad\f[R]
.SS Default keyboard bindings .SS Default keyboard bindings
.TP .TP
.B mod\-shift\-return mod-shift-return
Launch terminal Launch terminal
.TP .TP
.B mod\-p mod-p
Launch dmenu Launch dmenu
.TP .TP
.B mod\-shift\-p mod-shift-p
Launch gmrun Launch gmrun
.TP .TP
.B mod\-shift\-c mod-shift-c
Close the focused window Close the focused window
.TP .TP
.B mod\-space mod-space
Rotate through the available layout algorithms Rotate through the available layout algorithms
.TP .TP
.B mod\-shift\-space mod-shift-space
Reset the layouts on the current workspace to default Reset the layouts on the current workspace to default
.TP .TP
.B mod\-n mod-n
Resize viewed windows to the correct size Resize viewed windows to the correct size
.TP .TP
.B mod\-tab mod-tab
Move focus to the next window Move focus to the next window
.TP .TP
.B mod\-shift\-tab mod-shift-tab
Move focus to the previous window Move focus to the previous window
.TP .TP
.B mod\-j mod-j
Move focus to the next window Move focus to the next window
.TP .TP
.B mod\-k mod-k
Move focus to the previous window Move focus to the previous window
.TP .TP
.B mod\-m mod-m
Move focus to the master window Move focus to the master window
.TP .TP
.B mod\-return mod-return
Swap the focused window and the master window Swap the focused window and the master window
.TP .TP
.B mod\-shift\-j mod-shift-j
Swap the focused window with the next window Swap the focused window with the next window
.TP .TP
.B mod\-shift\-k mod-shift-k
Swap the focused window with the previous window Swap the focused window with the previous window
.TP .TP
.B mod\-h mod-h
Shrink the master area Shrink the master area
.TP .TP
.B mod\-l mod-l
Expand the master area Expand the master area
.TP .TP
.B mod\-t mod-t
Push window back into tiling Push window back into tiling
.TP .TP
.B mod\-comma mod-comma
Increment the number of windows in the master area Increment the number of windows in the master area
.TP .TP
.B mod\-period mod-period
Deincrement the number of windows in the master area Deincrement the number of windows in the master area
.TP .TP
.B mod\-shift\-q mod-shift-q
Quit xmonad Quit xmonad
.TP .TP
.B mod\-q mod-q
Restart xmonad Restart xmonad
.TP .TP
.B mod\-shift\-slash mod-shift-slash
Run xmessage with a summary of the default keybindings (useful for Run xmessage with a summary of the default keybindings (useful for
beginners) beginners)
.TP .TP
.B mod\-question mod-question
Run xmessage with a summary of the default keybindings (useful for Run xmessage with a summary of the default keybindings (useful for
beginners) beginners)
.TP .TP
.B mod\-[1..9] mod-[1..9]
Switch to workspace N Switch to workspace N
.TP .TP
.B mod\-shift\-[1..9] mod-shift-[1..9]
Move client to workspace N Move client to workspace N
.TP .TP
.B mod\-{w,e,r} mod-{w,e,r}
Switch to physical/Xinerama screens 1, 2, or 3 Switch to physical/Xinerama screens 1, 2, or 3
.TP .TP
.B mod\-shift\-{w,e,r} mod-shift-{w,e,r}
Move client to screen 1, 2, or 3 Move client to screen 1, 2, or 3
.TP .TP
.B mod\-button1 mod-button1
Set the window to floating mode and move by dragging Set the window to floating mode and move by dragging
.TP .TP
.B mod\-button2 mod-button2
Raise the window to the top of the stack Raise the window to the top of the stack
.TP .TP
.B mod\-button3 mod-button3
Set the window to floating mode and resize by dragging Set the window to floating mode and resize by dragging
.SH Examples .SH Examples
.PP .PP
@@ -188,7 +188,7 @@ exec xmonad
.SH Customization .SH Customization
.PP .PP
xmonad is customized in your \f[I]xmonad.hs\f[R], and then restarted xmonad is customized in your \f[I]xmonad.hs\f[R], and then restarted
with mod\-q. with mod-q.
You can choose where your configuration file lives by You can choose where your configuration file lives by
.IP "1." 3 .IP "1." 3
Setting \f[C]XMONAD_DATA_DIR,\f[R] \f[C]XMONAD_CONFIG_DIR\f[R], and Setting \f[C]XMONAD_DATA_DIR,\f[R] \f[C]XMONAD_CONFIG_DIR\f[R], and
@@ -201,14 +201,13 @@ Creating \f[I]xmonad.hs\f[R] in \f[C]XDG_CONFIG_HOME\f[R].
Note that, in this case, xmonad will use \f[C]XDG_DATA_HOME\f[R] and Note that, in this case, xmonad will use \f[C]XDG_DATA_HOME\f[R] and
\f[C]XDG_CACHE_HOME\f[R] for its data and cache directory respectively. \f[C]XDG_CACHE_HOME\f[R] for its data and cache directory respectively.
.PP .PP
You can find many extensions to the core feature set in the xmonad\- You can find many extensions to the core feature set in the xmonad-
contrib package, available through your package manager or from contrib package, available through your package manager or from
xmonad.org (https://xmonad.org). xmonad.org (https://xmonad.org).
.SS Modular Configuration .SS Modular Configuration
.PP .PP
As of \f[I]xmonad\-0.9\f[R], any additional Haskell modules may be As of \f[I]xmonad-0.9\f[R], any additional Haskell modules may be placed
placed in \f[I]\[ti]/.xmonad/lib/\f[R] are available in GHC\[cq]s in \f[I]\[ti]/.xmonad/lib/\f[R] are available in GHC\[cq]s searchpath.
searchpath.
Hierarchical modules are supported: for example, the file Hierarchical modules are supported: for example, the file
\f[I]\[ti]/.xmonad/lib/XMonad/Stack/MyAdditions.hs\f[R] could contain: \f[I]\[ti]/.xmonad/lib/XMonad/Stack/MyAdditions.hs\f[R] could contain:
.IP .IP
@@ -220,7 +219,7 @@ module XMonad.Stack.MyAdditions (function1) where
.fi .fi
.PP .PP
Your xmonad.hs may then import XMonad.Stack.MyAdditions as if that Your xmonad.hs may then import XMonad.Stack.MyAdditions as if that
module was contained within xmonad or xmonad\-contrib. module was contained within xmonad or xmonad-contrib.
.SH Bugs .SH Bugs
.PP .PP
Probably. Probably.

View File

@@ -7,74 +7,75 @@
<meta name="author" content="" /> <meta name="author" content="" />
<meta name="dcterms.date" content="2021-10-27" /> <meta name="dcterms.date" content="2021-10-27" />
<title>XMONAD(1) Tiling Window Manager</title> <title>XMONAD(1) Tiling Window Manager</title>
<style type="text/css"> <style>
code{white-space: pre-wrap;} code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;} span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;} span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;} div.column{display: inline-block; vertical-align: top; width: 50%;}
</style> div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
<style type="text/css"> ul.task-list{list-style: none;}
a.sourceLine { display: inline-block; line-height: 1.25; } pre > code.sourceCode { white-space: pre; position: relative; }
a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; } pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
a.sourceLine:empty { height: 1.2em; } pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; } code.sourceCode > span { color: inherit; text-decoration: inherit; }
code.sourceCode { white-space: pre; position: relative; } div.sourceCode { margin: 1em 0; }
div.sourceCode { margin: 1em 0; } pre.sourceCode { margin: 0; }
pre.sourceCode { margin: 0; } @media screen {
@media screen { div.sourceCode { overflow: auto; }
div.sourceCode { overflow: auto; } }
} @media print {
@media print { pre > code.sourceCode { white-space: pre-wrap; }
code.sourceCode { white-space: pre-wrap; } pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
a.sourceLine { text-indent: -1em; padding-left: 1em; } }
} pre.numberSource code
pre.numberSource a.sourceLine { counter-reset: source-line 0; }
{ position: relative; left: -4em; } pre.numberSource code > span
pre.numberSource a.sourceLine::before { position: relative; left: -4em; counter-increment: source-line; }
{ content: attr(title); pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline; position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; pointer-events: all; display: inline-block; border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none; -khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none; -ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em; padding: 0 4px; width: 4em;
color: #aaaaaa; color: #aaaaaa;
} }
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; } pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode div.sourceCode
{ } { }
@media screen { @media screen {
a.sourceLine::before { text-decoration: underline; } pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
} }
code span.al { color: #ff0000; font-weight: bold; } /* Alert */ code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */ code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */ code span.bn { color: #40a070; } /* BaseN */
code span.bu { } /* BuiltIn */ code span.bu { } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */ code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */ code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */ code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */ code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */ code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */ code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */ code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */ code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */ code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */ code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */ code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */ code span.fu { color: #06287e; } /* Function */
code span.im { } /* Import */ code span.im { } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */ code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */ code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */ code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */ code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */ code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */ code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */ code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */ code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */ code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */ code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style> </style>
</head> </head>
<body> <body>
@@ -83,16 +84,18 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
<p class="author"></p> <p class="author"></p>
<p class="date">27 October 2021</p> <p class="date">27 October 2021</p>
</header> </header>
<nav id="TOC"> <nav id="TOC" role="doc-toc">
<ul> <ul>
<li><a href="#name">Name</a></li> <li><a href="#name">Name</a></li>
<li><a href="#description">Description</a></li> <li><a href="#description">Description</a></li>
<li><a href="#usage">Usage</a><ul> <li><a href="#usage">Usage</a>
<ul>
<li><a href="#flags">Flags</a></li> <li><a href="#flags">Flags</a></li>
<li><a href="#default-keyboard-bindings">Default keyboard bindings</a></li> <li><a href="#default-keyboard-bindings">Default keyboard bindings</a></li>
</ul></li> </ul></li>
<li><a href="#examples">Examples</a></li> <li><a href="#examples">Examples</a></li>
<li><a href="#customization">Customization</a><ul> <li><a href="#customization">Customization</a>
<ul>
<li><a href="#modular-configuration">Modular Configuration</a></li> <li><a href="#modular-configuration">Modular Configuration</a></li>
</ul></li> </ul></li>
<li><a href="#bugs">Bugs</a></li> <li><a href="#bugs">Bugs</a></li>
@@ -238,8 +241,8 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
<p>You can find many extensions to the core feature set in the xmonad- contrib package, available through your package manager or from <a href="https://xmonad.org">xmonad.org</a>.</p> <p>You can find many extensions to the core feature set in the xmonad- contrib package, available through your package manager or from <a href="https://xmonad.org">xmonad.org</a>.</p>
<h2 id="modular-configuration">Modular Configuration</h2> <h2 id="modular-configuration">Modular Configuration</h2>
<p>As of <em>xmonad-0.9</em>, any additional Haskell modules may be placed in <em>~/.xmonad/lib/</em> are available in GHCs searchpath. Hierarchical modules are supported: for example, the file <em>~/.xmonad/lib/XMonad/Stack/MyAdditions.hs</em> could contain:</p> <p>As of <em>xmonad-0.9</em>, any additional Haskell modules may be placed in <em>~/.xmonad/lib/</em> are available in GHCs searchpath. Hierarchical modules are supported: for example, the file <em>~/.xmonad/lib/XMonad/Stack/MyAdditions.hs</em> could contain:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode haskell"><code class="sourceCode haskell"><a class="sourceLine" id="cb1-1" title="1"><span class="kw">module</span> <span class="dt">XMonad.Stack.MyAdditions</span> (function1) <span class="kw">where</span></a> <div class="sourceCode" id="cb1"><pre class="sourceCode haskell"><code class="sourceCode haskell"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="kw">module</span> <span class="dt">XMonad.Stack.MyAdditions</span> (function1) <span class="kw">where</span></span>
<a class="sourceLine" id="cb1-2" title="2"> function1 <span class="ot">=</span> <span class="fu">error</span> <span class="st">&quot;function1: Not implemented yet!&quot;</span></a></code></pre></div> <span id="cb1-2"><a href="#cb1-2" aria-hidden="true"></a> function1 <span class="ot">=</span> <span class="fu">error</span> <span class="st">&quot;function1: Not implemented yet!&quot;</span></span></code></pre></div>
<p>Your xmonad.hs may then import XMonad.Stack.MyAdditions as if that module was contained within xmonad or xmonad-contrib.</p> <p>Your xmonad.hs may then import XMonad.Stack.MyAdditions as if that module was contained within xmonad or xmonad-contrib.</p>
<h1 id="bugs">Bugs</h1> <h1 id="bugs">Bugs</h1>
<p>Probably. If you find any, please report them to the <a href="https://github.com/xmonad/xmonad/issues">bugtracker</a></p> <p>Probably. If you find any, please report them to the <a href="https://github.com/xmonad/xmonad/issues">bugtracker</a></p>

View File

@@ -1,5 +1,6 @@
{-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-orphans #-} {-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-orphans #-}
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
-- | -- |
-- Module : XMonad.Config -- Module : XMonad.Config

View File

@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleInstances #-}
@@ -44,9 +45,10 @@ import Control.Exception (fromException, try, bracket_, throw, finally, SomeExce
import qualified Control.Exception as E import qualified Control.Exception as E
import Control.Applicative ((<|>), empty) import Control.Applicative ((<|>), empty)
import Control.Monad.Fail import Control.Monad.Fail
import Control.Monad.Fix (fix)
import Control.Monad.State import Control.Monad.State
import Control.Monad.Reader import Control.Monad.Reader
import Control.Monad (void) import Control.Monad (filterM, guard, liftM2, 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)
@@ -451,7 +453,11 @@ xfork x = io . forkProcess . finally nullStdin $ do
x x
where where
nullStdin = do nullStdin = do
#if MIN_VERSION_unix(2,8,0)
fd <- openFd "/dev/null" ReadOnly defaultFileFlags
#else
fd <- openFd "/dev/null" ReadOnly Nothing defaultFileFlags fd <- openFd "/dev/null" ReadOnly Nothing defaultFileFlags
#endif
dupTo fd stdInput dupTo fd stdInput
closeFd fd closeFd fd

View File

@@ -27,6 +27,7 @@ import qualified Data.Map as M
import qualified Data.Set as S import qualified Data.Set as S
import Control.Monad.Reader import Control.Monad.Reader
import Control.Monad.State import Control.Monad.State
import Control.Monad (filterM, guard, unless, void, when)
import Data.Maybe (fromMaybe, isJust) import Data.Maybe (fromMaybe, isJust)
import Data.Monoid (getAll) import Data.Monoid (getAll)

View File

@@ -70,9 +70,10 @@ import qualified Data.Map as M
import qualified Data.Set as S import qualified Data.Set as S
import Control.Arrow (second) import Control.Arrow (second)
import Control.Monad.Fix (fix)
import Control.Monad.Reader import Control.Monad.Reader
import Control.Monad.State import Control.Monad.State
import Control.Monad (void) import Control.Monad (forM, forM_, guard, join, unless, void, when)
import qualified Control.Exception as C import qualified Control.Exception as C
import System.IO import System.IO

View File

@@ -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

View File

@@ -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

View File

@@ -1,5 +1,5 @@
name: xmonad name: xmonad
version: 0.17.1 version: 0.17.2
synopsis: A tiling window manager synopsis: A tiling window manager
description: xmonad is a tiling window manager for X. Windows are arranged description: xmonad is a tiling window manager for X. Windows are arranged
automatically to tile the screen without gaps or overlap, maximising automatically to tile the screen without gaps or overlap, maximising
@@ -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.2 tested-with: GHC == 8.6.5 || == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.7 || == 9.4.4 || == 9.6.1
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