Skip to content

Fix running 'cabal repl hackage-security' wrt #262 #263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion hackage-security/hackage-security.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ library
Hackage.Security.Util.Lens
Hackage.Security.Util.Stack
Hackage.Security.Util.TypedEmbedded
Prelude
MyPrelude
-- We support ghc 7.4 (bundled with Cabal 1.14) and up
build-depends: base >= 4.5 && < 4.17,
base16-bytestring >= 0.1.1 && < 1.1,
Expand Down Expand Up @@ -171,6 +171,7 @@ library
KindSignatures
MultiParamTypeClasses
NamedFieldPuns
NoImplicitPrelude
NoMonomorphismRestriction
RankNTypes
RecordWildCards
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 Prelude hiding (log)
import MyPrelude hiding (log)
import Control.Arrow (first)
import Control.Exception
import Control.Monad
Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/Client/Formats.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module Hackage.Security.Client.Formats (
, formatsLookup
) where

import MyPrelude
import Hackage.Security.Util.Stack
import Hackage.Security.Util.TypedEmbedded

Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/Client/Repository.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module Hackage.Security.Client.Repository (
, mustCache
) where

import MyPrelude
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,6 +15,7 @@ module Hackage.Security.Client.Repository.Cache (
, lockCacheWithLogger
) where

import MyPrelude
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,6 +11,7 @@ module Hackage.Security.Client.Repository.HttpLib (
, bodyReaderFromBS
) where

import MyPrelude
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,6 +5,7 @@ module Hackage.Security.Client.Repository.Local (
, withRepository
) where

import MyPrelude
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,6 +27,7 @@ module Hackage.Security.Client.Repository.Remote (
, fileSizeWithinBounds
) where

import MyPrelude
import Control.Concurrent
import Control.Exception
import Control.Monad.Cont
Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/Client/Verify.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module Hackage.Security.Client.Verify (
, liftIO
) where

import MyPrelude
import Control.Exception
import Control.Monad.Reader
import Data.IORef
Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/JSON.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module Hackage.Security.JSON (
, module Hackage.Security.Util.JSON
) where

import MyPrelude
import Control.Arrow (first, second)
import Control.Exception
import Control.Monad.Except
Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/Key.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module Hackage.Security.Key (
, verify
) where

import MyPrelude
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 Prelude hiding (lookup, null)
import MyPrelude hiding (lookup, null)
import Control.Monad
import Data.Map (Map)
import qualified Data.Map as Map
Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/TUF/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module Hackage.Security.TUF.Common (
, KeyThreshold(..)
) where

import MyPrelude
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 Prelude hiding (lookup)
import MyPrelude 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 Prelude hiding (lookup)
import MyPrelude hiding (lookup)
import Control.Arrow (second)
import Data.Map (Map)
import qualified Data.Map as Map
Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/TUF/Header.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module Hackage.Security.TUF.Header (
, versionIncrement
) where

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

Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/TUF/Layout/Cache.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Hackage.Security.TUF.Layout.Cache (
, cabalCacheLayout
) where

import MyPrelude
import Hackage.Security.TUF.Paths
import Hackage.Security.Util.Path

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

import MyPrelude
import Distribution.Package
import Distribution.Text

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

import MyPrelude
import Distribution.Package
import Distribution.Text

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

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

Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/TUF/Paths.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module Hackage.Security.TUF.Paths (
, anchorCachePath
) where

import MyPrelude
import Hackage.Security.Util.Path
import Hackage.Security.Util.Pretty

Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/TUF/Patterns.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module Hackage.Security.TUF.Patterns (
, qqd
) where

import MyPrelude
import Control.Monad.Except
import Language.Haskell.TH (Q, Exp)
import System.FilePath.Posix
Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/TUF/Root.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module Hackage.Security.TUF.Root (
, RoleSpec(..)
) where

import MyPrelude
import Hackage.Security.JSON
import Hackage.Security.Key
import Hackage.Security.Key.Env (KeyEnv)
Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/TUF/Signed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module Hackage.Security.TUF.Signed (
, toPreSignatures
) where

import MyPrelude
import Control.Monad
import Data.Functor.Identity
import qualified Data.ByteString as BS
Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/TUF/Snapshot.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module Hackage.Security.TUF.Snapshot (
Snapshot(..)
) where

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

Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/TUF/Targets.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module Hackage.Security.TUF.Targets (
, targetsLookup
) where

