Skip to content

Commit 493cdd4

Browse files
committed
Satisfy build and lint
1 parent 6c19b98 commit 493cdd4

File tree

7 files changed

+14
-15
lines changed

7 files changed

+14
-15
lines changed

Cabal-tests/tests/UnitTests/Distribution/PackageDescription/Check.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module UnitTests.Distribution.PackageDescription.Check (tests) where
22

3-
import Distribution.Compat.Prelude.Internal
3+
import Distribution.Compat.Prelude
44
import Prelude ()
55

66
import Distribution.PackageDescription.Check

Cabal/src/Distribution/Simple/Configure.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,9 +696,9 @@ computeLocalBuildConfig cfg comp programDb = do
696696

697697
data PackageInfo = PackageInfo
698698
{ internalPackageSet :: Set LibraryName
699-
, promisedDepsSet :: Map (PackageName, ComponentName) ComponentId
699+
, promisedDepsSet :: Map (PackageName, ComponentName, Maybe PrivateAlias) ComponentId
700700
, installedPackageSet :: InstalledPackageIndex
701-
, requiredDepsMap :: Map (PackageName, ComponentName) InstalledPackageInfo
701+
, requiredDepsMap :: Map (PackageName, ComponentName, Maybe PrivateAlias) InstalledPackageInfo
702702
}
703703

704704
configurePackage

Cabal/src/Distribution/Types/LocalBuildInfo.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ pattern LocalBuildInfo
151151
-> Maybe FilePath
152152
-> Graph ComponentLocalBuildInfo
153153
-> Map ComponentName [ComponentLocalBuildInfo]
154-
-> Map (PackageName, ComponentName) ComponentId
154+
-> Map (PackageName, ComponentName, Maybe PrivateAlias) ComponentId
155155
-> InstalledPackageIndex
156156
-> PackageDescription
157157
-> ProgramDb

cabal-install/src/Distribution/Client/ProjectPlanning/SetupPolicy.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ instance IsNode NonSetupLibDepSolverPlanPackage where
176176
nodeKey spkg
177177

178178
nodeNeighbors (NonSetupLibDepSolverPlanPackage spkg) =
179-
ordNub $ (map fst $ CD.nonSetupDeps (resolverPackageLibDeps spkg))
179+
ordNub $ map fst (CD.nonSetupDeps (resolverPackageLibDeps spkg))
180180

181181
-- | Work out which version of the Cabal we will be using to talk to the
182182
-- Setup.hs interface for this package.

cabal-install/tests/UnitTests/Distribution/Client/ScriptUtils.hs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ testScriptPath (ShortPath p) = withMaxSuccess 10000 $ ioProperty $ do
2929
hashed_path <- getScriptCacheDirectory p
3030
script_build_dir <- defaultScriptBuildsDir
3131
return $
32-
and
33-
-- 1. Is it a valid path at all
34-
[ isValid hashed_path
35-
, -- 2. Is the computed hashed path in the expected directory?
36-
(script_build_dir </> takeFileName hashed_path) `equalFilePath` hashed_path
37-
]
32+
-- 1. Is it a valid path at all
33+
isValid hashed_path
34+
&&
35+
-- 2. Is the computed hashed path in the expected directory?
36+
(script_build_dir </> takeFileName hashed_path) `equalFilePath` hashed_path

cabal-testsuite/PackageTests/PrivateDeps/cabal-hooks-demo/hooks-lib/src/HooksLib.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ revertA2 L2.B = L.B
6868

6969
hooks_show :: L.A -> HooksM String
7070
hooks_show a = do
71-
ver <- hooksVersion <$> ask
71+
ver <- asks hooksVersion
7272
case ver of
7373
V01 -> readHooksExe "show" (convertA1 a)
7474
V02 -> readHooksExe "show" (convertA2 a)
7575

7676
hooks_inc :: L.A -> HooksM L.A
7777
hooks_inc a = do
78-
ver <- hooksVersion <$> ask
78+
ver <- asks hooksVersion
7979
case ver of
8080
V01 -> revertA1 <$> (readHooksExe "inc" (convertA1 a))
8181
V02 -> revertA2 <$> (readHooksExe "inc" (convertA2 a))
@@ -88,7 +88,7 @@ hooks_inc a = do
8888

8989
readHooksExe :: (Binary a, Binary b) => String -> a -> HooksM b
9090
readHooksExe hook args = do
91-
exe <- hooksExe <$> ask
91+
exe <- asks hooksExe
9292
liftIO $ readHooksExe_ exe hook args
9393

9494
withForkWait :: IO () -> (IO () -> IO a) -> IO a

cabal-testsuite/src/Test/Cabal/Prelude.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,7 @@ findDependencyInStore :: String -- ^package name prefix
11741174
findDependencyInStore pkgName = do
11751175
storeDir <- testStoreDir <$> getTestEnv
11761176
liftIO $ do
1177-
storeDirForGhcVersion <- head <$> listDirectory storeDir
1177+
(storeDirForGhcVersion:_) <- listDirectory storeDir
11781178
packageDirs <- listDirectory (storeDir </> storeDirForGhcVersion)
11791179
-- Ideally, we should call 'hashedInstalledPackageId' from 'Distribution.Client.PackageHash'.
11801180
-- But 'PackageHashInputs', especially 'PackageHashConfigInputs', is too hard to construct.

0 commit comments

Comments
 (0)