Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lean code block and variable command #145

Open
lecopivo opened this issue Aug 15, 2024 · 1 comment
Open

lean code block and variable command #145

lecopivo opened this issue Aug 15, 2024 · 1 comment

Comments

@lecopivo
Copy link

lecopivo commented Aug 15, 2024

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
```
@david-christiansen
Copy link
Collaborator

This seems to be a bug with the reference manual code, rather than the contents of this one.

In any case, I believe I just pushed a fix over there:
Screenshot 2024-08-31 at 00 19 57
Screenshot 2024-08-31 at 00 20 13

It does require that the variable commands be in code blocks. This isn't ideal, but it's what I can make happen at just this moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants