Skip to content

Commit 745b294

Browse files
hasufellMikolaj
authored andcommitted
Fix running 'cabal repl hackage-security' wrt #262
1 parent 398f001 commit 745b294

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+49
-10
lines changed

hackage-security/hackage-security.cabal

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ library
113113
Hackage.Security.Util.Lens
114114
Hackage.Security.Util.Stack
115115
Hackage.Security.Util.TypedEmbedded
116-
Prelude
116+
MyPrelude
117117
-- We support ghc 7.4 (bundled with Cabal 1.14) and up
118118
build-depends: base >= 4.5 && < 4.17,
119119
base16-bytestring >= 0.1.1 && < 1.1,
@@ -171,6 +171,7 @@ library
171171
KindSignatures
172172
MultiParamTypeClasses
173173
NamedFieldPuns
174+
NoImplicitPrelude
174175
NoMonomorphismRestriction
175176
RankNTypes
176177
RecordWildCards

hackage-security/src/Hackage/Security/Client.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module Hackage.Security.Client (
4141
, LocalFileCorrupted(..)
4242
) where
4343

44-
import Prelude hiding (log)
44+
import MyPrelude hiding (log)
4545
import Control.Arrow (first)
4646
import Control.Exception
4747
import Control.Monad

hackage-security/src/Hackage/Security/Client/Formats.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module Hackage.Security.Client.Formats (
1717
, formatsLookup
1818
) where
1919

20+
import MyPrelude
2021
import Hackage.Security.Util.Stack
2122
import Hackage.Security.Util.TypedEmbedded
2223

hackage-security/src/Hackage/Security/Client/Repository.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ module Hackage.Security.Client.Repository (
3030
, mustCache
3131
) where
3232

33+
import MyPrelude
3334
import Control.Exception
3435
import Data.Typeable (Typeable)
3536
import qualified Codec.Archive.Tar.Index as Tar

hackage-security/src/Hackage/Security/Client/Repository/Cache.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module Hackage.Security.Client.Repository.Cache (
1515
, lockCacheWithLogger
1616
) where
1717

18+
import MyPrelude
1819
import Control.Exception
1920
import Control.Monad
2021
import Control.Monad.IO.Class

hackage-security/src/Hackage/Security/Client/Repository/HttpLib.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module Hackage.Security.Client.Repository.HttpLib (
1111
, bodyReaderFromBS
1212
) where
1313

14+
import MyPrelude
1415
import Data.IORef
1516
import Network.URI hiding (uriPath, path)
1617
import qualified Data.ByteString as BS

hackage-security/src/Hackage/Security/Client/Repository/Local.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module Hackage.Security.Client.Repository.Local (
55
, withRepository
66
) where
77

8+
import MyPrelude
89
import Hackage.Security.Client.Formats
910
import Hackage.Security.Client.Repository
1011
import Hackage.Security.Client.Repository.Cache

hackage-security/src/Hackage/Security/Client/Repository/Remote.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ module Hackage.Security.Client.Repository.Remote (
2727
, fileSizeWithinBounds
2828
) where
2929

30+
import MyPrelude
3031
import Control.Concurrent
3132
import Control.Exception
3233
import Control.Monad.Cont

hackage-security/src/Hackage/Security/Client/Verify.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module Hackage.Security.Client.Verify (
1010
, liftIO
1111
) where
1212

13+
import MyPrelude
1314
import Control.Exception
1415
import Control.Monad.Reader
1516
import Data.IORef

hackage-security/src/Hackage/Security/JSON.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ module Hackage.Security.JSON (
3838
, module Hackage.Security.Util.JSON
3939
) where
4040

41+
import MyPrelude
4142
import Control.Arrow (first, second)
4243
import Control.Exception
4344
import Control.Monad.Except

hackage-security/src/Hackage/Security/Key.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module Hackage.Security.Key (
2525
, verify
2626
) where
2727

28+
import MyPrelude
2829
import Control.Monad
2930
import Data.Functor.Identity
3031
import Data.Typeable (Typeable)

hackage-security/src/Hackage/Security/Key/Env.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module Hackage.Security.Key.Env (
1212
, union
1313
) where
1414

15-
import Prelude hiding (lookup, null)
15+
import MyPrelude hiding (lookup, null)
1616
import Control.Monad
1717
import Data.Map (Map)
1818
import qualified Data.Map as Map

hackage-security/src/Hackage/Security/TUF/Common.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module Hackage.Security.TUF.Common (
66
, KeyThreshold(..)
77
) where
88

9+
import MyPrelude
910
import Hackage.Security.JSON
1011

