Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Stack/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ getLocalPackages = do
$ C.package
$ C.packageDescription gpd
in (name, (gpd, loc))
deps <- (map wrapGPD . concat)
deps <- map wrapGPD . concat
<$> mapM (parseMultiCabalFilesIndex root) (bcDependencies bc)

checkDuplicateNames $
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Docker.hs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ runContainerAndExit getCmdArgs
(Files.createSymbolicLink
(toFilePathNoTrailingSep sshDir)
(toFilePathNoTrailingSep (sandboxHomeDir </> sshRelDir))))
containerID <- withWorkingDir projectRoot $ (trim . decodeUtf8) <$> readDockerProcess
containerID <- withWorkingDir projectRoot $ trim . decodeUtf8 <$> readDockerProcess
(concat
[["create"
,"--net=host"
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Ghci/Script.hs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ commandToBuilder (Module modules)
| otherwise =
fromText ":module + "
<> mconcat (intersperse (fromText " ")
$ (stringUtf8 . quoteFileName . mconcat . intersperse "." . components) <$> S.toAscList modules)
$ stringUtf8 . quoteFileName . mconcat . intersperse "." . components <$> S.toAscList modules)
<> fromText "\n"

-- | Make sure that a filename with spaces in it gets the proper quotes.
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Init.hs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ initProject whichCmd currDir initOpts mresolver = do
find = findCabalDirs (includeSubDirs initOpts)
dirs' = if null dirs then [currDir] else dirs
logInfo "Looking for .cabal or package.yaml files to use to init the project."
cabaldirs <- (Set.toList . Set.unions) <$> mapM find dirs'
cabaldirs <- Set.toList . Set.unions <$> mapM find dirs'
(bundle, dupPkgs) <- cabalPackagesCheck cabaldirs noPkgMsg Nothing

(sd, flags, extraDeps, rbundle) <- getDefaultResolver whichCmd dest initOpts
Expand Down
4 changes: 2 additions & 2 deletions src/Stack/Options/DockerParser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ dockerOptsParser hide0 =
"using a Docker container. --docker implies 'system-ghc: true'"
hide
<*> fmap First
((Just . DockerMonoidRepo) <$> option str (long (dockerOptName dockerRepoArgName) <>
(Just . DockerMonoidRepo <$> option str (long (dockerOptName dockerRepoArgName) <>
hide <>
metavar "NAME" <>
help "Docker repository name") <|>
(Just . DockerMonoidImage) <$> option str (long (dockerOptName dockerImageArgName) <>
Just . DockerMonoidImage <$> option str (long (dockerOptName dockerImageArgName) <>
hide <>
metavar "IMAGE" <>
help "Exact Docker image ID (overrides docker-repo)") <|>
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/PackageLocation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ parseMultiCabalFilesIndex
-> PackageLocationIndex Subdirs
-> RIO env [(GenericPackageDescription, PackageLocationIndex FilePath)]
parseMultiCabalFilesIndex _root (PLIndex pir) =
(pure . (, PLIndex pir)) <$>
pure . (, PLIndex pir) <$>
readPackageUnresolvedIndex pir
parseMultiCabalFilesIndex root (PLOther loc0) =
map (\lpv -> (lpvGPD lpv, PLOther $ lpvLoc lpv)) <$>
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Runners.hs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ withMiniConfigAndLock
withMiniConfigAndLock go@GlobalOpts{..} inner = withRunnerGlobal go $ \runner -> do
miniConfig <-
runRIO runner $
(loadMiniConfig . lcConfig) <$>
loadMiniConfig . lcConfig <$>
loadConfigMaybeProject
globalConfigMonoid
globalResolver
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Snapshot.hs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ loadResolver (ResolverCustom url loc) = do
mdir <-
case loc of
Left _ -> return Nothing
Right fp' -> (Just . parent) <$> liftIO (Dir.canonicalizePath fp' >>= parseAbsFile)
Right fp' -> Just . parent <$> liftIO (Dir.canonicalizePath fp' >>= parseAbsFile)

-- Deal with the dual nature of the compiler key, which either
-- means "use this compiler" or "override the compiler in the
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Solver.hs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ findCabalDirs
:: HasConfig env
=> Bool -> Path Abs Dir -> RIO env (Set (Path Abs Dir))
findCabalDirs recurse dir =
(Set.fromList . map parent)
Set.fromList . map parent
<$> liftIO (findFiles dir isHpackOrCabal subdirFilter)
where
subdirFilter subdir = recurse && not (isIgnored subdir)
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Types/BuildPlan.hs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ instance subdirs ~ Subdirs => ToJSON (PackageLocation subdirs) where

instance subdirs ~ Subdirs => FromJSON (WithJSONWarnings (PackageLocationIndex subdirs)) where
parseJSON v
= ((noJSONWarnings . PLIndex) <$> parseJSON v)
= (noJSONWarnings . PLIndex <$> parseJSON v)
<|> (fmap PLOther <$> parseJSON v)

instance subdirs ~ Subdirs => FromJSON (WithJSONWarnings (PackageLocation subdirs)) where
Expand Down
4 changes: 2 additions & 2 deletions src/Stack/Types/Docker.hs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ instance FromJSON (WithJSONWarnings DockerOptsMonoid) where
(\o -> do dockerMonoidDefaultEnable <- pure (Any True)
dockerMonoidEnable <- First <$> o ..:? dockerEnableArgName
dockerMonoidRepoOrImage <- First <$>
(((Just . DockerMonoidImage) <$> o ..: dockerImageArgName) <|>
((Just . DockerMonoidRepo) <$> o ..: dockerRepoArgName) <|>
((Just . DockerMonoidImage <$> o ..: dockerImageArgName) <|>
(Just . DockerMonoidRepo <$> o ..: dockerRepoArgName) <|>
pure Nothing)
dockerMonoidRegistryLogin <- First <$> o ..:? dockerRegistryLoginArgName
dockerMonoidRegistryUsername <- First <$> o ..:? dockerRegistryUsernameArgName
Expand Down