Skip to content

Add exe ghc-supported-languages#11634

Merged
mergify[bot] merged 1 commit intohaskell:masterfrom
cabalism:exe/ghc-supported-languages
Mar 28, 2026
Merged

Add exe ghc-supported-languages#11634
mergify[bot] merged 1 commit intohaskell:masterfrom
cabalism:exe/ghc-supported-languages

Conversation

@philderbeast
Copy link
Copy Markdown
Collaborator

@philderbeast philderbeast commented Mar 18, 2026

Fix for #11633.

Note

Should we move this module to cabal-dev-scripts?

Manual QA Notes

Test with various GHC versions.

$ which ghc-9.12.2 | xargs cabal run ghc-supported-extensions

$ echo $status
0

$ which ghc-9.14.1 | xargs cabal run ghc-supported-extensions
The following extensions are known to GHC but are not in the 
extension registry in Language.Haskell.Extension.
  ExplicitLevelImports
  NoExplicitLevelImports
  ImplicitStagePersistence
  NoImplicitStagePersistence
All extensions should be registered, even experimental extensions.

$ echo $status
123

Comment thread Cabal-tests/tests/misc/ghc-supported-languages.hs Outdated
@philderbeast philderbeast force-pushed the exe/ghc-supported-languages branch from b3e1c7a to 181e4c4 Compare March 25, 2026 19:12
@philderbeast philderbeast force-pushed the exe/ghc-supported-languages branch from 88b9e3f to a861deb Compare March 26, 2026 13:49
@philderbeast
Copy link
Copy Markdown
Collaborator Author

Should we move this module to cabal-dev-scripts?

No, because it needs the development version of KnownExtension:

-- | Known Haskell language extensions, including deprecated and undocumented
-- ones.
--
-- Check <https://downloads.haskell.org/~ghc/9.2.3/docs/html/users_guide/exts/table.html “Overview of all language extensions” in GHC User’s Guide>
-- for more information.
data KnownExtension

- Format ghc-supported-languages module
- Add an args check with help
- All extensions should be registered
- Exclude known languages
- Rename exceptions to langsAsExts
- Rename executable to ghc-supported-extensions
- Use explicit import lists, except for prelude
- Don't use dieNoVerbosity
- Move to exes/GhcSupportedExtensions.hs
- Handle the zero args case gracefully
- Satisfy fourmolu
- We're checking KnownExtension
- Avoid _ in registered pattern match
- Mention language editions
- Add a note about missing language editions
@philderbeast philderbeast force-pushed the exe/ghc-supported-languages branch from 4578b9a to 82823b4 Compare March 26, 2026 14:03
@philderbeast philderbeast added the merge me Tell Mergify Bot to merge label Mar 26, 2026
@philderbeast
Copy link
Copy Markdown
Collaborator Author

I added a check for language extensions to the preflight section of the release checklist.

@mergify mergify bot added the ready and waiting Mergify is waiting out the cooldown period label Mar 26, 2026
@geekosaur
Copy link
Copy Markdown
Collaborator

FWIW that was already there, indirectly, via checking for new options. But nobody ran that for 3.16, because @wz1000 told us there weren't any. Sadly, I'm pretty sure Zubin was thinking -f, not -X, so the new extensions got missed as a result.

@philderbeast
Copy link
Copy Markdown
Collaborator Author

FWIW that was already there

I think I found what you mean, each GHC release also has its own cabal issue with a checklist, such as #9729.

@geekosaur
Copy link
Copy Markdown
Collaborator

Actually, it looks like someone reverted it at some point. It included a shell recipe for comparing ghc --show-options between two versions, which I'd used locally for a couple of releases but then someone else had to handle a release because I was juggling too many doctor appointments at the time.

(And now it's out of my shell history, sadly.)

@geekosaur
Copy link
Copy Markdown
Collaborator

Okay, re-added it just after yours. The original version also checked -X options, but as you've covered that I left it out.

@mergify mergify bot added merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days queued labels Mar 28, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 28, 2026

Merge Queue Status

This pull request spent 1 hour 52 minutes 40 seconds in the queue, including 1 hour 42 minutes 4 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 Mar 28, 2026
mergify bot added a commit that referenced this pull request Mar 28, 2026
@mergify mergify bot merged commit ec047dc into haskell:master Mar 28, 2026
211 of 212 checks passed
@mergify mergify bot removed the queued label Mar 28, 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.

3 participants