summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2023-01-17 09:41:03 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-01-17 16:33:41 -0500
commitf4d50bafb7e14f76273aaf6f634815d5628ccc86 (patch)
tree52d5411dddea6b2992583fba6ad27c82b2af59db
parent003b6d4460c08b15a45a6ff04bc77fcf8e3f6633 (diff)
downloadhaskell-f4d50bafb7e14f76273aaf6f634815d5628ccc86.tar.gz
Hadrian: fix warnings (#22783)
This change fixes the following warnings when building Hadrian: src/Hadrian/Expression.hs:38:10: warning: [-Wredundant-constraints] src/Hadrian/Expression.hs:84:13: warning: [-Wtype-equality-requires-operators] src/Hadrian/Expression.hs:84:21: warning: [-Wtype-equality-requires-operators] src/Hadrian/Haskell/Cabal/Parse.hs:67:1: warning: [-Wunused-imports]
-rw-r--r--hadrian/hadrian.cabal3
-rw-r--r--hadrian/src/Hadrian/Expression.hs4
-rw-r--r--hadrian/src/Hadrian/Haskell/Cabal/Parse.hs1
3 files changed, 3 insertions, 5 deletions
diff --git a/hadrian/hadrian.cabal b/hadrian/hadrian.cabal
index 0c1f3c63be..b0c4533b36 100644
--- a/hadrian/hadrian.cabal
+++ b/hadrian/hadrian.cabal
@@ -146,10 +146,11 @@ executable hadrian
, ScopedTypeVariables
, TupleSections
, BangPatterns
+ , TypeOperators
other-extensions: MultiParamTypeClasses
, TypeFamilies
build-depends: Cabal >= 3.2 && < 3.9
- , base >= 4.8 && < 5
+ , base >= 4.11 && < 5
, bytestring >= 0.10 && < 0.12
, containers >= 0.5 && < 0.7
, directory >= 1.3.1.0 && < 1.4
diff --git a/hadrian/src/Hadrian/Expression.hs b/hadrian/src/Hadrian/Expression.hs
index 28a6c521b9..ad0f25ea5c 100644
--- a/hadrian/src/Hadrian/Expression.hs
+++ b/hadrian/src/Hadrian/Expression.hs
@@ -34,10 +34,8 @@ newtype Expr c b a = Expr (ReaderT (Target c b) Action a)
instance Semigroup a => Semigroup (Expr c b a) where
Expr x <> Expr y = Expr $ (<>) <$> x <*> y
--- TODO: The 'Semigroup a' constraint will at some point become redundant.
-instance (Semigroup a, Monoid a) => Monoid (Expr c b a) where
+instance Monoid a => Monoid (Expr c b a) where
mempty = pure mempty
- mappend = (<>)
-- | Expressions that compute a Boolean value.
type Predicate c b = Expr c b Bool
diff --git a/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs b/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs
index a968975837..f7bdf2cab9 100644
--- a/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs
+++ b/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs
@@ -64,7 +64,6 @@ import Base
import Builder
import Context
import Flavour
-import Packages
import Settings
import Distribution.Simple.LocalBuildInfo
import qualified Distribution.Simple.Register as C