Skip to content

Commit

Permalink
the last branch could be point-free as well
Browse files Browse the repository at this point in the history
  • Loading branch information
cakekindel committed Sep 17, 2024
1 parent 364983e commit ab8a9c5
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/Spago/Psa.purs
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,17 @@ psaCompile globs pursArgs psaArgs = do
failedToDecode = failedToDecodeMsg <$> Array.catMaybes (Array.mapWithIndex (\idx e -> (idx /\ _) <$> blush e) errors)

case Cmd.exit purs, noErrors of
Normally 0, true -> for failedToDecode logWarn *> logSuccess "Build succeeded." $> true
_, true -> prepareToDie [ "purs exited with non-ok status code: " <> show (Cmd.exit purs) ] $> false
_, _ -> do
case purs of
Left r -> logDebug $ Cmd.printExecResult r
_ -> pure unit
prepareToDie [ "Failed to build." ]
pure false
Normally 0, true ->
for failedToDecode logWarn
*> logSuccess "Build succeeded."
$> true
_, true ->
prepareToDie [ "purs exited with non-ok status code: " <> show (Cmd.exit purs) ]
$> false
_, _ ->
for (blush purs) (logDebug <<< Cmd.printExecResult)
*> prepareToDie [ "Failed to build." ]
$> false

where
isEmptySpan filename pos =
Expand Down

0 comments on commit ab8a9c5

Please sign in to comment.