leanprover / leanprover/verso

Add a way to specify scopes (global or local) of expressions

Open
#9 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

highlighting
Dominant language
Lean
Stars
384
Forks
124
Avg merge
22h 28m
Merged PRs (30d)
10

Description

We need to have inline code and code blocks that indicate their scopes, so that variable references can be accurately tracked.

Some possibilities:

  1. Define a new syntactic form "ANCHOR{x}" that defines x as a name for the scope in which it occurs. Then, when rendering output, omit all uses of ANCHOR, but use the saved local environment at x to elaborate expressions.
  2. Indicate scopes with specially formatted comments, and rig up the evaluator to notice when one is pointing at them
  3. Reconstruct the local environment from language server responses (the equivalent of the "Expected Type" field of the infoview)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the three scope proposals in the issue: ANCHOR syntax, specially formatted comments, and language-server responses. Done means inline code and code blocks can identify global or local scopes so variable references are tracked accurately during rendering.

Written by the indexing model from the issue text.

Assessment

Domain
documentation, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.