lean code block and `variable` command
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 384
- Forks
- 124
- Avg merge
- 22h 28m
- Merged PRs (30d)
- 10
Description
Code block ```lean ... ``` and inline {lean}`...` does not see identifiers introduced by variable command.
For inline code, I'm suspecting that Elab.Term.elabTerm stx none is missing some version of runTermElabM.
I'm expecting that this should work
discard <| Lean.Elab.Command.runTermElabM (fun _ => Elab.Term.elabTerm stx none)
but there is no lift from CommandElabM to DocElabM
mwe where import DemoTextbook.Exts.Exercises should probably be replaces with import Manual.Meta:
import Verso.Genre.Manual
import DemoTextbook.Exts.Exercises
open Verso.Genre Manual
open DemoTextbook.Exts (lean)
variable (X : Type)
#doc (Manual) "Test" =>
Array {lean}`Array X`
```lean
#check X
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the MWE in the issue and inspect Manual/Meta.lean, especially Elab.Term.elabTerm and the surrounding DocElabM handling. Compare the inline and ```lean code-block paths with Lean.Elab.Command.runTermElabM. Done means both forms can resolve identifiers introduced by variable, including X in the example.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100