1112
{-------------------------------------------------------------------------------

hackage-security/src/Hackage/Security/TUF/FileInfo.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module Hackage.Security.TUF.FileInfo (
1313
, Int54
1414
) where
1515

16-
import Prelude hiding (lookup)
16+
import MyPrelude hiding (lookup)
1717
import Data.Map (Map)
1818
import qualified Crypto.Hash.SHA256 as SHA256
1919
import qualified Data.Map as Map

hackage-security/src/Hackage/Security/TUF/FileMap.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module Hackage.Security.TUF.FileMap (
1818
, fileMapChanges
1919
) where
2020

21-
import Prelude hiding (lookup)
21+
import MyPrelude hiding (lookup)
2222
import Control.Arrow (second)
2323
import Data.Map (Map)
2424
import qualified Data.Map as Map

hackage-security/src/Hackage/Security/TUF/Header.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module Hackage.Security.TUF.Header (
1212
, versionIncrement
1313
) where
1414

15+
import MyPrelude
1516
import Data.Time
1617
import Data.Typeable (Typeable)
1718

hackage-security/src/Hackage/Security/TUF/Layout/Cache.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module Hackage.Security.TUF.Layout.Cache (
44
, cabalCacheLayout
55
) where
66

7+
import MyPrelude
78
import Hackage.Security.TUF.Paths
89
import Hackage.Security.Util.Path
910

hackage-security/src/Hackage/Security/TUF/Layout/Index.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module Hackage.Security.TUF.Layout.Index (
99
, indexLayoutPkgPrefs
1010
) where
1111

12+
import MyPrelude
1213
import Distribution.Package
1314
import Distribution.Text
1415

hackage-security/src/Hackage/Security/TUF/Layout/Repo.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module Hackage.Security.TUF.Layout.Repo (
55
, cabalLocalRepoLayout
66
) where
77

8+
import MyPrelude
89
import Distribution.Package
910
import Distribution.Text
1011

hackage-security/src/Hackage/Security/TUF/Mirrors.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module Hackage.Security.TUF.Mirrors (
99
, describeMirror
1010
) where
1111

12+
import MyPrelude
1213
import Control.Monad.Except
1314
import Network.URI
1415

hackage-security/src/Hackage/Security/TUF/Paths.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module Hackage.Security.TUF.Paths (
1414
, anchorCachePath
1515
) where
1616

17+
import MyPrelude
1718
import Hackage.Security.Util.Path
1819
import Hackage.Security.Util.Pretty
1920

hackage-security/src/Hackage/Security/TUF/Patterns.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module Hackage.Security.TUF.Patterns (
2626
, qqd
2727
) where
2828

29+
import MyPrelude
2930
import Control.Monad.Except
3031
import Language.Haskell.TH (Q, Exp)
3132
import System.FilePath.Posix

hackage-security/src/Hackage/Security/TUF/Root.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module Hackage.Security.TUF.Root (
66
, RoleSpec(..)
77
) where
88

9+
import MyPrelude
910
import Hackage.Security.JSON
1011
import Hackage.Security.Key
1112
import Hackage.Security.Key.Env (KeyEnv)

hackage-security/src/Hackage/Security/TUF/Signed.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ module Hackage.Security.TUF.Signed (
2727
, toPreSignatures
2828
) where
2929

30+
import MyPrelude
3031
import Control.Monad
3132
import Data.Functor.Identity
3233
import qualified Data.ByteString as BS

hackage-security/src/Hackage/Security/TUF/Snapshot.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module Hackage.Security.TUF.Snapshot (
33
Snapshot(..)
44
) where
55

6+
import MyPrelude
67
import Control.Monad.Except
78
import Control.Monad.Reader
89

hackage-security/src/Hackage/Security/TUF/Targets.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module Hackage.Security.TUF.Targets (
88
, targetsLookup
99
) where
1010

11+
import MyPrelude
1112
import Hackage.Security.JSON
1213
import Hackage.Security.Key
1314
import Hackage.Security.Key.Env (KeyEnv)

hackage-security/src/Hackage/Security/TUF/Timestamp.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module Hackage.Security.TUF.Timestamp (
33
Timestamp(..)
44
) where
55

6+
import MyPrelude
67
import Control.Monad.Except
78
import Control.Monad.Reader
89

hackage-security/src/Hackage/Security/Trusted.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module Hackage.Security.Trusted (
1212
, trustedFileInfoEqual
1313
) where
1414

15+
import MyPrelude
1516
import Data.Function (on)
1617
import Data.Time
1718
import Hackage.Security.TUF

hackage-security/src/Hackage/Security/Trusted/TCB.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module Hackage.Security.Trusted.TCB (
2626
#endif
2727
) where
2828

29+
import MyPrelude
2930
import Control.Exception
3031
import Control.Monad.Except
3132
import Data.Typeable

hackage-security/src/Hackage/Security/Util/Base64.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module Hackage.Security.Util.Base64 (
44
, toByteString
55
) where
66

7+
import MyPrelude
78
import Data.ByteString (ByteString)
89
import qualified Data.ByteString.Char8 as C8 -- only called on B64-enc strings
910
import qualified Data.ByteString.Base64 as B64

hackage-security/src/Hackage/Security/Util/Checked.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module Hackage.Security.Util.Checked (
2525
, internalError
2626
) where
2727

28+
import MyPrelude
2829
import Control.Exception (Exception, IOException)
2930
import qualified Control.Exception as Base
3031
import Data.Typeable (Typeable)

hackage-security/src/Hackage/Security/Util/Exit.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module Hackage.Security.Util.Exit where
22

3+
import MyPrelude
34
import Control.Monad.Except
45

56
{-------------------------------------------------------------------------------

hackage-security/src/Hackage/Security/Util/IO.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module Hackage.Security.Util.IO (
99
, timedIO
1010
) where
1111

12+
import MyPrelude
1213
import Control.Concurrent (threadDelay)
1314
import Control.Exception
1415
import Data.Time

hackage-security/src/Hackage/Security/Util/JSON.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ module Hackage.Security.Util.JSON (
2323
, Int54
2424
) where
2525

26+
import MyPrelude
2627
import Control.Monad (liftM)
2728
import Data.Maybe (catMaybes)
2829
import Data.Map (Map)

hackage-security/src/Hackage/Security/Util/Lens.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module Hackage.Security.Util.Lens (
1414
, set
1515
) where
1616

17+
import MyPrelude
1718
import Control.Applicative
1819
import Data.Functor.Identity
1920

hackage-security/src/Hackage/Security/Util/Path.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ module Hackage.Security.Util.Path (
8383
, IO.hSeek
8484
) where
8585

86+
import MyPrelude
8687
import Control.Monad
8788
import Data.List (isPrefixOf)
8889
import System.IO (IOMode(..), BufferMode(..), Handle, SeekMode(..))

hackage-security/src/Hackage/Security/Util/Pretty.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ module Hackage.Security.Util.Pretty (
33
Pretty(..)
44
) where
55

6+
import MyPrelude
7+
68
-- | Produce a human-readable string
79
class Pretty a where
810
pretty :: a -> String

hackage-security/src/Hackage/Security/Util/Some.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ module Hackage.Security.Util.Some (
1919
#endif
2020
) where
2121

22+
import MyPrelude
2223
#if MIN_VERSION_base(4,7,0)
2324
import Data.Typeable (Typeable)
2425
#else

hackage-security/src/Hackage/Security/Util/Stack.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ module Hackage.Security.Util.Stack (
33
(:-)(..)
44
) where
55

6+
import MyPrelude
7+
68
data h :- t = h :- t
79
deriving (Eq, Show)
810
infixr 5 :-

hackage-security/src/Hackage/Security/Util/TypedEmbedded.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ module Hackage.Security.Util.TypedEmbedded (
77
, AsType(..)
88
) where
99

10+
import MyPrelude
11+
1012
-- | Type equality proofs
1113
--
1214
-- This is a direct copy of "type-equality:Data.Type.Equality"; if we don't

hackage-security/src/Prelude.hs renamed to hackage-security/src/MyPrelude.hs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
-- | Smooth over differences between various ghc versions by making older
22
-- preludes look like 4.8.0
3-
{-# LANGUAGE PackageImports #-}
43
{-# LANGUAGE CPP #-}
5-
module Prelude (
4+
module MyPrelude (
65
module P
76
#if !MIN_VERSION_base(4,8,0)
87
, Applicative(..)
@@ -15,12 +14,12 @@ module Prelude (
1514
) where
1615

1716
#if MIN_VERSION_base(4,8,0)
18-
import "base" Prelude as P
17+
import Prelude as P
1918
#else
2019
#if MIN_VERSION_base(4,6,0)
21-
import "base" Prelude as P
20+
import Prelude as P
2221
#else
23-
import "base" Prelude as P hiding (catch)
22+
import Prelude as P hiding (catch)
2423
#endif
2524
import Control.Applicative
2625
import Control.Exception (Exception)

hackage-security/src/Text/JSON/Canonical.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ module Text.JSON.Canonical
3030
, prettyCanonicalJSON
3131
) where
3232

33+
import MyPrelude
3334
import Text.ParserCombinators.Parsec
3435
( CharParser, (<|>), (<?>), many, between, sepBy
3536
, satisfy, char, string, digit, spaces

0 commit comments

Comments
 (0)