Skip to content

Commit

Permalink
implement case expression in displaySeverity
Browse files Browse the repository at this point in the history
  • Loading branch information
aleeusgr committed Oct 18, 2023
1 parent 95cfcdc commit 19c5100
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cabal-install/src/Distribution/Client/Init/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,10 @@ instance Exception BreakException
data Severity = Info | Warning | Error deriving (Eq)

displaySeverity :: Severity -> String
displaySeverity severity
| severity == Info = "Info"
| severity == Warning = "Warn"
| severity == Error = "Err"
displaySeverity severity = case severity of
Info -> "Info"
Warning -> "Warn"
Error -> "Err"

-- | Convenience alias for the literate haskell flag
type IsLiterate = Bool
Expand Down

0 comments on commit 19c5100

Please sign in to comment.