Skip to content

feat(Cabal, cabal-install): Display -O and -g as numeric levels instead of booleans#11937

Open
zlonast wants to merge 2 commits into
haskell:masterfrom
zlonast:zlonast/numeric-render
Open

feat(Cabal, cabal-install): Display -O and -g as numeric levels instead of booleans#11937
zlonast wants to merge 2 commits into
haskell:masterfrom
zlonast:zlonast/numeric-render

Conversation

@zlonast

@zlonast zlonast commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator
-- TODO: [code cleanup] The following is a hack. The "optimization" and
-- "debug-info" fields are OptArg, and viewAsFieldDescr fails on that.
-- Instead of a hand-written parser and printer, we should handle this case
-- properly in the library.

-- TODO: The following is a temporary fix. The "optimization"
-- and "debug-info" fields are OptArg, and viewAsFieldDescr
-- fails on that. Instead of a hand-written hackaged parser
-- and printer, we should handle this case properly in the
-- library.

Template B: This PR does not modify behaviour or interface

E.g. the PR only touches documentation or tests, does refactorings, etc.

Include the following checklist in your PR:

@zlonast zlonast force-pushed the zlonast/numeric-render branch from f9af0be to 0eeaea7 Compare June 7, 2026 17:57
@zlonast zlonast changed the title Numeric render feat(Cabal, cabal-install): Display -O and -g as numeric levels instead of booleans Jun 9, 2026
@zlonast zlonast force-pushed the zlonast/numeric-render branch from 0eeaea7 to c08916a Compare June 9, 2026 13:08
@zlonast zlonast added attention: needs-review re: code formatting Automated code formatting with Fourmolu or similar type: refactor labels Jun 9, 2026
@zlonast zlonast force-pushed the zlonast/numeric-render branch 2 times, most recently from 57d0cf9 to 7b61363 Compare June 10, 2026 11:03
@zlonast zlonast force-pushed the zlonast/numeric-render branch from 7b61363 to f7abbb6 Compare June 10, 2026 11:04
@zlonast zlonast linked an issue Jun 10, 2026 that may be closed by this pull request
@Mikolaj

Mikolaj commented Jun 11, 2026

Copy link
Copy Markdown
Member

@ffaf1 notices this seems to change the behaviour of cabal (namely, it's output). If so, a different PR template should be used, which asks for a different set of tasks.

Would it be possible to add a test that prints the -O and -g things? Preferably in an early commit, so that it illustrates the modification, showing how it requires a change in the test result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

attention: needs-review re: code formatting Automated code formatting with Fourmolu or similar type: refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor: Improve rendering of -O and -g flags as numeric levels

2 participants