Skip to content

Commit e3a6937

Browse files
frasertweedaleromanofski
authored andcommitted
deps: drop support for GHC < 9.6
The platforms we care about all have GHC 9.6 or later, so drop support for older versions. Clean up redundant extensions and imports, and avoid some warnings.
1 parent 6cbce53 commit e3a6937

34 files changed

+27
-112
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.19.20250605
11+
# version: 0.19.20250821
1212
#
13-
# REGENDATA ("0.19.20250605",["--haddock","--apt","elinks tmux vim less notmuch libnotmuch-dev libtalloc-dev","--github-patches",".github/haskell-ci-github.patch","github","purebred.cabal"])
13+
# REGENDATA ("0.19.20250821",["--haddock","--apt","elinks tmux vim less notmuch libnotmuch-dev libtalloc-dev","--github-patches",".github/haskell-ci-github.patch","github","purebred.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -48,31 +48,6 @@ jobs:
4848
compilerVersion: 9.6.7
4949
setup-method: ghcup
5050
allow-failure: false
51-
- compiler: ghc-9.4.8
52-
compilerKind: ghc
53-
compilerVersion: 9.4.8
54-
setup-method: ghcup
55-
allow-failure: false
56-
- compiler: ghc-9.2.8
57-
compilerKind: ghc
58-
compilerVersion: 9.2.8
59-
setup-method: ghcup
60-
allow-failure: false
61-
- compiler: ghc-9.0.2
62-
compilerKind: ghc
63-
compilerVersion: 9.0.2
64-
setup-method: ghcup
65-
allow-failure: false
66-
- compiler: ghc-8.10.7
67-
compilerKind: ghc
68-
compilerVersion: 8.10.7
69-
setup-method: ghcup
70-
allow-failure: false
71-
- compiler: ghc-8.8.4
72-
compilerKind: ghc
73-
compilerVersion: 8.8.4
74-
setup-method: ghcup
75-
allow-failure: false
7651
fail-fast: false
7752
steps:
7853
- name: apt-get install
@@ -87,8 +62,8 @@ jobs:
8762
chmod a+x "$HOME/.ghcup/bin/ghcup"
8863
- name: Install cabal-install
8964
run: |
90-
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
91-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
65+
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
66+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
9267
- name: Install GHC (GHCup)
9368
if: matrix.setup-method == 'ghcup'
9469
run: |
@@ -189,7 +164,11 @@ jobs:
189164
touch cabal.project.local
190165
echo "packages: ${PKGDIR_purebred}" >> cabal.project
191166
echo "package purebred" >> cabal.project
192-
echo " ghc-options: -Werror=missing-methods" >> cabal.project
167+
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
168+
echo "package purebred" >> cabal.project
169+
echo " ghc-options: -Werror=unused-packages" >> cabal.project
170+
echo "package purebred" >> cabal.project
171+
echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project
193172
cat >> cabal.project <<EOF
194173
EOF
195174
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(purebred)$/; }' >> cabal.project.local

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ An MUA built around [_notmuch_](https://notmuchmail.org/).
66

77
## Requirements
88

9-
- GHC >= 8.8
9+
- GHC >= 9.6
1010
- notmuch
1111
- a local mailer (e.g. `sendmail`)
1212

purebred.cabal

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description:
1010
.
1111
= Requirements
1212
.
13-
* GHC >= 8.8
13+
* GHC >= 9.6
1414
* notmuch
1515
* a local mailer (e.g. @sendmail@)
1616
.
@@ -38,7 +38,7 @@ extra-source-files:
3838
configs/aliases
3939

4040
tested-with:
41-
GHC ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.7 || ==9.8.4 || ==9.10.2 || ==9.12.2
41+
GHC ==9.6.7 || ==9.8.4 || ==9.10.2 || ==9.12.2
4242

4343
source-repository head
4444
type: git
@@ -49,7 +49,7 @@ flag with_lazyvector
4949
default: False
5050

5151
common common
52-
default-language: Haskell2010
52+
default-language: GHC2021
5353
ghc-options:
5454
-fhide-source-paths
5555
-Wall
@@ -62,23 +62,15 @@ common common
6262
-Wredundant-constraints
6363
-Wmissing-export-lists
6464
-Wpartial-fields
65-
if impl(ghc >= 8.10)
66-
ghc-options:
67-
-Wunused-packages
68-
if impl(ghc >= 9.0)
69-
ghc-options:
70-
-Winvalid-haddock
71-
-Werror=unicode-bidirectional-format-characters
72-
if impl(ghc >= 9.2)
73-
ghc-options:
74-
-Wimplicit-lift
75-
-Woperator-whitespace
76-
-Wredundant-bang-patterns
77-
if impl(ghc >= 9.4)
78-
ghc-options:
79-
-Wredundant-strictness-flags
65+
-Wunused-packages
66+
-Winvalid-haddock
67+
-Werror=unicode-bidirectional-format-characters
68+
-Wimplicit-lift
69+
-Woperator-whitespace
70+
-Wredundant-bang-patterns
71+
-Wredundant-strictness-flags
8072
build-depends:
81-
base >= 4.13 && < 5
73+
base >= 4.18 && < 5
8274

8375
library
8476
import: common

src/Purebred.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ import Control.Concurrent (rtsSupportsBoundThreads)
160160
import Purebred.System.Logging (setupLogsink)
161161
import qualified Config.Dyre as Dyre
162162
import qualified Control.DeepSeq
163-
import Control.Monad ((>=>), void, unless)
163+
import Control.Monad ((>=>), unless)
164164
import Options.Applicative hiding (str)
165165
import qualified Options.Applicative.Builder as Builder
166166
import qualified Data.Text as T

src/Purebred/Config.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module Purebred.Config
2525
, tagReplacementMapEmoji
2626
) where
2727

