Skip to content

Hlint suggestion: avoid lambda using infix#11676

Merged
mergify[bot] merged 1 commit intohaskell:masterfrom
cabalism:hlint/avoid-lambda-use-infix
Apr 11, 2026
Merged

Hlint suggestion: avoid lambda using infix#11676
mergify[bot] merged 1 commit intohaskell:masterfrom
cabalism:hlint/avoid-lambda-use-infix

Conversation

@philderbeast
Copy link
Copy Markdown
Collaborator

See #9110. Discharges and no longer ignores HLint's "avoid lambda using `infix`" suggestion so that this will be suggested by our CI linting.

I find the suggested code is generally easy to read, such as satisfy (`elem` xs). It avoids the need for primed or other temporary names, such as ui' in:

-  CommandSpec ui (\ui' -> wrapperAction ui' getCommonFlags) NormalCommand
+  CommandSpec ui (`wrapperAction` getCommonFlags) NormalCommand

  • 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 thread cabal-install/src/Distribution/Client/Install.hs
Comment thread Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs Outdated
Comment thread cabal-install/src/Distribution/Client/ProjectOrchestration.hs
Copy link
Copy Markdown
Collaborator

@Bodigrim Bodigrim left a comment

Choose a reason for hiding this comment

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

I use this pattern extensively myself, so I'm supportive.

Copy link
Copy Markdown
Collaborator

@ulysses4ever ulysses4ever left a comment

Choose a reason for hiding this comment

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

I don't have a preference either way, so I lean on the side of the volunteer. If someone feels strong, they should probably block.

@philderbeast philderbeast force-pushed the hlint/avoid-lambda-use-infix branch 4 times, most recently from 93e82eb to c19c52c Compare April 2, 2026 16:12
@philderbeast philderbeast force-pushed the hlint/avoid-lambda-use-infix branch from c19c52c to e02a980 Compare April 7, 2026 00:56
@philderbeast philderbeast added the merge me Tell Mergify Bot to merge label Apr 9, 2026
@mergify mergify bot added the ready and waiting Mergify is waiting out the cooldown period label Apr 9, 2026
- Use `optional` in default and conversion branches
- Use `infix` PerCompilerFlavor both ways
@philderbeast philderbeast force-pushed the hlint/avoid-lambda-use-infix branch from e02a980 to e6c58c0 Compare April 9, 2026 12:19
@mergify mergify bot added merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days queued labels Apr 11, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 11, 2026

Merge Queue Status

This pull request spent 1 hour 56 minutes 5 seconds in the queue, including 1 hour 45 minutes 21 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

mergify bot added a commit that referenced this pull request Apr 11, 2026
@mergify mergify bot merged commit 5787aa5 into haskell:master Apr 11, 2026
136 of 137 checks passed
@mergify mergify bot removed the queued label Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge ready and waiting Mergify is waiting out the cooldown period

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants