summaryrefslogtreecommitdiff
path: root/lib/Types.hs
diff options
context:
space:
mode:
authorstuebinm2022-02-18 18:09:23 +0100
committerstuebinm2022-03-19 19:54:48 +0100
commit52bf0fa6dace596a4bd5b4e4229fbb9704fbf443 (patch)
tree971604d125e2faba93db8845224a2d43ee645935 /lib/Types.hs
parent53fb449b008e9b6aed9877b9d33f4026e454e0f9 (diff)
switch to universum prelude
also don't keep adjusted maps around if not necessary
Diffstat (limited to '')
-rw-r--r--lib/Types.hs15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/Types.hs b/lib/Types.hs
index 43a5131..f58705a 100644
--- a/lib/Types.hs
+++ b/lib/Types.hs
@@ -17,20 +17,17 @@ module Types
, lintsToHints
) where
+import Universum
+
import Control.Monad.Trans.Maybe ()
import Data.Aeson (FromJSON, ToJSON (toJSON),
ToJSONKey, (.=))
-import Data.Text (Text)
-import GHC.Generics (Generic)
import Badges (Badge)
-import Control.DeepSeq (NFData)
import qualified Data.Aeson as A
-import Data.Maybe (mapMaybe)
import Paths (RelPath)
-import Util (PrettyPrint (..), showText)
-import WithCli (Argument, Proxy (..),
- atomicArgumentsParser)
+import Util (PrettyPrint (..))
+import WithCli (Argument, atomicArgumentsParser)
import WithCli.Pure (Argument (argumentType, parseArgument),
HasArguments (argumentsParser))
@@ -83,7 +80,7 @@ lintsToHints = mapMaybe (\case {Lint hint -> Just hint ; _ -> Nothing})
instance PrettyPrint Lint where
prettyprint (Lint Hint { hintMsg, hintLevel } ) =
- " " <> showText hintLevel <> ": " <> hintMsg
+ " " <> show hintLevel <> ": " <> hintMsg
prettyprint (Depends dep) =
" Info: found dependency: " <> prettyprint dep
prettyprint (Offers dep) =
@@ -92,7 +89,7 @@ instance PrettyPrint Lint where
" Info: found a badge."
instance PrettyPrint Hint where
- prettyprint (Hint level msg) = " " <> showText level <> ": " <> msg
+ prettyprint (Hint level msg) = " " <> show level <> ": " <> msg
instance ToJSON Lint where
toJSON (Lint h) = toJSON h