From 19c5100fbca88f20a60391554c1cdd95edcc8e35 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 18 Oct 2023 18:59:17 +0300 Subject: [PATCH] implement case expression in displaySeverity --- cabal-install/src/Distribution/Client/Init/Types.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cabal-install/src/Distribution/Client/Init/Types.hs b/cabal-install/src/Distribution/Client/Init/Types.hs index 5c10b2fde42..ee7d7cbe0c3 100644 --- a/cabal-install/src/Distribution/Client/Init/Types.hs +++ b/cabal-install/src/Distribution/Client/Init/Types.hs @@ -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