[Git][ghc/ghc][master] Hadrian: fix warnings (#22783)

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Tue Jan 17 21:33:59 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
f4d50baf by Vladislav Zavialov at 2023-01-17T16:33:41-05:00
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]

- - - - -


3 changed files:

- hadrian/hadrian.cabal
- hadrian/src/Hadrian/Expression.hs
- hadrian/src/Hadrian/Haskell/Cabal/Parse.hs


Changes:

=====================================
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


=====================================
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


=====================================
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



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f4d50bafb7e14f76273aaf6f634815d5628ccc86

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f4d50bafb7e14f76273aaf6f634815d5628ccc86
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230117/efa9a6ce/attachment-0001.html>


More information about the ghc-commits mailing list