Skip to content

Commit 28948e9

Browse files
committed
shut up -warning
1 parent 69248b9 commit 28948e9

File tree

1 file changed

+19
-26
lines changed
  • Cabal/src/Distribution/PackageDescription

1 file changed

+19
-26
lines changed

Cabal/src/Distribution/PackageDescription/Check.hs

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,23 +1008,23 @@ checkP :: Monad m => Bool -> PackageCheck -> CheckM m ()
10081008
checkP b ck = do pb <- asksCM (ciPureChecks . ccInterface)
10091009
when pb (check b ck)
10101010

1011-
-- Check with 'CheckPreDistributionOps' operations (operations on work
1012-
-- tree files outside of what specified in the .cabal manifest).
1013-
checkPre :: forall m. Monad m => (CheckPreDistributionOps m -> m Bool) ->
1014-
PackageCheck -> CheckM m ()
1015-
checkPre f ck = checkInt ciPreDistOps f ck
1011+
-- -- Check with 'CheckPreDistributionOps' operations (operations on work
1012+
-- -- tree files outside of what specified in the .cabal manifest).
1013+
-- checkPre :: forall m. Monad m => (CheckPreDistributionOps m -> m Bool) ->
1014+
-- PackageCheck -> CheckM m ()
1015+
-- checkPre f ck = checkInt ciPreDistOps f ck
10161016

1017-
-- As 'checkPre', but with PackageCheck depending on a monadic computation
1018-
-- too.
1019-
checkPreDep :: forall m. Monad m =>
1020-
(CheckPreDistributionOps m -> m (Maybe PackageCheck)) ->
1021-
CheckM m ()
1022-
checkPreDep mck = checkIntDep ciPreDistOps mck
1017+
-- -- As 'checkPre', but with PackageCheck depending on a monadic computation
1018+
-- -- too.
1019+
-- checkPreDep :: forall m. Monad m =>
1020+
-- (CheckPreDistributionOps m -> m (Maybe PackageCheck)) ->
1021+
-- CheckM m ()
1022+
-- checkPreDep mck = checkIntDep ciPreDistOps mck
10231023

10241024

1025-
-- Always succeeding 'checkPre'.
1026-
tellPre :: Monad m => PackageCheck -> CheckM m ()
1027-
tellPre ck = checkPre (const $ return True) ck
1025+
-- -- Always succeeding 'checkPre'.
1026+
-- tellPre :: Monad m => PackageCheck -> CheckM m ()
1027+
-- tellPre ck = checkPre (const $ return True) ck
10281028

10291029
-- Check with 'CheckPackageContentOps' operations (i.e. package file checks).
10301030
checkPkg :: forall m. Monad m => (CheckPackageContentOps m -> m Bool) ->
@@ -1439,8 +1439,8 @@ checkMissingVcsInfo :: Monad m => [SourceRepo] -> CheckM m ()
14391439
checkMissingVcsInfo rs =
14401440
let rdirs = concatMap repoTypeDirname knownRepoTypes
14411441
in checkPkg
1442-
(\ops -> do use <- or <$> traverse (doesDirectoryExist ops) rdirs
1443-
return (null rs && use))
1442+
(\ops -> do us <- or <$> traverse (doesDirectoryExist ops) rdirs
1443+
return (null rs && us))
14441444
(PackageDistSuspicious MissingSourceControl)
14451445
where
14461446
repoTypeDirname :: KnownRepoType -> [FilePath]
@@ -2202,9 +2202,6 @@ checkCustomField (n, _) =
22022202
-- * Package and distribution checks
22032203
-- ------------------------------------------------------------
22042204

2205-
checkFilesGPD :: Monad m => CheckM m ()
2206-
checkFilesGPD = undefined --withPackageContentOpsCheck $ \ops b pc ->
2207-
22082205
-- | Find a package description file in the given directory. Looks for
22092206
-- @.cabal@ files. Like 'Distribution.Simple.Utils.findPackageDesc',
22102207
-- but generalized over monads.
@@ -2247,11 +2244,11 @@ checkCabalFile pn = do
22472244
checkPkgDep
22482245
(\ops -> do ds <- findPackageDesc ops
22492246
case ds of
2250-
[d] -> let exp = unPackageName pn <.> "cabal" in
2251-
if takeFileName d /= exp
2247+
[d] -> let expd = unPackageName pn <.> "cabal" in
2248+
if takeFileName d /= expd
22522249
then return . Just $
22532250
PackageDistInexcusable $
2254-
(NotPackageName d exp)
2251+
(NotPackageName d expd)
22552252
else return Nothing
22562253
_ -> return Nothing)
22572254
-- ppExplanation (NotPackageName pdfile expectedCabalname) =
@@ -2721,10 +2718,6 @@ pd2gpd pd = gpd
27212718
checkConfiguredPackage :: PackageDescription -> [PackageCheck]
27222719
checkConfiguredPackage pd = checkPackage (pd2gpd pd)
27232720

2724-
checkXXXPROVA :: Bool -> PackageCheck -> Maybe PackageCheck
2725-
checkXXXPROVA False _ = Nothing
2726-
checkXXXPROVA True pc = Just pc
2727-
27282721
checkPackageFileNamesWithGlobXXX :: p -> [a]
27292722
checkPackageFileNamesWithGlobXXX _ = []
27302723

0 commit comments

Comments
 (0)