From 7eafc8a106098b7db35e837c5be8e8f94765f35f Mon Sep 17 00:00:00 2001 From: Ganesh Sittampalam Date: Mon, 3 Jun 2024 08:42:37 +0100 Subject: [PATCH] screened 2024-06-03 07:42:37+00:00 --- .github/workflows/build-and-test.yml | 3 +-- README.md | 2 +- cabal.project | 4 ---- darcs.cabal | 4 ++-- src/Darcs/Patch/Annotate.hs | 2 +- src/Darcs/Patch/RepoPatch.hs | 7 +------ src/Darcs/Prelude.hs | 13 ------------- src/Darcs/Repository/Hashed.hs | 1 + src/Darcs/Repository/PatchIndex.hs | 2 ++ src/Darcs/UI/Commands/ShowAuthors.hs | 2 -- 10 files changed, 9 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 72adb828..71146a39 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -27,12 +27,11 @@ jobs: - 9.4.8 - 9.6.4 - 9.8.2 - - 9.10.1 cabal: - '3.10' env: builddocs: ${{ matrix.ghc == '9.4.5' }} - runtests: ${{ matrix.ghc == '8.4.4' || matrix.ghc == '9.10.1' }} + runtests: ${{ matrix.ghc == '8.4.4' || matrix.ghc == '9.8.2' }} tests-to-run: # e.g. -t=EXAMPLE testcmd: cabal run -- darcs-test -j=6 -f=123 -i=yn -c=yn --hide ACTIONS_ALLOW_UNSECURE_COMMANDS: true diff --git a/README.md b/README.md index 839f3ff2..91c623f0 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ cabal update && cabal install darcs ``` with a recent cabal (version 3.2 or later is recommended). Any version of -ghc from 8.2 up to 9.10 should work. +ghc from 8.4 up to 9.8 should work. From inside a clone or a source dist, use diff --git a/cabal.project b/cabal.project index fa69a022..e6fdbadb 100644 --- a/cabal.project +++ b/cabal.project @@ -1,5 +1 @@ packages: . - -allow-newer: serialise:base -allow-newer: cborg:base -allow-newer: haskeline:base diff --git a/darcs.cabal b/darcs.cabal index 3cdc0396..7623df30 100644 --- a/darcs.cabal +++ b/darcs.cabal @@ -123,7 +123,7 @@ flag warn-as-error -- ---------------------------------------------------------------------- custom-setup - setup-depends: base >= 4.10 && < 4.21, + setup-depends: base >= 4.11 && < 4.20, Cabal >= 2.4 && < 3.11, process >= 1.2.3.0 && < 1.7, filepath >= 1.4.1 && < 1.5.0.0, @@ -412,7 +412,7 @@ Library else build-depends: unix >= 2.7.1.0 && < 2.9 - build-depends: base >= 4.10 && < 4.21, + build-depends: base >= 4.11 && < 4.20, safe >= 0.3.20 && < 0.4, stm >= 2.1 && < 2.6, binary >= 0.5 && < 0.11, diff --git a/src/Darcs/Patch/Annotate.hs b/src/Darcs/Patch/Annotate.hs index ff79a1f5..ac134666 100644 --- a/src/Darcs/Patch/Annotate.hs +++ b/src/Darcs/Patch/Annotate.hs @@ -62,7 +62,7 @@ import qualified Darcs.Patch.Prim.FileUUID as FileUUID import Darcs.Patch.Annotate.Class import Darcs.Patch.Effect ( Effect(..) ) -import Darcs.Patch.FromPrim ( PrimOf ) +import Darcs.Patch.FromPrim ( PrimOf(..) ) import Darcs.Patch.Info ( displayPatchInfo, piAuthor, makePatchname ) import Darcs.Patch.Invert ( Invert, invert ) import Darcs.Patch.Named ( patchcontents ) diff --git a/src/Darcs/Patch/RepoPatch.hs b/src/Darcs/Patch/RepoPatch.hs index f1033c64..d58931fb 100644 --- a/src/Darcs/Patch/RepoPatch.hs +++ b/src/Darcs/Patch/RepoPatch.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE CPP #-} module Darcs.Patch.RepoPatch ( RepoPatch , AnnotateRP @@ -24,10 +23,6 @@ module Darcs.Patch.RepoPatch , Unwind(..) ) where -#if MIN_VERSION_base(4,20,0) -import Darcs.Prelude -#endif - import Darcs.Patch.Annotate ( AnnotateRP ) import Darcs.Patch.Apply ( Apply(..) ) import Darcs.Patch.Commute ( Commute(..) ) @@ -35,7 +30,7 @@ import Darcs.Patch.Conflict ( Conflict(..) ) import Darcs.Patch.Effect ( Effect(..) ) import Darcs.Patch.FileHunk ( IsHunk(..) ) import Darcs.Patch.Format ( PatchListFormat(..) ) -import Darcs.Patch.FromPrim ( PrimPatchBase(..), PrimOf, FromPrim(..), ToPrim(..) ) +import Darcs.Patch.FromPrim ( PrimPatchBase(..), PrimOf(..), FromPrim(..), ToPrim(..) ) import Darcs.Patch.Inspect ( PatchInspect(..) ) import Darcs.Patch.Merge ( Merge(..) ) import Darcs.Patch.Read ( ReadPatch(..) ) diff --git a/src/Darcs/Prelude.hs b/src/Darcs/Prelude.hs index d9b8f5e2..56928642 100644 --- a/src/Darcs/Prelude.hs +++ b/src/Darcs/Prelude.hs @@ -26,9 +26,7 @@ it to the Prelude import. module Darcs.Prelude ( module Prelude , module Control.Applicative - , module Data.List , module Data.Monoid - , Semigroup(..) , module Data.Traversable ) where @@ -43,11 +41,6 @@ import Prelude hiding , -- because it's in the new Prelude but only in Data.Monoid in older GHCs Monoid(..) -#if MIN_VERSION_base(4,11,0) - , - -- because it's in the new Prelude but only in Data.Semigroup in older GHCs - Semigroup(..) -#endif , -- because it's in the new Prelude but only in Data.Traversable in older GHCs traverse @@ -60,14 +53,8 @@ import Prelude hiding , -- used by various code for no particularly good reason lookup, pred -#if MIN_VERSION_base(4,20,0) - , -- because it's in the new Prelude but only in Data.List in older GHCs - foldl' -#endif ) import Control.Applicative ( Applicative(..), (<$>), (<*>) ) -import Data.List ( foldl' ) import Data.Monoid ( Monoid(..) ) -import Data.Semigroup ( Semigroup(..) ) import Data.Traversable ( traverse ) diff --git a/src/Darcs/Repository/Hashed.hs b/src/Darcs/Repository/Hashed.hs index aaccec94..fa78c251 100644 --- a/src/Darcs/Repository/Hashed.hs +++ b/src/Darcs/Repository/Hashed.hs @@ -38,6 +38,7 @@ module Darcs.Repository.Hashed import Darcs.Prelude import Control.Monad ( unless, when ) +import Data.List ( foldl' ) import System.Directory ( copyFile , createDirectoryIfMissing diff --git a/src/Darcs/Repository/PatchIndex.hs b/src/Darcs/Repository/PatchIndex.hs index ff657ad9..ea70693f 100644 --- a/src/Darcs/Repository/PatchIndex.hs +++ b/src/Darcs/Repository/PatchIndex.hs @@ -59,6 +59,7 @@ import System.Directory , removeDirectoryRecursive , removeFile , renameDirectory + , copyPermissions ) import System.FilePath( () ) import System.IO ( openFile, IOMode(WriteMode), hClose ) @@ -526,6 +527,7 @@ storePatchIndex cdir inv_hash (PatchIndex pids fidspans fpspans infom) = do debugMessage "Patch index created" return tmpdir removeDirectoryRecursive cdir `catch` \(_ :: IOError) -> return () + copyPermissions darcsdir tmpdir renameDirectory tmpdir cdir decodeFile :: Binary a => FilePath -> IO a diff --git a/src/Darcs/UI/Commands/ShowAuthors.hs b/src/Darcs/UI/Commands/ShowAuthors.hs index 125b0403..a1015baa 100644 --- a/src/Darcs/UI/Commands/ShowAuthors.hs +++ b/src/Darcs/UI/Commands/ShowAuthors.hs @@ -15,8 +15,6 @@ -- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -- Boston, MA 02110-1301, USA. -{-# OPTIONS_GHC -Wno-unrecognised-warning-flags #-} -{-# OPTIONS_GHC -Wno-x-data-list-nonempty-unzip #-} module Darcs.UI.Commands.ShowAuthors ( showAuthors, Spelling, compiledAuthorSpellings, canonizeAuthor, rankAuthors ) where