import MyPrelude
import Hackage.Security.JSON
import Hackage.Security.Key
import Hackage.Security.Key.Env (KeyEnv)
Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/TUF/Timestamp.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module Hackage.Security.TUF.Timestamp (
Timestamp(..)
) where

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

Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/Trusted.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module Hackage.Security.Trusted (
, trustedFileInfoEqual
) where

import MyPrelude
import Data.Function (on)
import Data.Time
import Hackage.Security.TUF
Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/Trusted/TCB.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module Hackage.Security.Trusted.TCB (
#endif
) where

import MyPrelude
import Control.Exception
import Control.Monad.Except
import Data.Typeable
Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/Util/Base64.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Hackage.Security.Util.Base64 (
, toByteString
) where

import MyPrelude
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
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/Util/Checked.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module Hackage.Security.Util.Checked (
, internalError
) where

import MyPrelude
import Control.Exception (Exception, IOException)
import qualified Control.Exception as Base
import Data.Typeable (Typeable)
Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/Util/Exit.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module Hackage.Security.Util.Exit where

import MyPrelude
import Control.Monad.Except

{-------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/Util/IO.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module Hackage.Security.Util.IO (
, timedIO
) where

import MyPrelude
import Control.Concurrent (threadDelay)
import Control.Exception
import Data.Time
Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/Util/JSON.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module Hackage.Security.Util.JSON (
, Int54
) where

import MyPrelude
import Control.Monad (liftM)
import Data.Maybe (catMaybes)
import Data.Map (Map)
Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/Util/Lens.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module Hackage.Security.Util.Lens (
, set
) where

import MyPrelude
import Control.Applicative
import Data.Functor.Identity

Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/Util/Path.hs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ module Hackage.Security.Util.Path (
, IO.hSeek
) where

import MyPrelude
import Control.Monad
import Data.List (isPrefixOf)
import System.IO (IOMode(..), BufferMode(..), Handle, SeekMode(..))
Expand Down
2 changes: 2 additions & 0 deletions hackage-security/src/Hackage/Security/Util/Pretty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ module Hackage.Security.Util.Pretty (
Pretty(..)
) where

import MyPrelude

-- | Produce a human-readable string
class Pretty a where
pretty :: a -> String
1 change: 1 addition & 0 deletions hackage-security/src/Hackage/Security/Util/Some.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module Hackage.Security.Util.Some (
#endif
) where

import MyPrelude
#if MIN_VERSION_base(4,7,0)
import Data.Typeable (Typeable)
#else
Expand Down
2 changes: 2 additions & 0 deletions hackage-security/src/Hackage/Security/Util/Stack.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ module Hackage.Security.Util.Stack (
(:-)(..)
) where

import MyPrelude

data h :- t = h :- t
deriving (Eq, Show)
infixr 5 :-
2 changes: 2 additions & 0 deletions hackage-security/src/Hackage/Security/Util/TypedEmbedded.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ module Hackage.Security.Util.TypedEmbedded (
, AsType(..)
) where

import MyPrelude

-- | Type equality proofs
--
-- This is a direct copy of "type-equality:Data.Type.Equality"; if we don't
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
-- | Smooth over differences between various ghc versions by making older
-- preludes look like 4.8.0
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE CPP #-}
module Prelude (
module MyPrelude (
module P
#if !MIN_VERSION_base(4,8,0)
, Applicative(..)
Expand All @@ -15,12 +14,12 @@ module Prelude (
) where

#if MIN_VERSION_base(4,8,0)
import "base" Prelude as P
import Prelude as P
#else
#if MIN_VERSION_base(4,6,0)
import "base" Prelude as P
import Prelude as P
#else
import "base" Prelude as P hiding (catch)
import Prelude as P hiding (catch)
#endif
import Control.Applicative
import Control.Exception (Exception)
Expand Down
1 change: 1 addition & 0 deletions hackage-security/src/Text/JSON/Canonical.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module Text.JSON.Canonical
, prettyCanonicalJSON
) where

import MyPrelude
import Text.ParserCombinators.Parsec
( CharParser, (<|>), (<?>), many, between, sepBy
, satisfy, char, string, digit, spaces
Expand Down