File tree Expand file tree Collapse file tree 12 files changed +11
-13
lines changed
Cabal-syntax/src/Distribution/Types
cabal-install/src/Distribution/Client
cabal-testsuite/PackageTests/ShowBuildInfo/A Expand file tree Collapse file tree 12 files changed +11
-13
lines changed Original file line number Diff line number Diff line change 40
40
- ignore : {name: "Use catMaybes"} # 4 hints
41
41
- ignore : {name: "Use concatMap"} # 2 hints
42
42
- ignore : {name: "Use const"} # 37 hints
43
- - ignore : {name: "Use elem"} # 2 hints
44
43
- ignore : {name: "Use first"} # 5 hints
45
44
- ignore : {name: "Use fmap"} # 24 hints
46
45
- ignore : {name: "Use fold"} # 1 hint
57
56
- ignore : {name: "Use max"} # 2 hints
58
57
- ignore : {name: "Use maybe"} # 8 hints
59
58
- ignore : {name: "Use newtype instead of data"} # 31 hints
60
- - ignore : {name: "Use notElem"} # 9 hints
61
59
- ignore : {name: "Use null"} # 2 hints
62
60
- ignore : {name: "Use record patterns"} # 16 hints
63
61
- ignore : {name: "Use replicateM_"} # 2 hints
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ instance Parsec PackageIdentifier where
65
65
(v, xs) <- case simpleParsec (NE. last xs') of
66
66
Nothing -> return (nullVersion, toList xs') -- all components are version
67
67
Just v -> return (v, NE. init xs')
68
- if not (null xs) && all (\ c -> all ( /= ' .' ) c && not (all isDigit c)) xs
68
+ if not (null xs) && all (\ c -> notElem ' .' c && not (all isDigit c)) xs
69
69
then return $ PackageIdentifier (mkPackageName (intercalate " -" xs)) v
70
70
else fail " all digits or a dot in a portion of package name"
71
71
where
Original file line number Diff line number Diff line change @@ -423,7 +423,7 @@ checkPackageDescription
423
423
-- But it is OK for executables to have the same name.
424
424
nsubs <- asksCM (pnSubLibs . ccNames)
425
425
checkP
426
- (any ( == prettyShow pn) (prettyShow <$> nsubs))
426
+ (elem ( prettyShow pn) (prettyShow <$> nsubs))
427
427
(PackageBuildImpossible $ IllegalLibraryName pn)
428
428
429
429
-- § Fields check.
Original file line number Diff line number Diff line change @@ -711,7 +711,7 @@ computeLocalBuildConfig cfg comp programDb = do
711
711
-- rely on them. By the time that bug was fixed, ghci had
712
712
-- been changed to read shared libraries instead of archive
713
713
-- files (see next code block).
714
- not (GHC. compilerBuildWay comp `elem` [DynWay , ProfDynWay ])
714
+ notElem (GHC. compilerBuildWay comp) [DynWay , ProfDynWay ]
715
715
CompilerId GHCJS _ ->
716
716
not (GHCJS. isDynamic comp)
717
717
_ -> False
Original file line number Diff line number Diff line change @@ -320,7 +320,7 @@ depLibraryPaths
320
320
-- because you never have any internal libraries in this case;
321
321
-- they're all external.
322
322
let external_ipkgs = filter is_external (allPackages installed)
323
- is_external ipkg = not (installedUnitId ipkg `elem` internalDeps)
323
+ is_external ipkg = notElem (installedUnitId ipkg) internalDeps
324
324
-- First look for dynamic libraries in `dynamic-library-dirs`, and use
325
325
-- `library-dirs` as a fall back.
326
326
getDynDir pkg = case Installed. libraryDynDirs pkg of
Original file line number Diff line number Diff line change @@ -428,7 +428,7 @@ filterAutogenModules pkg_descr0 =
428
428
filterFunction bi = \ mn ->
429
429
mn /= pathsModule
430
430
&& mn /= packageInfoModule
431
- && not ( mn `elem` autogenModules bi)
431
+ && notElem mn ( autogenModules bi)
432
432
433
433
-- | Prepare a directory tree of source files for a snapshot version.
434
434
-- It is expected that the appropriate snapshot version has already been set
Original file line number Diff line number Diff line change @@ -331,7 +331,7 @@ installCommand =
331
331
}
332
332
where
333
333
-- install doesn't take installDirs flags, since it always installs into the store in a fixed way.
334
- notInstallDirOpt x = not $ optionName x `elem` installDirOptNames
334
+ notInstallDirOpt x = notElem ( optionName x) installDirOptNames
335
335
installDirOptNames = map optionName installDirsOptions
336
336
337
337
-- | The @install@ command actually serves four different needs. It installs:
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ updateAction flags@NixStyleFlags{..} extraArgs globalFlags = do
179
179
unless (null updateRepoRequests) $ do
180
180
let remoteRepoNames = map repoName repos
181
181
unknownRepos =
182
- [ r | (UpdateRequest r _) <- updateRepoRequests, not (r `elem` remoteRepoNames)
182
+ [ r | (UpdateRequest r _) <- updateRepoRequests, notElem r remoteRepoNames
183
183
]
184
184
unless (null unknownRepos) $
185
185
dieWithException verbosity $
Original file line number Diff line number Diff line change @@ -782,7 +782,7 @@ checkPrintPlan
782
782
-- likely to be broken. We exclude packages that are already broken.
783
783
let newBrokenPkgs =
784
784
filter
785
- (\ p -> not (Installed. installedUnitId p `elem` excluded) )
785
+ (\ p -> notElem (Installed. installedUnitId p) excluded)
786
786
(PackageIndex. reverseDependencyClosure installed reinstalledPkgs)
787
787
let containsReinstalls = not (null reinstalledPkgs)
788
788
let breaksPkgs = not (null newBrokenPkgs)
Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ isRelaxDeps RelaxDepsAll = True
214
214
-- | A smarter 'RelaxedDepsSome', @*:*@ is the same as @all@.
215
215
mkRelaxDepSome :: [RelaxedDep ] -> RelaxDeps
216
216
mkRelaxDepSome xs
217
- | any ( == RelaxedDep RelaxDepScopeAll RelaxDepModNone RelaxDepSubjectAll ) xs =
217
+ | elem ( RelaxedDep RelaxDepScopeAll RelaxDepModNone RelaxDepSubjectAll ) xs =
218
218
RelaxDepsAll
219
219
| otherwise =
220
220
RelaxDepsSome xs
You can’t perform that action at this time.
0 commit comments