diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b594200..19bda7d 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' @@ -27,15 +28,15 @@ 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 }} - name: Restore cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 id: cache with: path: ${{ steps.setup.outputs.cabal-store }} @@ -44,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 }} 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