diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 8586e5db..d37d22d1 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.19.20250506 +# version: 0.19.20250908 # -# REGENDATA ("0.19.20250506",["github","cabal.project"]) +# REGENDATA ("0.19.20250908",["github","cabal.project"]) # name: Haskell-CI on: @@ -32,6 +32,11 @@ jobs: strategy: matrix: include: + - compiler: ghc-9.14.0.20250819 + compilerKind: ghc + compilerVersion: 9.14.0.20250819 + setup-method: ghcup-prerelease + allow-failure: false - compiler: ghc-9.12.2 compilerKind: ghc compilerVersion: 9.12.2 @@ -100,8 +105,8 @@ jobs: chmod a+x "$HOME/.ghcup/bin/ghcup" - name: Install cabal-install run: | - "$HOME/.ghcup/bin/ghcup" install cabal 3.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" + "$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV" - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | @@ -116,6 +121,21 @@ jobs: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} HCVER: ${{ matrix.compilerVersion }} + - name: Install GHC (GHCup prerelease) + if: matrix.setup-method == 'ghcup-prerelease' + run: | + "$HOME/.ghcup/bin/ghcup" config add-release-channel prereleases + "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) + 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" + env: + HCKIND: ${{ matrix.compilerKind }} + HCNAME: ${{ matrix.compiler }} + HCVER: ${{ matrix.compilerVersion }} - name: Set PATH and environment variables run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH @@ -126,7 +146,7 @@ jobs: echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" - echo "HEADHACKAGE=false" >> "$GITHUB_ENV" + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" env: HCKIND: ${{ matrix.compilerKind }} @@ -154,6 +174,18 @@ jobs: repository hackage.haskell.org url: http://hackage.haskell.org/ EOF + if $HEADHACKAGE; then + cat >> $CABAL_CONFIG <> $CABAL_CONFIG <> cabal.project echo "packages: ${PKGDIR_precompute_fileinfo}" >> cabal.project echo "package hackage-security" >> cabal.project - echo " ghc-options: -Werror=missing-methods" >> cabal.project + echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project echo "package hackage-security-http-client" >> cabal.project - echo " ghc-options: -Werror=missing-methods" >> cabal.project + echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project echo "package example-client" >> cabal.project - echo " ghc-options: -Werror=missing-methods" >> cabal.project + echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project echo "package hackage-security-curl" >> cabal.project - echo " ghc-options: -Werror=missing-methods" >> cabal.project + echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project echo "package hackage-root-tool" >> cabal.project - echo " ghc-options: -Werror=missing-methods" >> cabal.project + echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project echo "package hackage-repo-tool" >> cabal.project - echo " ghc-options: -Werror=missing-methods" >> cabal.project + echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project echo "package hackage-security-HTTP" >> cabal.project - echo " ghc-options: -Werror=missing-methods" >> cabal.project + echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project echo "package precompute-fileinfo" >> cabal.project - echo " ghc-options: -Werror=missing-methods" >> cabal.project + echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package hackage-security" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package hackage-security-http-client" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package example-client" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package hackage-security-curl" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package hackage-root-tool" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package hackage-repo-tool" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package hackage-security-HTTP" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package precompute-fileinfo" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi cat >> cabal.project <= 0.12.2 EOF + if $HEADHACKAGE; then + echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project + fi $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(example-client|hackage-repo-tool|hackage-root-tool|hackage-security|hackage-security-HTTP|hackage-security-curl|hackage-security-http-client|precompute-fileinfo)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index f0e103d0..bd166afc 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -18,7 +18,7 @@ jobs: ghc: ['9.12', '9.10', '9.8', '9.6'] os: [ubuntu-latest, macOS-latest, windows-latest] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: haskell-actions/setup@v2 id: setup diff --git a/.github/workflows/stack.yml b/.github/workflows/stack.yml index 7f4338a2..7bfda689 100644 --- a/.github/workflows/stack.yml +++ b/.github/workflows/stack.yml @@ -14,15 +14,15 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - ghc: ['9.10', '9.8', '9.6', '9.4', '9.2', '9.0', '8.10', '8.8', '8.6', '8.4'] + ghc: ['9.12', '9.10', '9.8', '9.6', '9.4', '9.2', '9.0', '8.10', '8.8', '8.6', '8.4'] include: - os: macos-latest - ghc: '9.10' + ghc: '9.12' - os: windows-latest - ghc: '9.10' + ghc: '9.12' steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: haskell-actions/setup@v2 id: setup diff --git a/.gitignore b/.gitignore index 12532299..ab379bbb 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ dist-newstyle .ghc.environment.* cabal.project.local stack*.yaml.lock +*~ \ No newline at end of file diff --git a/cabal.haskell-ci b/cabal.haskell-ci index a469d194..3b837d9c 100644 --- a/cabal.haskell-ci +++ b/cabal.haskell-ci @@ -1,6 +1,10 @@ branches: master installed: +all +-- Andreas 2025-09-08: Latest Haskell CI adds -Werror=unused-packages +-- which is hard to get to work in our setting with many conditionals. +error-unused-packages: False + -- Andreas, 2023-07-01: We use some haddock features that are new in 8.6. haddock: >= 8.6 diff --git a/example-client/example-client.cabal b/example-client/example-client.cabal index 6573ced0..10fe4f8a 100644 --- a/example-client/example-client.cabal +++ b/example-client/example-client.cabal @@ -12,6 +12,7 @@ build-type: Simple cabal-version: >=1.10 tested-with: + GHC == 9.14.1 GHC == 9.12.2 GHC == 9.10.2 GHC == 9.8.4 @@ -33,7 +34,7 @@ executable example-client main-is: Main.hs other-modules: ExampleClient.Options - build-depends: base >= 4.11 && < 4.22, + build-depends: base >= 4.11 && < 4.23, bytestring >= 0.10.8.2, directory >= 1.3.1.5, filepath >= 1.4.2, @@ -47,8 +48,7 @@ executable example-client hackage-security-http-client hs-source-dirs: src default-language: Haskell2010 - default-extensions: DeriveDataTypeable - FlexibleContexts + default-extensions: FlexibleContexts RankNTypes RecordWildCards ScopedTypeVariables diff --git a/hackage-repo-tool/hackage-repo-tool.cabal b/hackage-repo-tool/hackage-repo-tool.cabal index db4c65c6..20fc5f2f 100644 --- a/hackage-repo-tool/hackage-repo-tool.cabal +++ b/hackage-repo-tool/hackage-repo-tool.cabal @@ -24,6 +24,7 @@ homepage: https://github.com/haskell/hackage-security bug-reports: https://github.com/haskell/hackage-security/issues tested-with: + GHC == 9.14.1 GHC == 9.12.2 GHC == 9.10.2 GHC == 9.8.4 @@ -59,13 +60,13 @@ executable hackage-repo-tool -- For boot libraries we try to accomodate the versions bundled with -- the respective GHC release - build-depends: base >= 4.11 && < 4.22, + build-depends: base >= 4.11 && < 4.23, bytestring >= 0.10.8.2 && < 0.13, directory >= 1.3.1.5 && < 1.4, filepath >= 1.4.2 && < 1.6, network-uri >= 2.6 && < 2.7, network >= 2.6 && < 3.3, - time >= 1.8.0.2 && < 1.15 + time >= 1.8.0.2 && < 1.16 if !os(windows) build-depends: unix >= 2.7.2.2 && < 2.9 @@ -85,8 +86,7 @@ executable hackage-repo-tool default-language: Haskell2010 - default-extensions: DeriveDataTypeable - FlexibleContexts + default-extensions: FlexibleContexts FlexibleInstances NoMonomorphismRestriction ScopedTypeVariables diff --git a/hackage-repo-tool/src/Hackage/Security/RepoTool/Util/IO.hs b/hackage-repo-tool/src/Hackage/Security/RepoTool/Util/IO.hs index 1cc7baed..ec8f90a8 100644 --- a/hackage-repo-tool/src/Hackage/Security/RepoTool/Util/IO.hs +++ b/hackage-repo-tool/src/Hackage/Security/RepoTool/Util/IO.hs @@ -17,7 +17,6 @@ import qualified Codec.Archive.Tar.Entry as Tar import qualified Codec.Compression.GZip as GZip import Control.Exception import qualified Data.ByteString.Lazy as BS.L -import Data.Typeable import qualified System.Directory as Directory import System.IO.Error @@ -111,7 +110,6 @@ tarExtractFile opts repoLoc pathTarGz pathToExtract = go es data TarGzError = TarGzError FilePath SomeException - deriving (Typeable) instance Exception TarGzError where displayException (TarGzError path e) = path ++ ": " ++ displayException e diff --git a/hackage-root-tool/hackage-root-tool.cabal b/hackage-root-tool/hackage-root-tool.cabal index 4df1975f..2290a752 100644 --- a/hackage-root-tool/hackage-root-tool.cabal +++ b/hackage-root-tool/hackage-root-tool.cabal @@ -16,6 +16,7 @@ build-type: Simple cabal-version: >=1.10 tested-with: + GHC == 9.14.1 GHC == 9.12.2 GHC == 9.10.2 GHC == 9.8.4 diff --git a/hackage-security-HTTP/hackage-security-HTTP.cabal b/hackage-security-HTTP/hackage-security-HTTP.cabal index ba7f81ef..200cdeec 100644 --- a/hackage-security-HTTP/hackage-security-HTTP.cabal +++ b/hackage-security-HTTP/hackage-security-HTTP.cabal @@ -19,6 +19,7 @@ bug-reports: https://github.com/haskell/hackage-security/issues build-type: Simple tested-with: + GHC == 9.14.1 GHC == 9.12.2 GHC == 9.10.2 GHC == 9.8.4 @@ -40,7 +41,7 @@ source-repository head library exposed-modules: Hackage.Security.Client.Repository.HttpLib.HTTP - build-depends: base >= 4.11 && < 4.22, + build-depends: base >= 4.11 && < 4.23, bytestring >= 0.10.8.2 && < 0.13, HTTP >= 4000.2.19 && < 4000.5, mtl >= 2.2.2 && < 2.4, @@ -50,8 +51,7 @@ library hackage-security >= 0.5 && < 0.7 hs-source-dirs: src default-language: Haskell2010 - default-extensions: DeriveDataTypeable - FlexibleContexts + default-extensions: FlexibleContexts RankNTypes RecordWildCards ScopedTypeVariables diff --git a/hackage-security-HTTP/src/Hackage/Security/Client/Repository/HttpLib/HTTP.hs b/hackage-security-HTTP/src/Hackage/Security/Client/Repository/HttpLib/HTTP.hs index 04a40c8b..90a47919 100644 --- a/hackage-security-HTTP/src/Hackage/Security/Client/Repository/HttpLib/HTTP.hs +++ b/hackage-security-HTTP/src/Hackage/Security/Client/Repository/HttpLib/HTTP.hs @@ -18,7 +18,6 @@ import Control.Concurrent import Control.Exception import Control.Monad import Data.List (intercalate) -import Data.Typeable (Typeable) import Network.URI import qualified Data.ByteString.Lazy as BS.L import qualified Control.Monad.State as State @@ -120,10 +119,8 @@ wrapCustomEx act = handleChecked (\(ex :: UnexpectedResponse) -> go ex) go ex = throwChecked (SomeRemoteError ex) data UnexpectedResponse = UnexpectedResponse URI (Int, Int, Int) - deriving (Typeable) data InvalidProxy = InvalidProxy String - deriving (Typeable) instance Pretty UnexpectedResponse where pretty (UnexpectedResponse uri code) = "Unexpected response " ++ show code diff --git a/hackage-security-curl/hackage-security-curl.cabal b/hackage-security-curl/hackage-security-curl.cabal index 150d10e9..25159687 100644 --- a/hackage-security-curl/hackage-security-curl.cabal +++ b/hackage-security-curl/hackage-security-curl.cabal @@ -16,6 +16,7 @@ build-type: Simple cabal-version: >=1.10 tested-with: + GHC == 9.14.1 GHC == 9.12.2 GHC == 9.10.2 GHC == 9.8.4 @@ -30,7 +31,7 @@ tested-with: library exposed-modules: Hackage.Security.Client.Repository.HttpLib.Curl - build-depends: base >= 4.11 && < 4.22, + build-depends: base >= 4.11 && < 4.23, bytestring >= 0.10.8.2 && < 0.13, network-uri >= 2.6 && < 2.7, network >= 2.6 && < 3.3, diff --git a/hackage-security-http-client/hackage-security-http-client.cabal b/hackage-security-http-client/hackage-security-http-client.cabal index d0408498..2cfcbd8b 100644 --- a/hackage-security-http-client/hackage-security-http-client.cabal +++ b/hackage-security-http-client/hackage-security-http-client.cabal @@ -16,6 +16,7 @@ cabal-version: >=1.10 extra-source-files: ChangeLog.md tested-with: + GHC == 9.14.1 GHC == 9.12.2 GHC == 9.10.2 GHC == 9.8.4 @@ -30,7 +31,7 @@ tested-with: library exposed-modules: Hackage.Security.Client.Repository.HttpLib.HttpClient - build-depends: base >= 4.11 && < 4.22, + build-depends: base >= 4.11 && < 4.23, bytestring >= 0.10.8.2 && < 0.13, http-client >= 0.4 && < 0.8, http-types >= 0.12.2 && < 0.13, diff --git a/hackage-security/hackage-security.cabal b/hackage-security/hackage-security.cabal index dc66f570..9f98be37 100644 --- a/hackage-security/hackage-security.cabal +++ b/hackage-security/hackage-security.cabal @@ -31,6 +31,7 @@ bug-reports: https://github.com/haskell/hackage-security/issues build-type: Simple tested-with: + GHC == 9.14.1 GHC == 9.12.2 GHC == 9.10.2 GHC == 9.8.4 @@ -106,11 +107,11 @@ library Hackage.Security.Util.Stack Hackage.Security.Util.TypedEmbedded - build-depends: base >= 4.11 && < 4.22, + build-depends: base >= 4.11 && < 4.23, base16-bytestring >= 0.1.1 && < 1.1, base64-bytestring >= 1.0 && < 1.3, bytestring >= 0.10.8.2 && < 0.13, - containers >= 0.5.11 && < 0.8, + containers >= 0.5.11 && < 0.9, cryptohash-sha256 >= 0.11 && < 0.12, directory >= 1.3.1.5 && < 1.4, ed25519 >= 0.0 && < 0.1, @@ -123,8 +124,8 @@ library -- 0.4.2 introduces TarIndex, 0.4.4 introduces more -- functionality, 0.5.0 changes type of serialise tar >= 0.5 && < 0.7, - template-haskell >= 2.13 && < 2.24, - time >= 1.8.0.2 && < 1.15, + template-haskell >= 2.13 && < 2.25, + time >= 1.8.0.2 && < 1.16, transformers >= 0.3 && < 0.7, zlib >= 0.5 && < 0.8, -- whatever versions are bundled with ghc: diff --git a/hackage-security/src/Hackage/Security/Client.hs b/hackage-security/src/Hackage/Security/Client.hs index 6dcb426f..e186f2f7 100644 --- a/hackage-security/src/Hackage/Security/Client.hs +++ b/hackage-security/src/Hackage/Security/Client.hs @@ -49,7 +49,6 @@ import Data.Maybe (isNothing) import Data.Ord (comparing) import Data.Time import Data.Traversable (for) -import Data.Typeable (Typeable) import qualified Codec.Archive.Tar as Tar import qualified Codec.Archive.Tar.Entry as Tar import qualified Codec.Archive.Tar.Index as Tar @@ -931,17 +930,14 @@ uncheckClientErrors act = handleChecked rethrowVerificationError rethrowInvalidPackageException = throwIO data InvalidPackageException = InvalidPackageException PackageIdentifier - deriving (Typeable) data LocalFileCorrupted = LocalFileCorrupted DeserializationError - deriving (Typeable) data InvalidFileInIndex = forall dec. InvalidFileInIndex { invalidFileInIndex :: IndexFile dec , invalidFileInIndexRaw :: BS.L.ByteString , invalidFileInIndexError :: DeserializationError } - deriving (Typeable) deriving instance Show InvalidPackageException deriving instance Show LocalFileCorrupted diff --git a/hackage-security/src/Hackage/Security/Client/Repository.hs b/hackage-security/src/Hackage/Security/Client/Repository.hs index dbe42723..d5fce71e 100644 --- a/hackage-security/src/Hackage/Security/Client/Repository.hs +++ b/hackage-security/src/Hackage/Security/Client/Repository.hs @@ -33,7 +33,6 @@ module Hackage.Security.Client.Repository ( import Prelude import Control.Exception import Data.Kind (Type) -import Data.Typeable (Typeable) import qualified Codec.Archive.Tar.Index as Tar import qualified Data.ByteString.Lazy as BS.L @@ -384,7 +383,6 @@ class DownloadedFile (down :: Type -> Type) where -- for local repositories this might correspond to file-not-found, etc. data SomeRemoteError :: Type where SomeRemoteError :: Exception e => e -> SomeRemoteError - deriving (Typeable) deriving instance Show SomeRemoteError instance Exception SomeRemoteError where displayException = pretty diff --git a/hackage-security/src/Hackage/Security/Client/Repository/Remote.hs b/hackage-security/src/Hackage/Security/Client/Repository/Remote.hs index 967d5249..3c19c365 100644 --- a/hackage-security/src/Hackage/Security/Client/Repository/Remote.hs +++ b/hackage-security/src/Hackage/Security/Client/Repository/Remote.hs @@ -34,7 +34,6 @@ import Control.Monad (when, unless) import Control.Monad.IO.Class (MonadIO) import Data.Kind (Type) import Data.List (nub, intercalate) -import Data.Typeable import Network.URI hiding (uriPath, path) import System.IO () import qualified Data.ByteString as BS @@ -486,7 +485,6 @@ data FileTooLarge = FileTooLarge { fileTooLargePath :: TargetPath , fileTooLargeExpected :: FileSize } - deriving (Typeable) instance Pretty FileTooLarge where pretty FileTooLarge{..} = concat [ diff --git a/hackage-security/src/Hackage/Security/JSON.hs b/hackage-security/src/Hackage/Security/JSON.hs index b4ab94c6..50264223 100644 --- a/hackage-security/src/Hackage/Security/JSON.hs +++ b/hackage-security/src/Hackage/Security/JSON.hs @@ -45,7 +45,6 @@ import Control.Monad (unless, liftM) import Control.Monad.Except (MonadError, Except, ExceptT, runExcept, runExceptT, throwError) import Control.Monad.Reader (MonadReader, Reader, runReader, local, ask) import Data.Functor.Identity -import Data.Typeable (Typeable) import qualified Data.ByteString.Lazy as BS.L import Hackage.Security.Key @@ -82,7 +81,6 @@ data DeserializationError = -- -- Records actual and expected types. | DeserializationErrorFileType String String - deriving (Typeable) deriving instance Show DeserializationError instance Exception DeserializationError where displayException = pretty diff --git a/hackage-security/src/Hackage/Security/Key.hs b/hackage-security/src/Hackage/Security/Key.hs index db7cc383..acac484e 100644 --- a/hackage-security/src/Hackage/Security/Key.hs +++ b/hackage-security/src/Hackage/Security/Key.hs @@ -28,7 +28,6 @@ module Hackage.Security.Key ( import Prelude import Control.Monad import Data.Functor.Identity -import Data.Typeable (Typeable) import Text.JSON.Canonical import qualified Crypto.Hash.SHA256 as SHA256 import qualified Crypto.Sign.Ed25519 as Ed25519 @@ -50,15 +49,12 @@ data Ed25519 data Key a where KeyEd25519 :: Ed25519.PublicKey -> Ed25519.SecretKey -> Key Ed25519 - deriving (Typeable) data PublicKey a where PublicKeyEd25519 :: Ed25519.PublicKey -> PublicKey Ed25519 - deriving (Typeable) data PrivateKey a where PrivateKeyEd25519 :: Ed25519.SecretKey -> PrivateKey Ed25519 - deriving (Typeable) deriving instance Show (Key typ) deriving instance Show (PublicKey typ) diff --git a/hackage-security/src/Hackage/Security/TUF/Header.hs b/hackage-security/src/Hackage/Security/TUF/Header.hs index 822c5c81..ec7e615e 100644 --- a/hackage-security/src/Hackage/Security/TUF/Header.hs +++ b/hackage-security/src/Hackage/Security/TUF/Header.hs @@ -14,7 +14,6 @@ module Hackage.Security.TUF.Header ( import Prelude import Data.Time -import Data.Typeable (Typeable) import Hackage.Security.JSON import Hackage.Security.Util.Lens @@ -38,7 +37,7 @@ class HasHeader a where -- 'Show' and 'Read' instance are defined in terms of the underlying 'Int' -- (this is used for example by Hackage during the backup process). newtype FileVersion = FileVersion Int54 - deriving (Eq, Ord, Typeable) + deriving (Eq, Ord) instance Show FileVersion where show (FileVersion v) = show v @@ -53,7 +52,7 @@ instance Read FileVersion where -- allows that, because you could set an expiry date 2000 years into the future. -- By having the Maybe here we avoid the _need_ for such encoding issues.) newtype FileExpires = FileExpires (Maybe UTCTime) - deriving (Eq, Ord, Show, Typeable) + deriving (Eq, Ord, Show) -- | Occasionally it is useful to read only a header from a file. -- diff --git a/hackage-security/src/Hackage/Security/Trusted/TCB.hs b/hackage-security/src/Hackage/Security/Trusted/TCB.hs index efef4cc1..680505e3 100644 --- a/hackage-security/src/Hackage/Security/Trusted/TCB.hs +++ b/hackage-security/src/Hackage/Security/Trusted/TCB.hs @@ -23,7 +23,6 @@ import Prelude import Control.Exception import Control.Monad (when, unless) import Control.Monad.Except (Except, runExcept, throwError) -import Data.Typeable import Data.Time import Hackage.Security.TUF import Hackage.Security.JSON @@ -184,11 +183,9 @@ data VerificationError = -- -- We record all verification errors that occurred before we gave up. | VerificationErrorLoop VerificationHistory - deriving (Typeable) -- | Root metadata updated (as part of the normal update process) data RootUpdated = RootUpdated - deriving (Typeable) type VerificationHistory = [Either RootUpdated VerificationError] diff --git a/hackage-security/src/Hackage/Security/Util/Checked.hs b/hackage-security/src/Hackage/Security/Util/Checked.hs index 415f3535..f7953a8e 100644 --- a/hackage-security/src/Hackage/Security/Util/Checked.hs +++ b/hackage-security/src/Hackage/Security/Util/Checked.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE IncoherentInstances #-} {-# LANGUAGE RoleAnnotations #-} @@ -22,7 +21,6 @@ module Hackage.Security.Util.Checked ( import Prelude import Control.Exception (Exception, IOException) import qualified Control.Exception as Base -import Data.Typeable (Typeable) import GHC.Prim (coerce) @@ -59,7 +57,7 @@ catchSync act onErr = act `Base.catch` \e -> -- | Wraps up an async exception as a synchronous exception. newtype SyncException = SyncException Base.SomeException - deriving (Show, Typeable) + deriving (Show) instance Exception SyncException -- | Throw a checked exception diff --git a/hackage-security/src/Hackage/Security/Util/Some.hs b/hackage-security/src/Hackage/Security/Util/Some.hs index 5f27ea86..16634982 100644 --- a/hackage-security/src/Hackage/Security/Util/Some.hs +++ b/hackage-security/src/Hackage/Security/Util/Some.hs @@ -15,15 +15,12 @@ module Hackage.Security.Util.Some ( ) where import Prelude -import Data.Typeable (Typeable) import Hackage.Security.Util.TypedEmbedded import Hackage.Security.Util.Pretty data Some f = forall a. Some (f a) -deriving instance Typeable Some - {------------------------------------------------------------------------------- Equality on Some types diff --git a/hackage-security/src/Text/JSON/Canonical.hs b/hackage-security/src/Text/JSON/Canonical.hs index 936e11b3..1223988b 100644 --- a/hackage-security/src/Text/JSON/Canonical.hs +++ b/hackage-security/src/Text/JSON/Canonical.hs @@ -43,7 +43,6 @@ import Data.Function (on) import Data.Int (Int64) import Data.Ix (Ix) import Data.List (foldl', sortBy) -import Data.Typeable (Typeable) import Foreign.Storable (Storable) import Text.Printf (PrintfArg) import qualified Data.ByteString.Lazy.Char8 as BS @@ -79,7 +78,6 @@ newtype Int54 = Int54 { int54ToInt64 :: Int64 } , Bits , Storable , PrintfArg - , Typeable ) instance Bounded Int54 where diff --git a/precompute-fileinfo/precompute-fileinfo.cabal b/precompute-fileinfo/precompute-fileinfo.cabal index e87ce5a4..cdaec886 100644 --- a/precompute-fileinfo/precompute-fileinfo.cabal +++ b/precompute-fileinfo/precompute-fileinfo.cabal @@ -15,6 +15,7 @@ build-type: Simple cabal-version: >=1.10 tested-with: + GHC == 9.14.1 GHC == 9.12.2 GHC == 9.10.2 GHC == 9.8.4 @@ -29,9 +30,9 @@ tested-with: executable precompute-fileinfo main-is: Main.hs - build-depends: base >= 4.11 && < 4.22, + build-depends: base >= 4.11 && < 4.23, bytestring >= 0.10.8.2 && < 0.13, - containers >= 0.5.11 && < 0.8, + containers >= 0.5.11 && < 0.9, deepseq >= 1.4.3 && < 1.6, filepath >= 1.4.2 && < 1.6, optparse-applicative >= 0.13 && < 0.20, diff --git a/stack-9.10.yaml b/stack-9.10.yaml index a74c35fd..e1ad2044 100644 --- a/stack-9.10.yaml +++ b/stack-9.10.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2025-05-05 +resolver: lts-24.9 packages: - example-client - hackage-repo-tool diff --git a/stack-9.12.yaml b/stack-9.12.yaml new file mode 100644 index 00000000..8438619e --- /dev/null +++ b/stack-9.12.yaml @@ -0,0 +1,18 @@ +resolver: nightly-2025-09-06 +packages: +- example-client +- hackage-repo-tool +- hackage-root-tool +- hackage-security +- hackage-security-HTTP +- hackage-security-curl +- hackage-security-http-client +- precompute-fileinfo + +flags: + example-client: + cabal-syntax: true + hackage-repo-tool: + cabal-syntax: true + hackage-security: + cabal-syntax: true diff --git a/stack-9.8.yaml b/stack-9.8.yaml index ddd292ca..a6c7317f 100644 --- a/stack-9.8.yaml +++ b/stack-9.8.yaml @@ -1,4 +1,4 @@ -resolver: lts-23.21 +resolver: lts-23.28 packages: - example-client - hackage-repo-tool