@@ -1008,23 +1008,23 @@ checkP :: Monad m => Bool -> PackageCheck -> CheckM m ()
1008
1008
checkP b ck = do pb <- asksCM (ciPureChecks . ccInterface)
1009
1009
when pb (check b ck)
1010
1010
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
1016
1016
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
1023
1023
1024
1024
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
1028
1028
1029
1029
-- Check with 'CheckPackageContentOps' operations (i.e. package file checks).
1030
1030
checkPkg :: forall m . Monad m => (CheckPackageContentOps m -> m Bool ) ->
@@ -1439,8 +1439,8 @@ checkMissingVcsInfo :: Monad m => [SourceRepo] -> CheckM m ()
1439
1439
checkMissingVcsInfo rs =
1440
1440
let rdirs = concatMap repoTypeDirname knownRepoTypes
1441
1441
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 ))
1444
1444
(PackageDistSuspicious MissingSourceControl )
1445
1445
where
1446
1446
repoTypeDirname :: KnownRepoType -> [FilePath ]
@@ -2202,9 +2202,6 @@ checkCustomField (n, _) =
2202
2202
-- * Package and distribution checks
2203
2203
-- ------------------------------------------------------------
2204
2204
2205
- checkFilesGPD :: Monad m => CheckM m ()
2206
- checkFilesGPD = undefined -- withPackageContentOpsCheck $ \ops b pc ->
2207
-
2208
2205
-- | Find a package description file in the given directory. Looks for
2209
2206
-- @.cabal@ files. Like 'Distribution.Simple.Utils.findPackageDesc',
2210
2207
-- but generalized over monads.
@@ -2247,11 +2244,11 @@ checkCabalFile pn = do
2247
2244
checkPkgDep
2248
2245
(\ ops -> do ds <- findPackageDesc ops
2249
2246
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
2252
2249
then return . Just $
2253
2250
PackageDistInexcusable $
2254
- (NotPackageName d exp )
2251
+ (NotPackageName d expd )
2255
2252
else return Nothing
2256
2253
_ -> return Nothing )
2257
2254
-- ppExplanation (NotPackageName pdfile expectedCabalname) =
@@ -2721,10 +2718,6 @@ pd2gpd pd = gpd
2721
2718
checkConfiguredPackage :: PackageDescription -> [PackageCheck ]
2722
2719
checkConfiguredPackage pd = checkPackage (pd2gpd pd)
2723
2720
2724
- checkXXXPROVA :: Bool -> PackageCheck -> Maybe PackageCheck
2725
- checkXXXPROVA False _ = Nothing
2726
- checkXXXPROVA True pc = Just pc
2727
-
2728
2721
checkPackageFileNamesWithGlobXXX :: p -> [a ]
2729
2722
checkPackageFileNamesWithGlobXXX _ = []
2730
2723
0 commit comments