diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index b8cad329..a4090e5c 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/andreasabel/haskell-ci # -# version: 0.17.20231112 +# version: 0.17.20240106 # -# REGENDATA ("0.17.20231112",["github","cabal.project"]) +# REGENDATA ("0.17.20240106",["github","cabal.project"]) # name: Haskell-CI on: @@ -87,32 +87,17 @@ jobs: compilerVersion: 8.0.2 setup-method: ghcup allow-failure: false - - compiler: ghc-7.10.3 - compilerKind: ghc - compilerVersion: 7.10.3 - setup-method: hvr-ppa - allow-failure: false fail-fast: false steps: - name: apt run: | apt-get update apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev - if [ "${{ matrix.setup-method }}" = ghcup ]; then - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - else - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - fi + mkdir -p "$HOME/.ghcup/bin" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" + chmod a+x "$HOME/.ghcup/bin/ghcup" + "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) + "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) env: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} @@ -124,22 +109,13 @@ jobs: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER - if [ "${{ matrix.setup-method }}" = ghcup ]; then - HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") - HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') - HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" - echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" - else - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" - fi - + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') + echo "HC=$HC" >> "$GITHUB_ENV" + echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" + echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" diff --git a/example-client/example-client.cabal b/example-client/example-client.cabal index e67ffb35..7d4a86ef 100644 --- a/example-client/example-client.cabal +++ b/example-client/example-client.cabal @@ -23,7 +23,6 @@ tested-with: GHC == 8.4.4 GHC == 8.2.2 GHC == 8.0.2 - GHC == 7.10.3 flag use-network-uri description: Are we using network-uri? @@ -38,7 +37,7 @@ executable example-client main-is: Main.hs other-modules: ExampleClient.Options - build-depends: base >= 4.8 && < 4.20, + build-depends: base >= 4.9 && < 4.20, bytestring >= 0.9, directory >= 1.2, filepath >= 1.2, diff --git a/hackage-repo-tool/ChangeLog.md b/hackage-repo-tool/ChangeLog.md index fbb14f70..ec9b8f5a 100644 --- a/hackage-repo-tool/ChangeLog.md +++ b/hackage-repo-tool/ChangeLog.md @@ -1,3 +1,7 @@ +Unreleased +---------- +* Drop support for GHC 7. + 0.1.1.3 ------- * Compat release for `Cabal-syntax-3.8.1.0` diff --git a/hackage-repo-tool/hackage-repo-tool.cabal b/hackage-repo-tool/hackage-repo-tool.cabal index 6168ff59..230ec9ea 100644 --- a/hackage-repo-tool/hackage-repo-tool.cabal +++ b/hackage-repo-tool/hackage-repo-tool.cabal @@ -35,7 +35,6 @@ tested-with: GHC == 8.4.4 GHC == 8.2.2 GHC == 8.0.2 - GHC == 7.10.3 extra-source-files: ChangeLog.md README.md @@ -64,7 +63,7 @@ executable hackage-repo-tool -- For boot libraries we try to accomodate the versions bundled with -- the respective GHC release - build-depends: base >= 4.8 && < 4.20, + build-depends: base >= 4.9 && < 4.20, bytestring >= 0.9 && < 0.13, directory >= 1.2 && < 1.4, filepath >= 1.3 && < 1.5, diff --git a/hackage-root-tool/hackage-root-tool.cabal b/hackage-root-tool/hackage-root-tool.cabal index 4e40c416..fd737022 100644 --- a/hackage-root-tool/hackage-root-tool.cabal +++ b/hackage-root-tool/hackage-root-tool.cabal @@ -27,7 +27,6 @@ tested-with: GHC == 8.4.4 GHC == 8.2.2 GHC == 8.0.2 - GHC == 7.10.3 extra-source-files: ChangeLog.md @@ -39,7 +38,7 @@ source-repository head executable hackage-root-tool main-is: Main.hs - build-depends: base >= 4.8 && < 5, + build-depends: base >= 4.9 && < 5, filepath >= 1.2 && < 1.5, optparse-applicative >= 0.11 && < 0.18, hackage-security >= 0.5 && < 0.7 diff --git a/hackage-security-HTTP/ChangeLog.md b/hackage-security-HTTP/ChangeLog.md index f6369ba2..14323bd7 100644 --- a/hackage-security-HTTP/ChangeLog.md +++ b/hackage-security-HTTP/ChangeLog.md @@ -1,3 +1,8 @@ +Unreleased +---------- +* Drop support for GHC 7. + + 0.1.1.1 ------- * Add support for hackage-security-0.6 diff --git a/hackage-security-HTTP/hackage-security-HTTP.cabal b/hackage-security-HTTP/hackage-security-HTTP.cabal index 407dc543..94db4a0c 100644 --- a/hackage-security-HTTP/hackage-security-HTTP.cabal +++ b/hackage-security-HTTP/hackage-security-HTTP.cabal @@ -29,7 +29,6 @@ tested-with: GHC == 8.4.4 GHC == 8.2.2 GHC == 8.0.2 - GHC == 7.10.3 extra-source-files: ChangeLog.md @@ -44,7 +43,7 @@ flag use-network-uri library exposed-modules: Hackage.Security.Client.Repository.HttpLib.HTTP - build-depends: base >= 4.8 && < 4.20, + build-depends: base >= 4.9 && < 4.20, bytestring >= 0.9 && < 0.13, HTTP >= 4000.2.19 && < 4000.5, mtl >= 2.1 && < 2.4, diff --git a/hackage-security-curl/hackage-security-curl.cabal b/hackage-security-curl/hackage-security-curl.cabal index 8eb8ad60..f0fb8cd1 100644 --- a/hackage-security-curl/hackage-security-curl.cabal +++ b/hackage-security-curl/hackage-security-curl.cabal @@ -27,7 +27,6 @@ tested-with: GHC == 8.4.4 GHC == 8.2.2 GHC == 8.0.2 - GHC == 7.10.3 flag use-network-uri description: Are we using network-uri? @@ -35,7 +34,7 @@ flag use-network-uri library exposed-modules: Hackage.Security.Client.Repository.HttpLib.Curl - build-depends: base >= 4.8 && < 4.20, + build-depends: base >= 4.9 && < 4.20, bytestring >= 0.9, process >= 1.1, hackage-security diff --git a/hackage-security-http-client/ChangeLog.md b/hackage-security-http-client/ChangeLog.md index 6809164d..86e9f2fd 100644 --- a/hackage-security-http-client/ChangeLog.md +++ b/hackage-security-http-client/ChangeLog.md @@ -1,3 +1,7 @@ +Unreleased +---------- +* Drop support for GHC 7. + 0.1.1 ----- * Implement updated HttpLib API from hackage-security 0.5 diff --git a/hackage-security-http-client/hackage-security-http-client.cabal b/hackage-security-http-client/hackage-security-http-client.cabal index 79ea6372..51c76f30 100644 --- a/hackage-security-http-client/hackage-security-http-client.cabal +++ b/hackage-security-http-client/hackage-security-http-client.cabal @@ -26,7 +26,6 @@ tested-with: GHC == 8.4.4 GHC == 8.2.2 GHC == 8.0.2 - GHC == 7.10.3 flag use-network-uri description: Are we using network-uri? @@ -34,7 +33,7 @@ flag use-network-uri library exposed-modules: Hackage.Security.Client.Repository.HttpLib.HttpClient - build-depends: base >= 4.8 && < 4.20, + build-depends: base >= 4.9 && < 4.20, bytestring >= 0.9, http-client >= 0.4 && < 0.8, http-types >= 0.8, diff --git a/hackage-security/ChangeLog.md b/hackage-security/ChangeLog.md index 90f43dcd..8a66ba47 100644 --- a/hackage-security/ChangeLog.md +++ b/hackage-security/ChangeLog.md @@ -1,5 +1,11 @@ See also http://pvp.haskell.org/faq +Unreleased +---------- + +* Drop support for GHC 7. +* Drop flag `use-old-time` and support for `old-time`, require `time ≥ 1.5`. + 0.6.2.4 ------- diff --git a/hackage-security/hackage-security.cabal b/hackage-security/hackage-security.cabal index bc861a8c..84ac45dd 100644 --- a/hackage-security/hackage-security.cabal +++ b/hackage-security/hackage-security.cabal @@ -42,7 +42,6 @@ tested-with: GHC == 8.4.4 GHC == 8.2.2 GHC == 8.0.2 - GHC == 7.10.3 extra-source-files: ChangeLog.md @@ -111,8 +110,7 @@ library Hackage.Security.Util.Stack Hackage.Security.Util.TypedEmbedded - build-depends: base >= 4.8 && < 4.20, - -- PatternSynonyms are only available since GHC 7.8 (base 4.7) + build-depends: base >= 4.9 && < 4.20, base16-bytestring >= 0.1.1 && < 1.1, base64-bytestring >= 1.0 && < 1.3, bytestring >= 0.9 && < 0.13, @@ -174,18 +172,13 @@ library AllowAmbiguousTypes BangPatterns CPP + DeriveLift OverlappingInstances PackageImports RoleAnnotations StaticPointers UndecidableInstances - -- use the new stage1/cross-compile-friendly DeriveLift extension for GHC 8.0+ - if impl(ghc >= 8.0) - other-extensions: DeriveLift - else - other-extensions: TemplateHaskell - ghc-options: -Wall -- The URI type got split out off the network package after version 2.5, and diff --git a/hackage-security/src/Hackage/Security/Client.hs b/hackage-security/src/Hackage/Security/Client.hs index c85b21f3..bef41438 100644 --- a/hackage-security/src/Hackage/Security/Client.hs +++ b/hackage-security/src/Hackage/Security/Client.hs @@ -332,11 +332,7 @@ cachedVersion CachedInfo{..} remoteFile = -- | Get all cached info (if any) getCachedInfo :: -#if __GLASGOW_HASKELL__ < 800 - (Applicative m, MonadIO m) -#else MonadIO m -#endif => Repository down -> m CachedInfo getCachedInfo rep = do (cachedRoot, cachedKeyEnv) <- readLocalRoot rep @@ -359,9 +355,6 @@ readLocalRoot rep = do return (trustLocalFile signedRoot, rootKeys (signed signedRoot)) readLocalFile :: ( FromJSON ReadJSON_Keys_Layout (Signed a), MonadIO m -#if __GLASGOW_HASKELL__ < 800 - , Applicative m -#endif ) => Repository down -> KeyEnv -> CachedFile -> m (Maybe (Trusted a)) readLocalFile rep cachedKeyEnv file = do diff --git a/hackage-security/src/Hackage/Security/TUF/Patterns.hs b/hackage-security/src/Hackage/Security/TUF/Patterns.hs index 6f89bdba..20bfb153 100644 --- a/hackage-security/src/Hackage/Security/TUF/Patterns.hs +++ b/hackage-security/src/Hackage/Security/TUF/Patterns.hs @@ -3,12 +3,9 @@ -- NOTE: This module was developed to prepare for proper delegation (#39). -- It is currently unused. {-# LANGUAGE CPP #-} -#if __GLASGOW_HASKELL__ >= 800 {-# LANGUAGE DeriveLift #-} {-# LANGUAGE StandaloneDeriving #-} -#else -{-# LANGUAGE TemplateHaskell #-} -#endif + module Hackage.Security.TUF.Patterns ( -- * Patterns and replacements FileName @@ -274,28 +271,9 @@ qqd pat repl = Left err -> fail $ "Invalid delegation: " ++ err Right del -> TH.lift del -#if __GLASGOW_HASKELL__ >= 800 deriving instance TH.Lift (Pattern a) deriving instance TH.Lift (Replacement a) deriving instance TH.Lift Delegation -#else -instance TH.Lift (Pattern a) where - lift (PatFileConst fn) = [| PatFileConst fn |] - lift (PatFileExt e) = [| PatFileExt e |] - lift PatFileAny = [| PatFileAny |] - lift (PatDirConst d p) = [| PatDirConst d p |] - lift (PatDirAny p) = [| PatDirAny p |] - -instance TH.Lift (Replacement a) where - lift (RepFileConst fn) = [| RepFileConst fn |] - lift (RepFileExt e ) = [| RepFileExt e |] - lift RepFileAny = [| RepFileAny |] - lift (RepDirConst d r) = [| RepDirConst d r |] - lift (RepDirAny r) = [| RepDirAny r |] - -instance TH.Lift Delegation where - lift (Delegation pat repl) = [| Delegation pat repl |] -#endif {------------------------------------------------------------------------------- JSON diff --git a/hackage-security/src/Hackage/Security/Util/Checked.hs b/hackage-security/src/Hackage/Security/Util/Checked.hs index 006bfc5a..dcac49ba 100644 --- a/hackage-security/src/Hackage/Security/Util/Checked.hs +++ b/hackage-security/src/Hackage/Security/Util/Checked.hs @@ -3,10 +3,8 @@ {-# LANGUAGE IncoherentInstances #-} {-# LANGUAGE RoleAnnotations #-} -{-# OPTIONS_GHC -fno-warn-unused-binds #-} -#if __GLASGOW_HASKELL__ >= 800 +{-# OPTIONS_GHC -Wno-unused-binds #-} {-# OPTIONS_GHC -Wno-redundant-constraints #-} -#endif -- | Checked exceptions module Hackage.Security.Util.Checked ( diff --git a/precompute-fileinfo/precompute-fileinfo.cabal b/precompute-fileinfo/precompute-fileinfo.cabal index 4a1c689b..ad0432d6 100644 --- a/precompute-fileinfo/precompute-fileinfo.cabal +++ b/precompute-fileinfo/precompute-fileinfo.cabal @@ -16,12 +16,11 @@ cabal-version: >=1.10 tested-with: GHC==9.6.3, GHC==9.4.5, GHC==9.2.8, GHC==9.0.2, - GHC==8.10.7, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, - GHC==7.10.3 + GHC==8.10.7, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2 executable precompute-fileinfo main-is: Main.hs - build-depends: base >= 4.8, + build-depends: base >= 4.9, bytestring >= 0.9, containers >= 0.4, deepseq >= 1.3,