Skip to content

Commit 3d22cd0

Browse files
committed
Follow hlint suggestion: Use infix for notElem
1 parent 0574d4a commit 3d22cd0

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

Cabal/src/Distribution/Simple/Configure.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ computeLocalBuildConfig cfg comp programDb = do
711711
-- rely on them. By the time that bug was fixed, ghci had
712712
-- been changed to read shared libraries instead of archive
713713
-- files (see next code block).
714-
notElem (GHC.compilerBuildWay comp) [DynWay, ProfDynWay]
714+
GHC.compilerBuildWay comp `notElem` [DynWay, ProfDynWay]
715715
CompilerId GHCJS _ ->
716716
not (GHCJS.isDynamic comp)
717717
_ -> False

Cabal/src/Distribution/Simple/LocalBuildInfo.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ depLibraryPaths
320320
-- because you never have any internal libraries in this case;
321321
-- they're all external.
322322
let external_ipkgs = filter is_external (allPackages installed)
323-
is_external ipkg = notElem (installedUnitId ipkg) internalDeps
323+
is_external ipkg = installedUnitId ipkg `notElem` internalDeps
324324
-- First look for dynamic libraries in `dynamic-library-dirs`, and use
325325
-- `library-dirs` as a fall back.
326326
getDynDir pkg = case Installed.libraryDynDirs pkg of

cabal-install/src/Distribution/Client/CmdInstall.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ installCommand =
331331
}
332332
where
333333
-- install doesn't take installDirs flags, since it always installs into the store in a fixed way.
334-
notInstallDirOpt x = notElem (optionName x) installDirOptNames
334+
notInstallDirOpt x = optionName x `notElem` installDirOptNames
335335
installDirOptNames = map optionName installDirsOptions
336336

337337
-- | The @install@ command actually serves four different needs. It installs:

cabal-install/src/Distribution/Client/CmdUpdate.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ updateAction flags@NixStyleFlags{..} extraArgs globalFlags = do
179179
unless (null updateRepoRequests) $ do
180180
let remoteRepoNames = map repoName repos
181181
unknownRepos =
182-
[ r | (UpdateRequest r _) <- updateRepoRequests, notElem r remoteRepoNames
182+
[ r | (UpdateRequest r _) <- updateRepoRequests, r `notElem` remoteRepoNames
183183
]
184184
unless (null unknownRepos) $
185185
dieWithException verbosity $

cabal-install/src/Distribution/Client/Install.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ checkPrintPlan
782782
-- likely to be broken. We exclude packages that are already broken.
783783
let newBrokenPkgs =
784784
filter
785-
(\p -> notElem (Installed.installedUnitId p) excluded)
785+
(\p -> Installed.installedUnitId p `notElem` excluded)
786786
(PackageIndex.reverseDependencyClosure installed reinstalledPkgs)
787787
let containsReinstalls = not (null reinstalledPkgs)
788788
let breaksPkgs = not (null newBrokenPkgs)

0 commit comments

Comments
 (0)