Commit 1dbf6426 authored by Valentin Reis's avatar Valentin Reis

Style.

parent e34cc0dd
Pipeline #5471 passed with stage
in 36 seconds
{-# LANGUAGE
TupleSections,
LambdaCase,
RecordWildCards,
OverloadedStrings #-}
{-# language TupleSections #-}
{-# language ViewPatterns #-}
{-# language LambdaCase #-}
{-# language RecordWildCards #-}
{-# language OverloadedStrings #-}
{-|
Module : Argo.Stack
......@@ -177,12 +177,11 @@ instance Show StackI where
Performance -> "cmd listen -f performance"
runStack :: StackArgs -> Shell StackOutput
runStack sa@StackArgs {..} = do
when (verbosity == Verbose) $ liftIO $ pPrint sa
runStack sa@StackArgs { verbosity = (==Verbose) -> verbose, ..} = do
when verbose $ liftIO $ pPrint sa
cleanLeftovers workingDirectory
CM.mapM_ ($ (coerce workingDirectory :: FilePath)) [mktree, cd]
CM.mapM_ ($ (coerce workingDirectory)) [mktree, cd]
iDaemon <- case daemon of
DontRun -> return Nothing
......@@ -202,21 +201,19 @@ runStack sa@StackArgs {..} = do
ilist = catMaybes milist
_ <- shell (coerce preludeCommand :: Text) empty >>= \case
ExitSuccess -> when (verbosity == Verbose)
ExitSuccess -> when verbose
$ printInfo ("Executed preludeCommand." <> repr preludeCommand)
ExitFailure _ ->
die ("failed to execute preludeCommand." <> repr preludeCommand)
if verbosity == Verbose
then do
printInfo "Starting the following processes:"
liftIO $ pPrint ilist
else liftIO $ pPrint (fmap fst ilist)
when verbose $ do
printInfo "Starting the following processes:"
liftIO $ pPrint ilist
asyncs <- liftIO $ mapM tupleToAsync ilist
_ <- liftIO $ kbInstallHandler $ CM.mapM_ cancel asyncs
when (verbosity == Verbose) $ printInfo "Processes started."
when verbose $ printInfo "Processes started."
out <- liftIO $ waitAnyCancel asyncs
......@@ -241,7 +238,6 @@ runStack sa@StackArgs {..} = do
tracebackList
cd "../"
return r
where
procsWithTracebacks
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment