From 06ef8a8df85a1258a5d916eb45510c24b2ece694 Mon Sep 17 00:00:00 2001 From: Yuras Shumovich Date: Thu, 4 Jun 2026 18:53:14 +0200 Subject: [PATCH 1/6] Support ghc-9.12 --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b594200..8592ec7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,7 @@ jobs: fail-fast: false matrix: ghc: + - '9.12' - '9.10' - '9.8' - '9.6' From 54bc3152121ab922c59d0838e931dec7d0cf74e4 Mon Sep 17 00:00:00 2001 From: Yuras Shumovich Date: Thu, 4 Jun 2026 18:59:05 +0200 Subject: [PATCH 2/6] Update CI --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8592ec7..64c08a0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,9 +28,9 @@ jobs: - '8.6' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: haskell/actions/setup@v2 + - uses: haskell-actions/setup@v2 id: setup with: ghc-version: ${{ matrix.ghc }} From 15fff6dff14ff6d96f7c926be6c27dbef1dd1770 Mon Sep 17 00:00:00 2001 From: Yuras Shumovich Date: Thu, 4 Jun 2026 19:10:27 +0200 Subject: [PATCH 3/6] up --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64c08a0..19bda7d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: ghc-version: ${{ matrix.ghc }} - name: Restore cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 id: cache with: path: ${{ steps.setup.outputs.cabal-store }} @@ -45,11 +45,12 @@ jobs: ${{ runner.os }}-build-${{ matrix.ghc }}- - name: Install dependencies + if: ${{ steps.cache.outputs.cache-primary-key != steps.cache.outputs.cache-matched-key }} run: | cabal build --project-file=cabal_no_viewer.project --only-dependencies --enable-tests --enable-benchmarks all - name: Save cache - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 if: ${{ steps.cache.outputs.cache-primary-key != steps.cache.outputs.cache-matched-key }} with: path: ${{ steps.setup.outputs.cabal-store }} From 58313f8bfbea9411a2f4f360189d63a1ab333fda Mon Sep 17 00:00:00 2001 From: Yuras Shumovich Date: Thu, 4 Jun 2026 19:13:16 +0200 Subject: [PATCH 4/6] change key? --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 19bda7d..50ef918 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ jobs: id: cache with: path: ${{ steps.setup.outputs.cabal-store }} - key: ${{ runner.os }}-build-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '/.github/workflows/*.yml') }} + key: a-{{ runner.os }}-build-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '/.github/workflows/*.yml') }} restore-keys: | ${{ runner.os }}-build-${{ matrix.ghc }}- From ec9e636c44413d7d355e6ad673d643269280878c Mon Sep 17 00:00:00 2001 From: Yuras Shumovich Date: Thu, 4 Jun 2026 19:21:52 +0200 Subject: [PATCH 5/6] oops --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 50ef918..19bda7d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ jobs: id: cache with: path: ${{ steps.setup.outputs.cabal-store }} - key: a-{{ runner.os }}-build-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '/.github/workflows/*.yml') }} + key: ${{ runner.os }}-build-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '/.github/workflows/*.yml') }} restore-keys: | ${{ runner.os }}-build-${{ matrix.ghc }}- From e5b34539f083487d970eaadbe547decf74978f29 Mon Sep 17 00:00:00 2001 From: Yuras Shumovich Date: Thu, 4 Jun 2026 19:24:54 +0200 Subject: [PATCH 6/6] typeable --- core/lib/Pdf/Core/Exception.hs | 7 ++----- core/lib/Pdf/Core/XRef.hs | 4 +--- document/lib/Pdf/Document/Pdf.hs | 4 +--- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/core/lib/Pdf/Core/Exception.hs b/core/lib/Pdf/Core/Exception.hs index 390558c..1d624d6 100644 --- a/core/lib/Pdf/Core/Exception.hs +++ b/core/lib/Pdf/Core/Exception.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE DeriveDataTypeable #-} - -- | Exceptions and utilities module Pdf.Core.Exception ( @@ -10,20 +8,19 @@ module Pdf.Core.Exception ) where -import Data.Typeable import Control.Exception hiding (throw) -- | File is corrupted -- -- Contains general message and a list of details data Corrupted = Corrupted String [String] - deriving (Show, Typeable) + deriving (Show) instance Exception Corrupted where -- | Something unexpected occurs, probably API missuse data Unexpected = Unexpected String [String] - deriving (Show, Typeable) + deriving (Show) instance Exception Unexpected where diff --git a/core/lib/Pdf/Core/XRef.hs b/core/lib/Pdf/Core/XRef.hs index f6301e5..2d94474 100644 --- a/core/lib/Pdf/Core/XRef.hs +++ b/core/lib/Pdf/Core/XRef.hs @@ -1,5 +1,4 @@ {-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE DeriveDataTypeable #-} -- | Cross reference @@ -27,7 +26,6 @@ import Pdf.Core.Util import Pdf.Core.IO.Buffer (Buffer) import qualified Pdf.Core.IO.Buffer as Buffer -import Data.Typeable import Data.Int import Data.ByteString (ByteString) import qualified Data.ByteString as ByteString @@ -250,6 +248,6 @@ lookupStreamEntry dict is (R objNumber _) = -- | Unknown entry type should be interpreted as reference to null object data UnknownXRefStreamEntryType = UnknownXRefStreamEntryType Int - deriving (Show, Typeable) + deriving (Show) instance Exception UnknownXRefStreamEntryType diff --git a/document/lib/Pdf/Document/Pdf.hs b/document/lib/Pdf/Document/Pdf.hs index 9034da8..0ef3b77 100644 --- a/document/lib/Pdf/Document/Pdf.hs +++ b/document/lib/Pdf/Document/Pdf.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} module Pdf.Document.Pdf @@ -30,7 +29,6 @@ import Pdf.Core.Encryption (defaultUserPassword) import Pdf.Document.Internal.Types -import Data.Typeable import Data.IORef import Data.ByteString (ByteString) import Data.Text (Text) @@ -141,6 +139,6 @@ deref _ o = return o -- | File is enctypted data EncryptedError = EncryptedError Text - deriving (Show, Typeable) + deriving (Show) instance Exception EncryptedError