Skip to content

feat: set_option for conv mode - #2887

Closed
lecopivo wants to merge 2 commits into
leanprover:masterfrom
lecopivo:setOptionConv
Closed

feat: set_option for conv mode#2887
lecopivo wants to merge 2 commits into
leanprover:masterfrom
lecopivo:setOptionConv

Conversation

@lecopivo

Copy link
Copy Markdown

Setting options with set_option ... in ... was only possible in tactic mode. This PR enables it to do it in conv mode too.

The only issue with my fix is that the syntax definition is in src/Lean/Elab/Tactic/Conv/Basic.lean which is clearly a bad place for it. Ideally it should be in src/Lean/Parser/Command.lean just next to the definition of set_option tactic but I do not know how to write the parser with convSeq

@lecopivo
lecopivo requested review from Kha and kim-em as code owners November 15, 2023 19:58
@lecopivo lecopivo changed the title set_option for conv mode feat: set_option for conv mode Nov 15, 2023
@digama0

digama0 commented Nov 15, 2023

Copy link
Copy Markdown
Collaborator

You need

  register_parser_alias                                                 optionValue

around here and then (after a stage0 update)

syntax (name := «set_option») "set_option " ident ppSpace optionValue " in " convSeq : conv

in Init/Conv.lean to define the syntax here.

You can probably also implement the conv as a macro, not just define the syntax, by transitioning in and out of tactic mode, c.f. the focus conv tactic.

@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Nov 15, 2023
@ghost

ghost commented Nov 15, 2023

Copy link
Copy Markdown
  • ❗ Mathlib CI will not be attempted unless you rebase your PR onto the 'nightly' branch. (2023-11-15 20:48:42)

@kim-em kim-em added the awaiting-author Waiting for PR author to address issues label Nov 20, 2023
@github-actions github-actions Bot added the stale label Dec 21, 2023
@github-actions github-actions Bot removed the stale label Feb 10, 2024
@github-actions github-actions Bot added the stale label May 5, 2024
@github-actions github-actions Bot removed the stale label May 30, 2024
@github-actions github-actions Bot added stale and removed stale labels Jun 29, 2024
@github-actions github-actions Bot added the stale label Aug 20, 2024
@github-actions github-actions Bot removed the stale label Sep 6, 2024
@github-actions github-actions Bot added the stale label Oct 31, 2024
@github-actions github-actions Bot removed the stale label Jun 6, 2025
@github-actions github-actions Bot added the stale label Sep 25, 2025
@kim-em

kim-em commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

This hasn't been touched in over a year, and has a merge conflict. I'm closing now; please re-open if you think appropriate.

@kim-em kim-em closed this Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author Waiting for PR author to address issues stale toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants