Skip to content

Commit 185cf37

Browse files
committed
hlint Distribution.PackageDescription.Check
1 parent ce013aa commit 185cf37

File tree

1 file changed

+11
-11
lines changed
  • Cabal/src/Distribution/PackageDescription

1 file changed

+11
-11
lines changed

Cabal/src/Distribution/PackageDescription/Check.hs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ ppExplanation UncommonBSD4 =
417417
++ "refers to the old 4-clause BSD license with the advertising "
418418
++ "clause. 'BSD3' refers the new 3-clause BSD license."
419419
ppExplanation (UnknownLicenseVersion lic known) =
420-
"'license: " ++ prettyShow (lic) ++ "' is not a known "
420+
"'license: " ++ prettyShow lic ++ "' is not a known "
421421
++ "version of that license. The known versions are "
422422
++ commaSep (map prettyShow known)
423423
++ ". If this is not a mistake and you think it should be a known "
@@ -956,7 +956,7 @@ checkExecutable pkg exe =
956956
-- This check does not apply to scripts.
957957
, check (package pkg /= fakePackageId
958958
&& not (null (modulePath exe))
959-
&& (not $ fileExtensionSupportedLanguage $ modulePath exe)) $
959+
&& not (fileExtensionSupportedLanguage $ modulePath exe)) $
960960
PackageBuildImpossible NoHsLhsMain
961961

962962
, checkSpecVersion pkg CabalSpecV1_18
@@ -1053,7 +1053,7 @@ checkFields pkg =
10531053
check (not . FilePath.Windows.isValid . prettyShow . packageName $ pkg) $
10541054
PackageDistInexcusable (InvalidNameWin pkg)
10551055

1056-
, check ((isPrefixOf "z-") . prettyShow . packageName $ pkg) $
1056+
, check (isPrefixOf "z-" . prettyShow . packageName $ pkg) $
10571057
PackageDistInexcusable ZPrefix
10581058

10591059
, check (isNothing (buildTypeRaw pkg) && specVersion pkg < CabalSpecV2_2) $
@@ -1159,7 +1159,7 @@ checkFields pkg =
11591159
, isNoVersion vr ]
11601160

11611161
internalLibraries =
1162-
map (maybe (packageName pkg) (unqualComponentNameToPackageName) . libraryNameString . libName)
1162+
map (maybe (packageName pkg) unqualComponentNameToPackageName . libraryNameString . libName)
11631163
(allLibraries pkg)
11641164

11651165
internalExecutables = map exeName $ executables pkg
@@ -1238,7 +1238,7 @@ checkOldLicense pkg lic = catMaybes
12381238
, check (lic == BSD4) $
12391239
PackageDistSuspicious UncommonBSD4
12401240

1241-
, case unknownLicenseVersion (lic) of -- xxx qua elimina parentesi?
1241+
, case unknownLicenseVersion lic of
12421242
Just knownVersions -> Just $
12431243
PackageDistSuspicious (UnknownLicenseVersion lic knownVersions)
12441244
_ -> Nothing
@@ -1662,7 +1662,7 @@ checkCabalVersion pkg =
16621662
PackageBuildWarning CVDefaultLanguage
16631663

16641664
, check (specVersion pkg >= CabalSpecV1_10 && specVersion pkg < CabalSpecV3_4
1665-
&& (any isNothing (buildInfoField defaultLanguage))) $
1665+
&& any isNothing (buildInfoField defaultLanguage)) $
16661666
PackageBuildWarning CVDefaultLanguageComponent
16671667

16681668
, checkVersion CabalSpecV1_18
@@ -1694,7 +1694,7 @@ checkCabalVersion pkg =
16941694

16951695
-- check use of extensions field
16961696
, check (specVersion pkg >= CabalSpecV1_10
1697-
&& (any (not . null) (buildInfoField oldExtensions))) $
1697+
&& any (not . null) (buildInfoField oldExtensions)) $
16981698
PackageBuildWarning CVExtensionsDeprecated
16991699

17001700
, checkVersion CabalSpecV3_0 (any (not . null)
@@ -1961,10 +1961,10 @@ checkDevelopmentOnlyFlagsOptions :: String -> [String] -> [PackageCheck]
19611961
checkDevelopmentOnlyFlagsOptions fieldName ghcOptions =
19621962
catMaybes [
19631963

1964-
check (has_Werror) $
1964+
check has_Werror $
19651965
PackageDistInexcusable (WErrorUnneeded fieldName)
19661966

1967-
, check (has_J) $
1967+
, check has_J $
19681968
PackageDistInexcusable (JUnneeded fieldName)
19691969

19701970
, checkFlags ["-fdefer-type-errors"] $
@@ -2130,9 +2130,9 @@ checkCabalFileBOM ops = do
21302130
-- But this can be an issue, see #3552 and also when
21312131
-- --cabal-file is specified. So if you can't find the file,
21322132
-- just don't bother with this check.
2133-
Left _ -> return $ Nothing
2133+
Left _ -> return Nothing
21342134
Right pdfile -> (flip check pc . BS.isPrefixOf bomUtf8)
2135-
`liftM` (getFileContents ops pdfile)
2135+
`liftM` getFileContents ops pdfile
21362136
where pc = PackageDistInexcusable (BOMStart pdfile)
21372137

21382138
where

0 commit comments

Comments
 (0)