28-
import Control.Applicative ((<|>), liftA2)
28+
import Control.Applicative ((<|>))
2929
import Data.List.NonEmpty (fromList)
3030
import Data.Maybe (fromMaybe)
3131
import System.Environment (lookupEnv)

src/Purebred/Plugin/Internal.hs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@
1414
-- You should have received a copy of the GNU Affero General Public License
1515
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

17-
{-# LANGUAGE ConstraintKinds #-}
18-
{-# LANGUAGE FlexibleContexts #-}
19-
{-# LANGUAGE FlexibleInstances #-}
2017
{-# LANGUAGE MonoLocalBinds #-}
2118
{-# LANGUAGE QuantifiedConstraints #-}
22-
{-# LANGUAGE RankNTypes #-}
2319
{-# LANGUAGE UndecidableInstances #-}
2420

2521
module Purebred.Plugin.Internal

src/Purebred/Plugin/TweakConfig.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

1717
{-# LANGUAGE QuantifiedConstraints #-}
18-
{-# LANGUAGE RankNTypes #-}
1918
{-# LANGUAGE UndecidableInstances #-}
2019

2120
{-| Plugins for adjusting Purebred's configuration.

src/Purebred/Plugin/UserAgent.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
-- You should have received a copy of the GNU Affero General Public License
1515
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

17-
{-# LANGUAGE FlexibleContexts #-}
1817
{-# LANGUAGE OverloadedStrings #-}
1918

2019
{-| Add a User-Agent header to outgoing messages. -}

src/Purebred/Storage/AddressBook.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
--
1414
-- You should have received a copy of the GNU Affero General Public License
1515
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
16-
{-# LANGUAGE RankNTypes #-}
17-
{-# LANGUAGE FlexibleContexts #-}
1816

1917
module Purebred.Storage.AddressBook
2018
( -- * Synopsis

src/Purebred/Storage/AddressBook/MuttAliasFile.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313
--
1414
-- You should have received a copy of the GNU Affero General Public License
1515
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
1617
{-# LANGUAGE OverloadedStrings #-}
17-
{-# LANGUAGE RankNTypes #-}
18-
{-# LANGUAGE FlexibleContexts #-}
1918

2019
module Purebred.Storage.AddressBook.MuttAliasFile
2120
( -- * Synopsis

0 commit comments

Comments
 (0)