Skip to content

Commit

Permalink
Fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
vrom911 committed Jun 6, 2023
1 parent 46cf868 commit 0e2bb1d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/Commands/Format.hs
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,16 @@ runCommand opts = do
"Use the --help option to display more usage information."
]
return FormatResultFail
let exitFail = embed (exitWith (ExitFailure 1))
let exitFail :: IO a
exitFail = exitWith (ExitFailure 1)
case res of
FormatResultFail -> exitFail
FormatResultFail -> embed exitFail
FormatResultNotFormatted ->
{- use exit code 1 for
* unformatted files when using --check
* when running the formatter on a Juvix project
-}
when (opts ^. formatCheck || target == TargetDir) exitFail
when (opts ^. formatCheck || target == TargetDir) (embed exitFail)
FormatResultOK -> pure ()

renderModeFromOptions :: FormatTarget -> FormatOptions -> FormattedFileInfo -> FormatRenderMode
Expand Down

0 comments on commit 0e2bb1d

Please sign in to comment.