diff --git a/Cabal/src/Distribution/Simple/Glob/Internal.hs b/Cabal/src/Distribution/Simple/Glob/Internal.hs index a88f86cb53b..d95858adfc8 100644 --- a/Cabal/src/Distribution/Simple/Glob/Internal.hs +++ b/Cabal/src/Distribution/Simple/Glob/Internal.hs @@ -458,7 +458,6 @@ checkNameMatches spec glob candidate if enableMultidot spec then pure (GlobMatch ()) else -- if not, issue a warning saying multidot is needed for the match - let (_, candidateExts) = splitExtensions $ takeFileName candidate extractExts :: GlobPieces -> Maybe String extractExts [] = Nothing diff --git a/cabal-install/src/Distribution/Client/FileMonitor.hs b/cabal-install/src/Distribution/Client/FileMonitor.hs index d409273fdb5..4a53f30b6c7 100644 --- a/cabal-install/src/Distribution/Client/FileMonitor.hs +++ b/cabal-install/src/Distribution/Client/FileMonitor.hs @@ -286,9 +286,9 @@ instance Structured MonitorStateGlobRel -- direction by just forgetting the extra info. reconstructMonitorFilePaths :: MonitorStateFileSet -> Set MonitorFilePath reconstructMonitorFilePaths (MonitorStateFileSet singlePaths globPaths) = - Set.fromList - $ map getSinglePath (Set.toList singlePaths) - <> map getGlobPath (Set.toList globPaths) + Set.fromList $ + map getSinglePath (Set.toList singlePaths) + <> map getGlobPath (Set.toList globPaths) where getSinglePath :: MonitorStateFile -> MonitorFilePath getSinglePath (MonitorStateFile kindfile kinddir filepath _) = @@ -576,10 +576,11 @@ probeFileSystem root (MonitorStateFileSet singlePaths globPaths) = ] -- The glob monitors can require state changes globPaths' <- - Set.fromList <$> sequence - [ probeMonitorStateGlob root globPath - | globPath <- Set.toList globPaths - ] + Set.fromList + <$> sequence + [ probeMonitorStateGlob root globPath + | globPath <- Set.toList globPaths + ] return (MonitorStateFileSet singlePaths globPaths') ----------------------------------------------- diff --git a/cabal-install/src/Distribution/Client/ProjectBuilding/UnpackedPackage.hs b/cabal-install/src/Distribution/Client/ProjectBuilding/UnpackedPackage.hs index cc7981ed3c9..a78ebaff142 100644 --- a/cabal-install/src/Distribution/Client/ProjectBuilding/UnpackedPackage.hs +++ b/cabal-install/src/Distribution/Client/ProjectBuilding/UnpackedPackage.hs @@ -473,7 +473,8 @@ buildInplaceUnpackedPackage let listSimple = execRebuild srcdir (needElaboratedConfiguredPackage pkg) - listSdist = fmap (Set.fromList . map monitorFileHashed) $ + listSdist = + fmap (Set.fromList . map monitorFileHashed) $ allPackageSourceFiles verbosity srcdir ifNullThen m m' = do xs <- m @@ -500,12 +501,12 @@ buildInplaceUnpackedPackage let dep_monitors = Set.fromList $ - map monitorFileHashed $ - elabInplaceDependencyBuildCacheFiles - distDirLayout - pkgshared - plan - pkg + map monitorFileHashed $ + elabInplaceDependencyBuildCacheFiles + distDirLayout + pkgshared + plan + pkg updatePackageBuildFileMonitor packageFileMonitor srcdir diff --git a/cabal-install/src/Distribution/Client/ProjectConfig.hs b/cabal-install/src/Distribution/Client/ProjectConfig.hs index 97428671936..42d5c4caf41 100644 --- a/cabal-install/src/Distribution/Client/ProjectConfig.hs +++ b/cabal-install/src/Distribution/Client/ProjectConfig.hs @@ -455,7 +455,7 @@ resolveBuildTimeSettings cabalLogsDirectory "$compiler" "$libname" - <.> "log" + <.> "log" givenTemplate = flagToMaybe projectConfigLogFile useDefaultTemplate diff --git a/cabal-install/src/Distribution/Client/ProjectPlanning.hs b/cabal-install/src/Distribution/Client/ProjectPlanning.hs index f55dccd4f4c..474ac3efa6d 100644 --- a/cabal-install/src/Distribution/Client/ProjectPlanning.hs +++ b/cabal-install/src/Distribution/Client/ProjectPlanning.hs @@ -1165,11 +1165,11 @@ getPackageSourceHashes verbosity withRepoCtx solverPlan = do return (pkgid, srchash) | (pkgid, tarball) <- allTarballFilePkgs ] - monitorFiles - $ Set.fromList - [ monitorFile tarball - | (_pkgid, tarball) <- allTarballFilePkgs - ] + monitorFiles $ + Set.fromList + [ monitorFile tarball + | (_pkgid, tarball) <- allTarballFilePkgs + ] -- Return the combination return $! @@ -1671,7 +1671,7 @@ elaborateInstallPlan dieProgress $ text "Internal libraries only supported with per-component builds." $$ text "Per-component builds were disabled because" - <+> fsep (punctuate comma $ map (text . whyNotPerComponent) $ toList reasons) + <+> fsep (punctuate comma $ map (text . whyNotPerComponent) $ toList reasons) -- TODO: Maybe exclude Backpack too elab0 = elaborateSolverToCommon spkg diff --git a/cabal-install/src/Distribution/Client/RebuildMonad.hs b/cabal-install/src/Distribution/Client/RebuildMonad.hs index 425cf69bd98..fc871160e96 100644 --- a/cabal-install/src/Distribution/Client/RebuildMonad.hs +++ b/cabal-install/src/Distribution/Client/RebuildMonad.hs @@ -69,8 +69,8 @@ import Distribution.Simple.Utils (debug) import Control.Concurrent.MVar (MVar, modifyMVar, newMVar) import Control.Monad.Reader as Reader -import Control.Monad.Writer.CPS as Writer import Control.Monad.Trans.Writer.CPS (runWriterT) +import Control.Monad.Writer.CPS as Writer import qualified Data.Map.Strict as Map import qualified Data.Set as Set import System.Directory @@ -258,12 +258,12 @@ createDirectoryMonitored createParents dir = do monitorDirectoryStatus :: FilePath -> Rebuild Bool monitorDirectoryStatus dir = do exists <- liftIO $ doesDirectoryExist dir - monitorFiles - $ Set.singleton - ( if exists - then monitorDirectory dir - else monitorNonExistentDirectory dir - ) + monitorFiles $ + Set.singleton + ( if exists + then monitorDirectory dir + else monitorNonExistentDirectory dir + ) return exists -- | Like 'doesFileExist', but in the 'Rebuild' monad. This does @@ -272,12 +272,12 @@ doesFileExistMonitored :: FilePath -> Rebuild Bool doesFileExistMonitored f = do root <- askRoot exists <- liftIO $ doesFileExist (root f) - monitorFiles - $ Set.singleton - ( if exists - then monitorFileExistence f - else monitorNonExistentFile f - ) + monitorFiles $ + Set.singleton + ( if exists + then monitorFileExistence f + else monitorNonExistentFile f + ) return exists -- | Monitor a single file @@ -293,12 +293,12 @@ needIfExists :: FilePath -> Rebuild () needIfExists f = do root <- askRoot exists <- liftIO $ doesFileExist (root f) - monitorFiles - $ Set.singleton - ( if exists - then monitorFileHashed f - else monitorNonExistentFile f - ) + monitorFiles $ + Set.singleton + ( if exists + then monitorFileHashed f + else monitorNonExistentFile f + ) -- | Like 'findFileWithExtension', but in the 'Rebuild' monad. findFileWithExtensionMonitored diff --git a/cabal-install/tests/UnitTests/Distribution/Client/FileMonitor.hs b/cabal-install/tests/UnitTests/Distribution/Client/FileMonitor.hs index fceb7459a7e..3d49feb7261 100644 --- a/cabal-install/tests/UnitTests/Distribution/Client/FileMonitor.hs +++ b/cabal-install/tests/UnitTests/Distribution/Client/FileMonitor.hs @@ -450,10 +450,11 @@ testMultipleMonitorKinds mtimeChange = updateMonitor root monitor - (Set.fromList - [ monitorDirectory "dir" - , monitorDirectoryExistence "dir" - ]) + ( Set.fromList + [ monitorDirectory "dir" + , monitorDirectoryExistence "dir" + ] + ) () () (res2, files2) <- expectMonitorUnchanged root monitor ()