Skip to content

HLint suggestions; mapMaybe, maybe, fromMaybe, fuse */map - #11529

Merged
mergify[bot] merged 1 commit into
haskell:masterfrom
cabalism:hlint/mapMaybe
Mar 6, 2026
Merged

HLint suggestions; mapMaybe, maybe, fromMaybe, fuse */map#11529
mergify[bot] merged 1 commit into
haskell:masterfrom
cabalism:hlint/mapMaybe

Conversation

@philderbeast

@philderbeastphilderbeast commented Feb 26, 2026

Copy link
Copy Markdown
Collaborator

Depends-On #11535.

See #9110. Discharges and no longer ignores the following suggestions so that these will be suggested by our CI linting. After these changes, the code is simpler.

  • "Use mapMaybe"
  • "Use maybe"
  • "Replace case with maybe"
  • "Replace case with fromMaybe"
  • "Fuse concatMap/map"
  • "Fuse foldr/map"

I'll squash commits before applying the merge label if this pull request is approved.


  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

Comment threadcabal-install/src/Distribution/Client/CmdInstall.hs Outdated
Comment threadcabal-install/src/Distribution/Client/CmdRun.hs Outdated
Comment threadcabal-install/src/Distribution/Client/TargetSelector.hs
Comment threadcabal-testsuite/PackageTests/Install/ProgramAffixes/cabal.test.hs Outdated
Comment threadCabal/src/Distribution/Backpack/UnifyM.hs Outdated
Comment threadCabal/src/Distribution/Simple/Program/HcPkg.hs
Comment threadCabal/src/Distribution/Simple/PackageIndex.hs
Comment threadCabal/src/Distribution/Types/LocalBuildInfo.hs Outdated
@philderbeast
philderbeastforce-pushed the hlint/mapMaybe branch 2 times, most recently from a8d04b8 to 70095deCompareMarch 4, 2026 14:41

@KleidukosKleidukos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fantastic, thank you!

- Follow hlint suggestion: use maybe
- Follow hlint suggestion: use fromMaybe
- Follow hlint suggestion: replace case with maybe
- Follow hlint suggestion: replace case with fromMaybe
- Follow hlint suggestion: fuse concatMap/map
- Follow hlint suggestion: fuse foldr/map
- Review suggestion maybe "" instead of maybe []
- Remove duplicates with sortNub
- Lift exeMaybe, replace noExes to use not any
- Follow hlint suggestion: use section
- Follow hlint suggestion: use findWithDefault
@philderbeastphilderbeast added merge me Tell Mergify Bot to merge and removed attention: needs-review labels Mar 4, 2026
@mergifymergifyBot added ready and waiting Mergify is waiting out the cooldown period merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days queued labels Mar 4, 2026
@mergify

mergifyBot commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

Rule:default


This pull request spent 1 hour 49 minutes 8 seconds in the queue, including 1 hour 38 minutes 48 seconds running CI.

Required conditions to merge
  • #approved-reviews-by >= 2 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Doctest Cabal
    • check-neutral = Doctest Cabal
    • check-skipped = Doctest Cabal
  • any of [🛡 GitHub branch protection]:
    • check-success = Meta checks
    • check-neutral = Meta checks
    • check-skipped = Meta checks
  • any of [🛡 GitHub branch protection]:
    • check-success = docs/readthedocs.org:cabal
    • check-neutral = docs/readthedocs.org:cabal
    • check-skipped = docs/readthedocs.org:cabal
  • any of [🛡 GitHub branch protection]:
    • check-success = Validate post job
    • check-neutral = Validate post job
    • check-skipped = Validate post job
  • any of [🛡 GitHub branch protection]:
    • check-success = fourmolu
    • check-neutral = fourmolu
    • check-skipped = fourmolu
  • any of [🛡 GitHub branch protection]:
    • check-success = hlint
    • check-neutral = hlint
    • check-skipped = hlint
  • any of [🛡 GitHub branch protection]:
    • check-success = Bootstrap post job
    • check-neutral = Bootstrap post job
    • check-skipped = Bootstrap post job
  • any of [🛡 GitHub branch protection]:
    • check-success = whitespace
    • check-neutral = whitespace
    • check-skipped = whitespace
  • any of [🛡 GitHub branch protection]:
    • check-success = Check sdist post job
    • check-neutral = Check sdist post job
    • check-skipped = Check sdist post job
  • any of [🛡 GitHub branch protection]:
    • check-success = Changelogs
    • check-neutral = Changelogs
    • check-skipped = Changelogs

mergifyBot added a commit that referenced this pull request Mar 6, 2026
@mergify
mergifyBot merged commit 21eb612 into haskell:masterMar 6, 2026
213 checks passed
@mergifymergifyBot removed the queued label Mar 6, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge delay passedApplied (usually by Mergify) when PR approved and received no updates for 2 daysmerge meTell Mergify Bot to mergeready and waitingMergify is waiting out the cooldown period

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@philderbeast@Bodigrim@Kleidukos