From 009ab8b6f86c9b869f3bcbdb9bb1f0bb9067bdec Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Fri, 15 Dec 2023 17:10:33 +0100 Subject: [PATCH] hackage-security: import from tar-0.6 in a way compatible with tar-0.5 This requires importing constructors independent of their data type (which changed from 0.5 to 0.6), via the `pattern` syntax. Consequently, we drop GHC 7.6 which does not have `PatternSynonyms`. --- hackage-security/ChangeLog.md | 7 +++++++ hackage-security/hackage-security.cabal | 7 ++++--- .../src/Hackage/Security/Client/Repository/Cache.hs | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/hackage-security/ChangeLog.md b/hackage-security/ChangeLog.md index a46b79f3..f5028d69 100644 --- a/hackage-security/ChangeLog.md +++ b/hackage-security/ChangeLog.md @@ -1,5 +1,12 @@ See also http://pvp.haskell.org/faq +0.6.2.4 +------- + +* Allow `tar-0.6` +* Drop support for GHC < 7.8 in favor of `PatternSynonyms` +* Tested with GHC 7.10 - 9.8 + 0.6.2.3 ------- diff --git a/hackage-security/hackage-security.cabal b/hackage-security/hackage-security.cabal index 3088485f..bb9ea521 100644 --- a/hackage-security/hackage-security.cabal +++ b/hackage-security/hackage-security.cabal @@ -1,7 +1,6 @@ cabal-version: 1.12 name: hackage-security -version: 0.6.2.3 -x-revision: 9 +version: 0.6.2.4 synopsis: Hackage security library description: The hackage security library provides both server and @@ -127,7 +126,8 @@ library Hackage.Security.Util.TypedEmbedded MyPrelude -- We support ghc 7.4 (bundled with Cabal 1.14) and up - build-depends: base >= 4.5 && < 4.20, + build-depends: base >= 4.7 && < 4.20, + -- PatternSynonyms are only available since GHC 7.8 (base 4.7) base16-bytestring >= 0.1.1 && < 1.1, base64-bytestring >= 1.0 && < 1.3, bytestring >= 0.9 && < 0.13, @@ -185,6 +185,7 @@ library NamedFieldPuns NoImplicitPrelude NoMonomorphismRestriction + PatternSynonyms RankNTypes RecordWildCards ScopedTypeVariables diff --git a/hackage-security/src/Hackage/Security/Client/Repository/Cache.hs b/hackage-security/src/Hackage/Security/Client/Repository/Cache.hs index 2b9f0287..f1e99f64 100644 --- a/hackage-security/src/Hackage/Security/Client/Repository/Cache.hs +++ b/hackage-security/src/Hackage/Security/Client/Repository/Cache.hs @@ -20,7 +20,7 @@ import Control.Exception import Control.Monad import Control.Monad.IO.Class import Data.Maybe -import Codec.Archive.Tar (Entries(..)) +import Codec.Archive.Tar (Entries, pattern Done, pattern Fail, pattern Next) import Codec.Archive.Tar.Index (TarIndex, IndexBuilder, TarEntryOffset) import qualified Codec.Archive.Tar as Tar import qualified Codec.Archive.Tar.Index as TarIndex