Skip to content

Commit

Permalink
Require base >= 4.8, drop custom preludes
Browse files Browse the repository at this point in the history
The custom preludes simulated the Prelude of base-4.8, which is now
present always; thus, they are obsolete.
  • Loading branch information
andreasabel committed Jan 9, 2024
1 parent b306678 commit fd748e2
Show file tree
Hide file tree
Showing 51 changed files with 49 additions and 138 deletions.
4 changes: 2 additions & 2 deletions example-client/example-client.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
27 changes: 0 additions & 27 deletions example-client/src/Prelude.hs

This file was deleted.

3 changes: 1 addition & 2 deletions hackage-repo-tool/hackage-repo-tool.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
27 changes: 0 additions & 27 deletions hackage-repo-tool/src/Prelude.hs

This file was deleted.

2 changes: 1 addition & 1 deletion hackage-root-tool/hackage-root-tool.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hackage-security-HTTP/hackage-security-HTTP.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion hackage-security-curl/hackage-security-curl.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions hackage-security/hackage-security.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/Client.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/Client/Formats.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/Client/Repository.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -687,4 +687,3 @@ verifyRemoteFile remoteTemp trustedInfo = do
BS.L.take (fromIntegral deltaSeek) existing
, temp
]

2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/Client/Verify.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/JSON.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/Key.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/Key/Env.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/TUF/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Hackage.Security.TUF.Common (
, KeyThreshold(..)
) where

import MyPrelude
import Prelude
import Hackage.Security.JSON

{-------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/TUF/FileInfo.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/TUF/FileMap.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/TUF/Header.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module Hackage.Security.TUF.Header (
, versionIncrement
) where

import MyPrelude
import Prelude
import Data.Time
import Data.Typeable (Typeable)

Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/TUF/Layout/Cache.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/TUF/Layout/Index.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Hackage.Security.TUF.Layout.Index (
, indexLayoutPkgPrefs
) where

import MyPrelude
import Prelude
import Distribution.Package
import Distribution.Text

Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/TUF/Layout/Repo.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Hackage.Security.TUF.Layout.Repo (
, cabalLocalRepoLayout
) where

import MyPrelude
import Prelude
import Distribution.Package
import Distribution.Text

Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/TUF/Mirrors.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Hackage.Security.TUF.Mirrors (
, describeMirror
) where

import MyPrelude
import Prelude
import Control.Monad.Except
import Network.URI

Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/TUF/Paths.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/TUF/Patterns.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/TUF/Root.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/TUF/Signed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/TUF/Snapshot.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Hackage.Security.TUF.Snapshot (
Snapshot(..)
) where

import MyPrelude
import Prelude
import Control.Monad.Except
import Control.Monad.Reader

Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/TUF/Targets.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/TUF/Timestamp.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Hackage.Security.TUF.Timestamp (
Timestamp(..)
) where

import MyPrelude
import Prelude
import Control.Monad.Except
import Control.Monad.Reader

Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/Trusted.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/Trusted/TCB.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion hackage-security/src/Hackage/Security/Util/Base64.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit fd748e2

Please sign in to comment.