Skip to content
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 LANGUAGE pragmas #10634

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

philderbeast
Copy link
Collaborator

@philderbeast philderbeast commented Dec 11, 2024

See #9110, remove unused LANGUAGE pragmas.

I missed removing some LANGUAGE pragmas after moving code between modules. A reviewer noticed but this is something HLint can check for, #10554 (comment).

Changed a couple of local variable names to avoid -Wname-shadowing (@sheaf these are actionPtr and depsRes) and added -XDisambiguateRecordFields in one place as HLint suggested to avoid [GHC-76037] when removing -XRecordWildCards.

To avoid -Xname-shadowing for the includes binding in Cabal/src/Distribution/Backpack/Configure.hs, I added an import list to the import of Distribution.PackageDescription.

To avoid -Xname-shadowing in cabal-install/src/Distribution/Client/Errors.hs, I imported a couple of modules qualified:

import qualified Distribution.Client.Types.Repo as Repo
import qualified Distribution.Client.Types.RepoName as RepoName

@philderbeast philderbeast force-pushed the hlint/unused-lang-pragma branch from 262d482 to ea745c3 Compare December 11, 2024 10:57
Copy link
Collaborator

@ffaf1 ffaf1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent

- Avoid -Wname-shadowing
- Use -XDisambiguateRecordFields as needed
- Avoid -Wname-shadowing by importing qualified
@philderbeast
Copy link
Collaborator Author

Label merge+no rebase is necessary when the pull request is from an organisation.

@mergify mergify bot added the ready and waiting Mergify is waiting out the cooldown period label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge+no rebase ready and waiting Mergify is waiting out the cooldown period
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants