Skip to content

Swap transformCaretLower and transformCaretUpper#11491

Merged
mergify[bot] merged 1 commit intohaskell:masterfrom
cabalism:fix/transform-caret
Feb 24, 2026
Merged

Swap transformCaretLower and transformCaretUpper#11491
mergify[bot] merged 1 commit intohaskell:masterfrom
cabalism:fix/transform-caret

Conversation

@philderbeast
Copy link
Collaborator

@philderbeast philderbeast commented Feb 15, 2026

Related to #11490 but only adds more explanation and doctest examples for the caret version transforming functions. Add subsections to the modification section, range-preserving and range-relaxing modifications.

image

Note

I find the function names, transformCaretUpper and transformCaretLower, a bit generic and would have preferred removeCaretUpper and removeCaretLower. There are already removeUpperBound and removeLowerBound functions.

QA Notes

For running doctests locally:

$ make doctest-install # one time only for the current system GHC compiler
$ cd Cabal-syntax
$ cabal doctest --allow-newer=False

For building the haddocks locally:

$ cabal haddock Cabal-syntax

  • 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).

@philderbeast philderbeast marked this pull request as draft February 15, 2026 23:58
@philderbeast philderbeast force-pushed the fix/transform-caret branch 2 times, most recently from 22b9481 to 7f98c7b Compare February 16, 2026 00:04
@philderbeast
Copy link
Collaborator Author

@Mikolaj and @geekosaur, bootstrap jobs are timing out. They work locally for me.

$ python3 bootstrap/bootstrap.py -d bootstrap/linux-9.10.2.json fetch
...
Bootstrap sources saved to /home/.../cabal/bootstrap-sources.tar.gz
...

@philderbeast philderbeast marked this pull request as ready for review February 16, 2026 14:44
@philderbeast philderbeast force-pushed the fix/transform-caret branch 2 times, most recently from 82937a1 to 48911d7 Compare February 16, 2026 14:48
@Mikolaj
Copy link
Member

Mikolaj commented Feb 16, 2026

It looks like a network and/or Hackage outage. Let me restart anyway...

@Mikolaj
Copy link
Member

Mikolaj commented Feb 16, 2026

... and it worked! :)

@philderbeast
Copy link
Collaborator Author

Thanks @Mikolaj. I restarted the failing bootstrap jobs 3 times before I asked. Good to see it working again.

@Bodigrim
Copy link
Collaborator

Documentation is great, but as I mentioned in #11490 (comment) I think the implementations should not be swapped.

@geekosaur
Copy link
Collaborator

TBH that's why I've been keeping quiet about this PR; not being familiar with the exact usage of these functions, I suspected but wasn't sure if that was the intent.

@philderbeast philderbeast force-pushed the fix/transform-caret branch 2 times, most recently from 2927fc4 to e10897d Compare February 22, 2026 15:25
@philderbeast
Copy link
Collaborator Author

I think the implementations should not be swapped.

@Bodigrim, I've undone the swap.

- Swap transformCaretLower and transformCaretUpper
- Add haddock modification subsection
- Add a bit more explanation of caret bounds.
- Change the examples for transformCaretUpper, including the zeroes case
- Avoid long word-wrapping subsection title
- Undo swap of transformCaret[Upper <-> Lower]
@philderbeast philderbeast added merge me Tell Mergify Bot to merge and removed attention: needs-review labels Feb 22, 2026
@mergify mergify bot 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 Feb 22, 2026
@mergify
Copy link
Contributor

mergify bot commented Feb 24, 2026

Merge Queue Status

Rule: default


This pull request spent 1 hour 53 minutes 42 seconds in the queue, including 1 hour 42 minutes 57 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 Feb 24, 2026
mergify bot added a commit that referenced this pull request Feb 24, 2026
@mergify mergify bot merged commit 87a9744 into haskell:master Feb 24, 2026
213 of 221 checks passed
@mergify mergify bot removed the queued label Feb 24, 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.

4 participants