-
Notifications
You must be signed in to change notification settings - Fork 696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unused Semigroup imports. #5673
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, let's merge once CI passes
Cabal/Distribution/Compat/Prelude.hs
Outdated
@@ -117,7 +118,12 @@ import Control.DeepSeq (NFData (..)) | |||
import Data.Data (Data) | |||
import Data.Typeable (Typeable) | |||
import Distribution.Compat.Binary (Binary (..)) | |||
import Distribution.Compat.Semigroup (Semigroup (..), gmappend, gmempty) | |||
#if !MINVER_base_411 && MINVER_base_48 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we need to import Semigroup
always before base-4.11, let's see what travis says
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made quite a lot of these changes today, so my head is spinning. I think you're right, I'm having a closer look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On closer investigation, import Distribution.Compat.Semigroup (Semigroup (..))
is used because it is rexported as Semigroup (..)
. Note that Semigroup (..)
from Distribution.Compat.Semigroup
contains only Semigroup((<>))
. The import is still redundant (in newer base version) because the default Prelude is imported (non-qualified) which exports Semigroup((<>))
.
I'll try and resolve the warning by hiding Semigroup((<>))
from prelude.
"url":"pull/5673", "account":"haskell", "repo":"cabal", "commit": "c4565cdc8c010c8866f5f2db271e5d7d09b6f8a5", "tag":"linux-7.10.3" }
"url":"pull/5673", "account":"haskell", "repo":"cabal", "commit": "c4565cdc8c010c8866f5f2db271e5d7d09b6f8a5", "tag":"linux-8.0.2" }
"url":"pull/5673", "account":"haskell", "repo":"cabal", "commit": "c4565cdc8c010c8866f5f2db271e5d7d09b6f8a5", "tag":"linux-8.2.2" }
"url":"pull/5673", "account":"haskell", "repo":"cabal", "commit": "c4565cdc8c010c8866f5f2db271e5d7d09b6f8a5", "tag":"linux-8.4.4" }
"url":"pull/5673", "account":"haskell", "repo":"cabal", "commit": "c4565cdc8c010c8866f5f2db271e5d7d09b6f8a5", "tag":"linux-8.6.2" }
"url":"pull/5673", "account":"haskell", "repo":"cabal", "commit": "c4565cdc8c010c8866f5f2db271e5d7d09b6f8a5", "tag":"linux-8.4.4-fdebug-expensive-assertions" }
"url":"pull/5673", "account":"haskell", "repo":"cabal", "commit": "c4565cdc8c010c8866f5f2db271e5d7d09b6f8a5", "tag":"osx-7.10.3" }
"url":"pull/5673", "account":"haskell", "repo":"cabal", "commit": "c4565cdc8c010c8866f5f2db271e5d7d09b6f8a5", "tag":"osx-8.0.2" }
c4565cd
to
81d857d
Compare
Due to a bug in ghc, some unused imports do not yield warnings. This commit will remove such unused imports in preparation for the ghc bug fix (see https://ghc.haskell.org/trac/ghc/ticket/13064).
81d857d
to
016c7ee
Compare
"url":"pull/5673", "account":"haskell", "repo":"cabal", "commit": "016c7ee08badc9664be86784746097755802cde1", "tag":"linux-7.6.3" }
"url":"pull/5673", "account":"haskell", "repo":"cabal", "commit": "016c7ee08badc9664be86784746097755802cde1", "tag":"linux-7.8.4" }
"url":"pull/5673", "account":"haskell", "repo":"cabal", "commit": "016c7ee08badc9664be86784746097755802cde1", "tag":"linux-7.10.3" }
"url":"pull/5673", "account":"haskell", "repo":"cabal", "commit": "016c7ee08badc9664be86784746097755802cde1", "tag":"linux-8.0.2" }
"url":"pull/5673", "account":"haskell", "repo":"cabal", "commit": "016c7ee08badc9664be86784746097755802cde1", "tag":"linux-8.2.2" }
"url":"pull/5673", "account":"haskell", "repo":"cabal", "commit": "016c7ee08badc9664be86784746097755802cde1", "tag":"linux-8.6.2" }
"url":"pull/5673", "account":"haskell", "repo":"cabal", "commit": "016c7ee08badc9664be86784746097755802cde1", "tag":"linux-8.4.4-fdebug-expensive-assertions" }
"url":"pull/5673", "account":"haskell", "repo":"cabal", "commit": "016c7ee08badc9664be86784746097755802cde1", "tag":"osx-7.8.4" }
"url":"pull/5673", "account":"haskell", "repo":"cabal", "commit": "016c7ee08badc9664be86784746097755802cde1", "tag":"osx-8.0.2" }
"url":"pull/5673", "account":"haskell", "repo":"cabal", "commit": "016c7ee08badc9664be86784746097755802cde1", "tag":"linux-8.4.4" }
I see 1 job has failed in CI due to a timeout. This seems to be the case for many recent PRs. |
Well, it still verified that lib:Cabal builds, also the Linux 7.10.3 build passed. |
Merged, thanks! |
Due to a bug in ghc, some unused imports do not yield warnings.
This commit will remove such unused imports in preparation for
the ghc bug fix (see https://ghc.haskell.org/trac/ghc/ticket/13064).
Please include the following checklist in your PR:
[ci skip]
is used to avoid triggering the build bots.Testing: Building in CI should be sufficient here.