From fd748e2fd260447780064aa8540277cc2d630029 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Tue, 9 Jan 2024 06:38:07 +0100 Subject: [PATCH] Require base >= 4.8, drop custom preludes The custom preludes simulated the Prelude of base-4.8, which is now present always; thus, they are obsolete. --- example-client/example-client.cabal | 4 +-- example-client/src/Prelude.hs | 27 ---------------- hackage-repo-tool/hackage-repo-tool.cabal | 3 +- hackage-repo-tool/src/Prelude.hs | 27 ---------------- hackage-root-tool/hackage-root-tool.cabal | 2 +- .../hackage-security-HTTP.cabal | 2 +- .../hackage-security-curl.cabal | 2 +- .../hackage-security-http-client.cabal | 2 +- hackage-security/hackage-security.cabal | 3 +- .../src/Hackage/Security/Client.hs | 2 +- .../src/Hackage/Security/Client/Formats.hs | 2 +- .../src/Hackage/Security/Client/Repository.hs | 2 +- .../Security/Client/Repository/Cache.hs | 2 +- .../Security/Client/Repository/HttpLib.hs | 2 +- .../Security/Client/Repository/Local.hs | 2 +- .../Security/Client/Repository/Remote.hs | 3 +- .../src/Hackage/Security/Client/Verify.hs | 2 +- hackage-security/src/Hackage/Security/JSON.hs | 2 +- hackage-security/src/Hackage/Security/Key.hs | 2 +- .../src/Hackage/Security/Key/Env.hs | 2 +- .../src/Hackage/Security/TUF/Common.hs | 2 +- .../src/Hackage/Security/TUF/FileInfo.hs | 2 +- .../src/Hackage/Security/TUF/FileMap.hs | 2 +- .../src/Hackage/Security/TUF/Header.hs | 2 +- .../src/Hackage/Security/TUF/Layout/Cache.hs | 2 +- .../src/Hackage/Security/TUF/Layout/Index.hs | 2 +- .../src/Hackage/Security/TUF/Layout/Repo.hs | 2 +- .../src/Hackage/Security/TUF/Mirrors.hs | 2 +- .../src/Hackage/Security/TUF/Paths.hs | 2 +- .../src/Hackage/Security/TUF/Patterns.hs | 2 +- .../src/Hackage/Security/TUF/Root.hs | 2 +- .../src/Hackage/Security/TUF/Signed.hs | 2 +- .../src/Hackage/Security/TUF/Snapshot.hs | 2 +- .../src/Hackage/Security/TUF/Targets.hs | 2 +- .../src/Hackage/Security/TUF/Timestamp.hs | 2 +- .../src/Hackage/Security/Trusted.hs | 2 +- .../src/Hackage/Security/Trusted/TCB.hs | 2 +- .../src/Hackage/Security/Util/Base64.hs | 2 +- .../src/Hackage/Security/Util/Checked.hs | 2 +- .../src/Hackage/Security/Util/Exit.hs | 2 +- .../src/Hackage/Security/Util/IO.hs | 2 +- .../src/Hackage/Security/Util/JSON.hs | 2 +- .../src/Hackage/Security/Util/Lens.hs | 2 +- .../src/Hackage/Security/Util/Path.hs | 2 +- .../src/Hackage/Security/Util/Pretty.hs | 2 +- .../src/Hackage/Security/Util/Some.hs | 2 +- .../src/Hackage/Security/Util/Stack.hs | 2 +- .../Hackage/Security/Util/TypedEmbedded.hs | 2 +- hackage-security/src/MyPrelude.hs | 31 ------------------- hackage-security/src/Text/JSON/Canonical.hs | 3 +- precompute-fileinfo/precompute-fileinfo.cabal | 2 +- 51 files changed, 49 insertions(+), 138 deletions(-) delete mode 100644 example-client/src/Prelude.hs delete mode 100644 hackage-repo-tool/src/Prelude.hs delete mode 100644 hackage-security/src/MyPrelude.hs diff --git a/example-client/example-client.cabal b/example-client/example-client.cabal index 123e7c51..fc882344 100644 --- a/example-client/example-client.cabal +++ b/example-client/example-client.cabal @@ -36,9 +36,9 @@ flag Cabal-syntax executable example-client main-is: Main.hs - other-modules: Prelude ExampleClient.Options + other-modules: ExampleClient.Options - build-depends: base >= 4.5 && < 4.20, + build-depends: base >= 4.8 && < 4.20, bytestring >= 0.9, directory >= 1.1, filepath >= 1.2, diff --git a/example-client/src/Prelude.hs b/example-client/src/Prelude.hs deleted file mode 100644 index 331ff6ec..00000000 --- a/example-client/src/Prelude.hs +++ /dev/null @@ -1,27 +0,0 @@ --- | Smooth over differences between various ghc versions by making older --- preludes look like 4.8.0 -{-# LANGUAGE PackageImports #-} -{-# LANGUAGE CPP #-} -module Prelude ( - module P -#if !MIN_VERSION_base(4,8,0) - , Applicative(..) - , Monoid(..) - , (<$>) - , (<$) - , traverse -#endif - ) where - -#if MIN_VERSION_base(4,8,0) -import "base" Prelude as P -#else -#if MIN_VERSION_base(4,6,0) -import "base" Prelude as P -#else -import "base" Prelude as P hiding (catch) -#endif -import Control.Applicative -import Data.Monoid -import Data.Traversable (traverse) -#endif diff --git a/hackage-repo-tool/hackage-repo-tool.cabal b/hackage-repo-tool/hackage-repo-tool.cabal index d2cc5e71..3692bd51 100644 --- a/hackage-repo-tool/hackage-repo-tool.cabal +++ b/hackage-repo-tool/hackage-repo-tool.cabal @@ -65,11 +65,10 @@ executable hackage-repo-tool Hackage.Security.RepoTool.Layout.Keys Hackage.Security.RepoTool.Paths Hackage.Security.RepoTool.Util.IO - Prelude -- For boot libraries we try to accomodate the versions bundled with -- the respective GHC release - build-depends: base >= 4.5 && < 4.20, + build-depends: base >= 4.8 && < 4.20, bytestring >= 0.9 && < 0.13, directory >= 1.1 && < 1.4, filepath >= 1.3 && < 1.5, diff --git a/hackage-repo-tool/src/Prelude.hs b/hackage-repo-tool/src/Prelude.hs deleted file mode 100644 index 331ff6ec..00000000 --- a/hackage-repo-tool/src/Prelude.hs +++ /dev/null @@ -1,27 +0,0 @@ --- | Smooth over differences between various ghc versions by making older --- preludes look like 4.8.0 -{-# LANGUAGE PackageImports #-} -{-# LANGUAGE CPP #-} -module Prelude ( - module P -#if !MIN_VERSION_base(4,8,0) - , Applicative(..) - , Monoid(..) - , (<$>) - , (<$) - , traverse -#endif - ) where - -#if MIN_VERSION_base(4,8,0) -import "base" Prelude as P -#else -#if MIN_VERSION_base(4,6,0) -import "base" Prelude as P -#else -import "base" Prelude as P hiding (catch) -#endif -import Control.Applicative -import Data.Monoid -import Data.Traversable (traverse) -#endif diff --git a/hackage-root-tool/hackage-root-tool.cabal b/hackage-root-tool/hackage-root-tool.cabal index 11c6b689..4e40c416 100644 --- a/hackage-root-tool/hackage-root-tool.cabal +++ b/hackage-root-tool/hackage-root-tool.cabal @@ -39,7 +39,7 @@ source-repository head executable hackage-root-tool main-is: Main.hs - build-depends: base >= 4.4 && < 5, + build-depends: base >= 4.8 && < 5, filepath >= 1.2 && < 1.5, optparse-applicative >= 0.11 && < 0.18, hackage-security >= 0.5 && < 0.7 diff --git a/hackage-security-HTTP/hackage-security-HTTP.cabal b/hackage-security-HTTP/hackage-security-HTTP.cabal index 127d9d33..407dc543 100644 --- a/hackage-security-HTTP/hackage-security-HTTP.cabal +++ b/hackage-security-HTTP/hackage-security-HTTP.cabal @@ -44,7 +44,7 @@ flag use-network-uri library exposed-modules: Hackage.Security.Client.Repository.HttpLib.HTTP - build-depends: base >= 4.5 && < 4.20, + build-depends: base >= 4.8 && < 4.20, bytestring >= 0.9 && < 0.13, HTTP >= 4000.2.19 && < 4000.5, mtl >= 2.1 && < 2.4, diff --git a/hackage-security-curl/hackage-security-curl.cabal b/hackage-security-curl/hackage-security-curl.cabal index 4e72ca16..8eb8ad60 100644 --- a/hackage-security-curl/hackage-security-curl.cabal +++ b/hackage-security-curl/hackage-security-curl.cabal @@ -35,7 +35,7 @@ flag use-network-uri library exposed-modules: Hackage.Security.Client.Repository.HttpLib.Curl - build-depends: base >= 4.5 && < 4.20, + build-depends: base >= 4.8 && < 4.20, bytestring >= 0.9, process >= 1.1, hackage-security diff --git a/hackage-security-http-client/hackage-security-http-client.cabal b/hackage-security-http-client/hackage-security-http-client.cabal index bdf0e8bc..79ea6372 100644 --- a/hackage-security-http-client/hackage-security-http-client.cabal +++ b/hackage-security-http-client/hackage-security-http-client.cabal @@ -34,7 +34,7 @@ flag use-network-uri library exposed-modules: Hackage.Security.Client.Repository.HttpLib.HttpClient - build-depends: base >= 4.5 && < 4.20, + build-depends: base >= 4.8 && < 4.20, bytestring >= 0.9, http-client >= 0.4 && < 0.8, http-types >= 0.8, diff --git a/hackage-security/hackage-security.cabal b/hackage-security/hackage-security.cabal index d1e8f15e..b76fe1cf 100644 --- a/hackage-security/hackage-security.cabal +++ b/hackage-security/hackage-security.cabal @@ -110,8 +110,7 @@ library Hackage.Security.Util.Lens Hackage.Security.Util.Stack Hackage.Security.Util.TypedEmbedded - MyPrelude - -- We support ghc 7.4 (bundled with Cabal 1.14) and up + build-depends: base >= 4.8 && < 4.20, -- PatternSynonyms are only available since GHC 7.8 (base 4.7) base16-bytestring >= 0.1.1 && < 1.1, diff --git a/hackage-security/src/Hackage/Security/Client.hs b/hackage-security/src/Hackage/Security/Client.hs index f8542556..5ccf46cb 100644 --- a/hackage-security/src/Hackage/Security/Client.hs +++ b/hackage-security/src/Hackage/Security/Client.hs @@ -41,7 +41,7 @@ module Hackage.Security.Client ( , LocalFileCorrupted(..) ) where -import MyPrelude hiding (log) +import Prelude hiding (log) import Control.Arrow (first) import Control.Exception import Control.Monad diff --git a/hackage-security/src/Hackage/Security/Client/Formats.hs b/hackage-security/src/Hackage/Security/Client/Formats.hs index 296aae78..58d5c0c3 100644 --- a/hackage-security/src/Hackage/Security/Client/Formats.hs +++ b/hackage-security/src/Hackage/Security/Client/Formats.hs @@ -17,7 +17,7 @@ module Hackage.Security.Client.Formats ( , formatsLookup ) where -import MyPrelude +import Prelude import Hackage.Security.Util.Stack import Hackage.Security.Util.TypedEmbedded diff --git a/hackage-security/src/Hackage/Security/Client/Repository.hs b/hackage-security/src/Hackage/Security/Client/Repository.hs index c516dac5..395c2458 100644 --- a/hackage-security/src/Hackage/Security/Client/Repository.hs +++ b/hackage-security/src/Hackage/Security/Client/Repository.hs @@ -30,7 +30,7 @@ module Hackage.Security.Client.Repository ( , mustCache ) where -import MyPrelude +import Prelude import Control.Exception import Data.Typeable (Typeable) import qualified Codec.Archive.Tar.Index as Tar diff --git a/hackage-security/src/Hackage/Security/Client/Repository/Cache.hs b/hackage-security/src/Hackage/Security/Client/Repository/Cache.hs index f1e99f64..4945b94b 100644 --- a/hackage-security/src/Hackage/Security/Client/Repository/Cache.hs +++ b/hackage-security/src/Hackage/Security/Client/Repository/Cache.hs @@ -15,7 +15,7 @@ module Hackage.Security.Client.Repository.Cache ( , lockCacheWithLogger ) where -import MyPrelude +import Prelude import Control.Exception import Control.Monad import Control.Monad.IO.Class diff --git a/hackage-security/src/Hackage/Security/Client/Repository/HttpLib.hs b/hackage-security/src/Hackage/Security/Client/Repository/HttpLib.hs index 29b6d406..6af1df02 100644 --- a/hackage-security/src/Hackage/Security/Client/Repository/HttpLib.hs +++ b/hackage-security/src/Hackage/Security/Client/Repository/HttpLib.hs @@ -11,7 +11,7 @@ module Hackage.Security.Client.Repository.HttpLib ( , bodyReaderFromBS ) where -import MyPrelude +import Prelude import Data.IORef import Network.URI hiding (uriPath, path) import qualified Data.ByteString as BS diff --git a/hackage-security/src/Hackage/Security/Client/Repository/Local.hs b/hackage-security/src/Hackage/Security/Client/Repository/Local.hs index fb014364..4f56f849 100644 --- a/hackage-security/src/Hackage/Security/Client/Repository/Local.hs +++ b/hackage-security/src/Hackage/Security/Client/Repository/Local.hs @@ -5,7 +5,7 @@ module Hackage.Security.Client.Repository.Local ( , withRepository ) where -import MyPrelude +import Prelude import Hackage.Security.Client.Formats import Hackage.Security.Client.Repository import Hackage.Security.Client.Repository.Cache diff --git a/hackage-security/src/Hackage/Security/Client/Repository/Remote.hs b/hackage-security/src/Hackage/Security/Client/Repository/Remote.hs index 1d601861..9917c0c1 100644 --- a/hackage-security/src/Hackage/Security/Client/Repository/Remote.hs +++ b/hackage-security/src/Hackage/Security/Client/Repository/Remote.hs @@ -27,7 +27,7 @@ module Hackage.Security.Client.Repository.Remote ( , fileSizeWithinBounds ) where -import MyPrelude +import Prelude import Control.Concurrent import Control.Exception import Control.Monad (when, unless) @@ -687,4 +687,3 @@ verifyRemoteFile remoteTemp trustedInfo = do BS.L.take (fromIntegral deltaSeek) existing , temp ] - diff --git a/hackage-security/src/Hackage/Security/Client/Verify.hs b/hackage-security/src/Hackage/Security/Client/Verify.hs index eab0c653..28b8d5f9 100644 --- a/hackage-security/src/Hackage/Security/Client/Verify.hs +++ b/hackage-security/src/Hackage/Security/Client/Verify.hs @@ -10,7 +10,7 @@ module Hackage.Security.Client.Verify ( , liftIO ) where -import MyPrelude +import Prelude import Control.Exception import Control.Monad (join, void) import Control.Monad.IO.Class (MonadIO, liftIO) diff --git a/hackage-security/src/Hackage/Security/JSON.hs b/hackage-security/src/Hackage/Security/JSON.hs index 23d48d37..f9c6d29e 100644 --- a/hackage-security/src/Hackage/Security/JSON.hs +++ b/hackage-security/src/Hackage/Security/JSON.hs @@ -38,7 +38,7 @@ module Hackage.Security.JSON ( , module Hackage.Security.Util.JSON ) where -import MyPrelude +import Prelude import Control.Arrow (first, second) import Control.Exception import Control.Monad (unless, liftM) diff --git a/hackage-security/src/Hackage/Security/Key.hs b/hackage-security/src/Hackage/Security/Key.hs index 81628812..0c1528a0 100644 --- a/hackage-security/src/Hackage/Security/Key.hs +++ b/hackage-security/src/Hackage/Security/Key.hs @@ -25,7 +25,7 @@ module Hackage.Security.Key ( , verify ) where -import MyPrelude +import Prelude import Control.Monad import Data.Functor.Identity import Data.Typeable (Typeable) diff --git a/hackage-security/src/Hackage/Security/Key/Env.hs b/hackage-security/src/Hackage/Security/Key/Env.hs index ca99062d..1d41953c 100644 --- a/hackage-security/src/Hackage/Security/Key/Env.hs +++ b/hackage-security/src/Hackage/Security/Key/Env.hs @@ -12,7 +12,7 @@ module Hackage.Security.Key.Env ( , union ) where -import MyPrelude hiding (lookup, null) +import Prelude hiding (lookup, null) import Control.Monad import Data.Map (Map) import qualified Data.Map as Map diff --git a/hackage-security/src/Hackage/Security/TUF/Common.hs b/hackage-security/src/Hackage/Security/TUF/Common.hs index d2f59fed..43a568c4 100644 --- a/hackage-security/src/Hackage/Security/TUF/Common.hs +++ b/hackage-security/src/Hackage/Security/TUF/Common.hs @@ -6,7 +6,7 @@ module Hackage.Security.TUF.Common ( , KeyThreshold(..) ) where -import MyPrelude +import Prelude import Hackage.Security.JSON {------------------------------------------------------------------------------- diff --git a/hackage-security/src/Hackage/Security/TUF/FileInfo.hs b/hackage-security/src/Hackage/Security/TUF/FileInfo.hs index de8235d0..354eaa74 100644 --- a/hackage-security/src/Hackage/Security/TUF/FileInfo.hs +++ b/hackage-security/src/Hackage/Security/TUF/FileInfo.hs @@ -13,7 +13,7 @@ module Hackage.Security.TUF.FileInfo ( , Int54 ) where -import MyPrelude hiding (lookup) +import Prelude hiding (lookup) import Data.Map (Map) import qualified Crypto.Hash.SHA256 as SHA256 import qualified Data.Map as Map diff --git a/hackage-security/src/Hackage/Security/TUF/FileMap.hs b/hackage-security/src/Hackage/Security/TUF/FileMap.hs index c57411e4..4d84189b 100644 --- a/hackage-security/src/Hackage/Security/TUF/FileMap.hs +++ b/hackage-security/src/Hackage/Security/TUF/FileMap.hs @@ -18,7 +18,7 @@ module Hackage.Security.TUF.FileMap ( , fileMapChanges ) where -import MyPrelude hiding (lookup) +import Prelude hiding (lookup) import Control.Arrow (second) import Data.Map (Map) import qualified Data.Map as Map diff --git a/hackage-security/src/Hackage/Security/TUF/Header.hs b/hackage-security/src/Hackage/Security/TUF/Header.hs index a1e8c86f..822c5c81 100644 --- a/hackage-security/src/Hackage/Security/TUF/Header.hs +++ b/hackage-security/src/Hackage/Security/TUF/Header.hs @@ -12,7 +12,7 @@ module Hackage.Security.TUF.Header ( , versionIncrement ) where -import MyPrelude +import Prelude import Data.Time import Data.Typeable (Typeable) diff --git a/hackage-security/src/Hackage/Security/TUF/Layout/Cache.hs b/hackage-security/src/Hackage/Security/TUF/Layout/Cache.hs index 6280ffc7..ba2baeae 100644 --- a/hackage-security/src/Hackage/Security/TUF/Layout/Cache.hs +++ b/hackage-security/src/Hackage/Security/TUF/Layout/Cache.hs @@ -4,7 +4,7 @@ module Hackage.Security.TUF.Layout.Cache ( , cabalCacheLayout ) where -import MyPrelude +import Prelude import Hackage.Security.TUF.Paths import Hackage.Security.Util.Path diff --git a/hackage-security/src/Hackage/Security/TUF/Layout/Index.hs b/hackage-security/src/Hackage/Security/TUF/Layout/Index.hs index e7cf0975..eaef6501 100644 --- a/hackage-security/src/Hackage/Security/TUF/Layout/Index.hs +++ b/hackage-security/src/Hackage/Security/TUF/Layout/Index.hs @@ -9,7 +9,7 @@ module Hackage.Security.TUF.Layout.Index ( , indexLayoutPkgPrefs ) where -import MyPrelude +import Prelude import Distribution.Package import Distribution.Text diff --git a/hackage-security/src/Hackage/Security/TUF/Layout/Repo.hs b/hackage-security/src/Hackage/Security/TUF/Layout/Repo.hs index da70c1ee..8df3bfae 100644 --- a/hackage-security/src/Hackage/Security/TUF/Layout/Repo.hs +++ b/hackage-security/src/Hackage/Security/TUF/Layout/Repo.hs @@ -5,7 +5,7 @@ module Hackage.Security.TUF.Layout.Repo ( , cabalLocalRepoLayout ) where -import MyPrelude +import Prelude import Distribution.Package import Distribution.Text diff --git a/hackage-security/src/Hackage/Security/TUF/Mirrors.hs b/hackage-security/src/Hackage/Security/TUF/Mirrors.hs index 0944bedb..bdba3377 100644 --- a/hackage-security/src/Hackage/Security/TUF/Mirrors.hs +++ b/hackage-security/src/Hackage/Security/TUF/Mirrors.hs @@ -9,7 +9,7 @@ module Hackage.Security.TUF.Mirrors ( , describeMirror ) where -import MyPrelude +import Prelude import Control.Monad.Except import Network.URI diff --git a/hackage-security/src/Hackage/Security/TUF/Paths.hs b/hackage-security/src/Hackage/Security/TUF/Paths.hs index 4a6f6a1c..5b2131c8 100644 --- a/hackage-security/src/Hackage/Security/TUF/Paths.hs +++ b/hackage-security/src/Hackage/Security/TUF/Paths.hs @@ -14,7 +14,7 @@ module Hackage.Security.TUF.Paths ( , anchorCachePath ) where -import MyPrelude +import Prelude import Hackage.Security.Util.Path import Hackage.Security.Util.Pretty diff --git a/hackage-security/src/Hackage/Security/TUF/Patterns.hs b/hackage-security/src/Hackage/Security/TUF/Patterns.hs index 01c6ac18..6f89bdba 100644 --- a/hackage-security/src/Hackage/Security/TUF/Patterns.hs +++ b/hackage-security/src/Hackage/Security/TUF/Patterns.hs @@ -26,7 +26,7 @@ module Hackage.Security.TUF.Patterns ( , qqd ) where -import MyPrelude +import Prelude import Control.Monad (guard) import Language.Haskell.TH (Q, Exp) import System.FilePath.Posix diff --git a/hackage-security/src/Hackage/Security/TUF/Root.hs b/hackage-security/src/Hackage/Security/TUF/Root.hs index 33a4a520..502ad6cf 100644 --- a/hackage-security/src/Hackage/Security/TUF/Root.hs +++ b/hackage-security/src/Hackage/Security/TUF/Root.hs @@ -6,7 +6,7 @@ module Hackage.Security.TUF.Root ( , RoleSpec(..) ) where -import MyPrelude +import Prelude import Hackage.Security.JSON import Hackage.Security.Key import Hackage.Security.Key.Env (KeyEnv) diff --git a/hackage-security/src/Hackage/Security/TUF/Signed.hs b/hackage-security/src/Hackage/Security/TUF/Signed.hs index 98fe963d..8b262230 100644 --- a/hackage-security/src/Hackage/Security/TUF/Signed.hs +++ b/hackage-security/src/Hackage/Security/TUF/Signed.hs @@ -27,7 +27,7 @@ module Hackage.Security.TUF.Signed ( , toPreSignatures ) where -import MyPrelude +import Prelude import Control.Monad import Data.Functor.Identity import qualified Data.ByteString as BS diff --git a/hackage-security/src/Hackage/Security/TUF/Snapshot.hs b/hackage-security/src/Hackage/Security/TUF/Snapshot.hs index 250dc920..4455d1b5 100644 --- a/hackage-security/src/Hackage/Security/TUF/Snapshot.hs +++ b/hackage-security/src/Hackage/Security/TUF/Snapshot.hs @@ -3,7 +3,7 @@ module Hackage.Security.TUF.Snapshot ( Snapshot(..) ) where -import MyPrelude +import Prelude import Control.Monad.Except import Control.Monad.Reader diff --git a/hackage-security/src/Hackage/Security/TUF/Targets.hs b/hackage-security/src/Hackage/Security/TUF/Targets.hs index e3585ad8..5db5ff62 100644 --- a/hackage-security/src/Hackage/Security/TUF/Targets.hs +++ b/hackage-security/src/Hackage/Security/TUF/Targets.hs @@ -8,7 +8,7 @@ module Hackage.Security.TUF.Targets ( , targetsLookup ) where -import MyPrelude +import Prelude import Hackage.Security.JSON import Hackage.Security.Key import Hackage.Security.Key.Env (KeyEnv) diff --git a/hackage-security/src/Hackage/Security/TUF/Timestamp.hs b/hackage-security/src/Hackage/Security/TUF/Timestamp.hs index 2a192539..574f57ed 100644 --- a/hackage-security/src/Hackage/Security/TUF/Timestamp.hs +++ b/hackage-security/src/Hackage/Security/TUF/Timestamp.hs @@ -3,7 +3,7 @@ module Hackage.Security.TUF.Timestamp ( Timestamp(..) ) where -import MyPrelude +import Prelude import Control.Monad.Except import Control.Monad.Reader diff --git a/hackage-security/src/Hackage/Security/Trusted.hs b/hackage-security/src/Hackage/Security/Trusted.hs index 7b797ee2..3b2060dc 100644 --- a/hackage-security/src/Hackage/Security/Trusted.hs +++ b/hackage-security/src/Hackage/Security/Trusted.hs @@ -12,7 +12,7 @@ module Hackage.Security.Trusted ( , trustedFileInfoEqual ) where -import MyPrelude +import Prelude import Data.Function (on) import Data.Time import Hackage.Security.TUF diff --git a/hackage-security/src/Hackage/Security/Trusted/TCB.hs b/hackage-security/src/Hackage/Security/Trusted/TCB.hs index 1e1baad8..2629ac82 100644 --- a/hackage-security/src/Hackage/Security/Trusted/TCB.hs +++ b/hackage-security/src/Hackage/Security/Trusted/TCB.hs @@ -26,7 +26,7 @@ module Hackage.Security.Trusted.TCB ( #endif ) where -import MyPrelude +import Prelude import Control.Exception import Control.Monad (when, unless) import Control.Monad.Except (Except, runExcept, throwError) diff --git a/hackage-security/src/Hackage/Security/Util/Base64.hs b/hackage-security/src/Hackage/Security/Util/Base64.hs index 8cb44c2e..78a7a6b8 100644 --- a/hackage-security/src/Hackage/Security/Util/Base64.hs +++ b/hackage-security/src/Hackage/Security/Util/Base64.hs @@ -4,7 +4,7 @@ module Hackage.Security.Util.Base64 ( , toByteString ) where -import MyPrelude +import Prelude import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as C8 -- only called on B64-enc strings import qualified Data.ByteString.Base64 as B64 diff --git a/hackage-security/src/Hackage/Security/Util/Checked.hs b/hackage-security/src/Hackage/Security/Util/Checked.hs index b3671475..b8c14d7b 100644 --- a/hackage-security/src/Hackage/Security/Util/Checked.hs +++ b/hackage-security/src/Hackage/Security/Util/Checked.hs @@ -25,7 +25,7 @@ module Hackage.Security.Util.Checked ( , internalError ) where -import MyPrelude +import Prelude import Control.Exception (Exception, IOException) import qualified Control.Exception as Base import Data.Typeable (Typeable) diff --git a/hackage-security/src/Hackage/Security/Util/Exit.hs b/hackage-security/src/Hackage/Security/Util/Exit.hs index 374389c7..92808326 100644 --- a/hackage-security/src/Hackage/Security/Util/Exit.hs +++ b/hackage-security/src/Hackage/Security/Util/Exit.hs @@ -1,6 +1,6 @@ module Hackage.Security.Util.Exit where -import MyPrelude +import Prelude import Control.Monad (liftM) import Control.Monad.Except (ExceptT, runExceptT, throwError) diff --git a/hackage-security/src/Hackage/Security/Util/IO.hs b/hackage-security/src/Hackage/Security/Util/IO.hs index faf6e72d..02fa7fc8 100644 --- a/hackage-security/src/Hackage/Security/Util/IO.hs +++ b/hackage-security/src/Hackage/Security/Util/IO.hs @@ -9,7 +9,7 @@ module Hackage.Security.Util.IO ( , timedIO ) where -import MyPrelude +import Prelude import Control.Concurrent (threadDelay) import Control.Exception import Data.Time diff --git a/hackage-security/src/Hackage/Security/Util/JSON.hs b/hackage-security/src/Hackage/Security/Util/JSON.hs index 22720ea4..fd8ba5b5 100644 --- a/hackage-security/src/Hackage/Security/Util/JSON.hs +++ b/hackage-security/src/Hackage/Security/Util/JSON.hs @@ -23,7 +23,7 @@ module Hackage.Security.Util.JSON ( , Int54 ) where -import MyPrelude +import Prelude import Control.Monad (liftM) import Data.Maybe (catMaybes) import Data.Map (Map) diff --git a/hackage-security/src/Hackage/Security/Util/Lens.hs b/hackage-security/src/Hackage/Security/Util/Lens.hs index 4def266e..c468dac6 100644 --- a/hackage-security/src/Hackage/Security/Util/Lens.hs +++ b/hackage-security/src/Hackage/Security/Util/Lens.hs @@ -14,7 +14,7 @@ module Hackage.Security.Util.Lens ( , set ) where -import MyPrelude +import Prelude import Control.Applicative import Data.Functor.Identity diff --git a/hackage-security/src/Hackage/Security/Util/Path.hs b/hackage-security/src/Hackage/Security/Util/Path.hs index 0cd14dfa..3fa86cff 100644 --- a/hackage-security/src/Hackage/Security/Util/Path.hs +++ b/hackage-security/src/Hackage/Security/Util/Path.hs @@ -83,7 +83,7 @@ module Hackage.Security.Util.Path ( , IO.hSeek ) where -import MyPrelude +import Prelude import Control.Monad import Data.List (isPrefixOf) import System.IO (IOMode(..), BufferMode(..), Handle, SeekMode(..)) diff --git a/hackage-security/src/Hackage/Security/Util/Pretty.hs b/hackage-security/src/Hackage/Security/Util/Pretty.hs index 5505ba58..bc185510 100644 --- a/hackage-security/src/Hackage/Security/Util/Pretty.hs +++ b/hackage-security/src/Hackage/Security/Util/Pretty.hs @@ -3,7 +3,7 @@ module Hackage.Security.Util.Pretty ( Pretty(..) ) where -import MyPrelude +import Prelude -- | Produce a human-readable string class Pretty a where diff --git a/hackage-security/src/Hackage/Security/Util/Some.hs b/hackage-security/src/Hackage/Security/Util/Some.hs index d1ee7893..edb467fe 100644 --- a/hackage-security/src/Hackage/Security/Util/Some.hs +++ b/hackage-security/src/Hackage/Security/Util/Some.hs @@ -19,7 +19,7 @@ module Hackage.Security.Util.Some ( #endif ) where -import MyPrelude +import Prelude #if MIN_VERSION_base(4,7,0) import Data.Typeable (Typeable) #else diff --git a/hackage-security/src/Hackage/Security/Util/Stack.hs b/hackage-security/src/Hackage/Security/Util/Stack.hs index 6c3446d6..8d643f6d 100644 --- a/hackage-security/src/Hackage/Security/Util/Stack.hs +++ b/hackage-security/src/Hackage/Security/Util/Stack.hs @@ -3,7 +3,7 @@ module Hackage.Security.Util.Stack ( (:-)(..) ) where -import MyPrelude +import Prelude data h :- t = h :- t deriving (Eq, Show) diff --git a/hackage-security/src/Hackage/Security/Util/TypedEmbedded.hs b/hackage-security/src/Hackage/Security/Util/TypedEmbedded.hs index 4bdb356d..bbdca6a5 100644 --- a/hackage-security/src/Hackage/Security/Util/TypedEmbedded.hs +++ b/hackage-security/src/Hackage/Security/Util/TypedEmbedded.hs @@ -7,7 +7,7 @@ module Hackage.Security.Util.TypedEmbedded ( , AsType(..) ) where -import MyPrelude +import Prelude -- | Type equality proofs -- diff --git a/hackage-security/src/MyPrelude.hs b/hackage-security/src/MyPrelude.hs deleted file mode 100644 index 7e4ef99b..00000000 --- a/hackage-security/src/MyPrelude.hs +++ /dev/null @@ -1,31 +0,0 @@ --- | Smooth over differences between various ghc versions by making older --- preludes look like 4.8.0 -{-# LANGUAGE CPP #-} -module MyPrelude ( - module P -#if !MIN_VERSION_base(4,8,0) - , Applicative(..) - , Monoid(..) - , (<$>) - , (<$) - , Traversable(traverse) - , displayException -#endif - ) where - -#if MIN_VERSION_base(4,8,0) -import Prelude as P -#else -#if MIN_VERSION_base(4,6,0) -import Prelude as P -#else -import Prelude as P hiding (catch) -#endif -import Control.Applicative -import Control.Exception (Exception) -import Data.Monoid -import Data.Traversable (Traversable(traverse)) - -displayException :: Exception e => e -> String -displayException = show -#endif diff --git a/hackage-security/src/Text/JSON/Canonical.hs b/hackage-security/src/Text/JSON/Canonical.hs index 9c05663c..6e7feb8d 100644 --- a/hackage-security/src/Text/JSON/Canonical.hs +++ b/hackage-security/src/Text/JSON/Canonical.hs @@ -30,7 +30,7 @@ module Text.JSON.Canonical , prettyCanonicalJSON ) where -import MyPrelude +import Prelude import Text.ParserCombinators.Parsec ( CharParser, (<|>), (), many, between, sepBy , satisfy, char, string, digit, spaces @@ -353,4 +353,3 @@ punctuate' l p r (x:xs) = l <+> x : go xs go [] = [] go [y] = [p <+> y, r] go (y:ys) = (p <+> y) : go ys - diff --git a/precompute-fileinfo/precompute-fileinfo.cabal b/precompute-fileinfo/precompute-fileinfo.cabal index e36691e0..4a1c689b 100644 --- a/precompute-fileinfo/precompute-fileinfo.cabal +++ b/precompute-fileinfo/precompute-fileinfo.cabal @@ -21,7 +21,7 @@ tested-with: executable precompute-fileinfo main-is: Main.hs - build-depends: base >= 4.4, + build-depends: base >= 4.8, bytestring >= 0.9, containers >= 0.4, deepseq >= 1.3,