Skip to content

for ... in ... do elaborator doesn't produce term info #12827

@Rob23oba

Description

@Rob23oba

Prerequisites

Description

The for x in y and for h : x in y do elaborator don't produce any term info for x or h, i.e. they are not highlighted and hovering on them doesn't show information about them.

Context

Trying out the new do elaborator.

Steps to Reproduce

set_option backward.do.legacy false

def test : IO Unit := do
  for h : i in [1, 2, 3] do -- Try hovering over `h` and `i`
    pure ()

Expected behavior:
Hovering over h shows h : i ∈ [1, 2, 3] and hovering over i shows i : Nat.

Actual behavior:
Hovering only shows the documentation of the for ... in ... elaborator and the result type IO Unit.

Versions

Lean 4.30.0-nightly-2026-03-05

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-mediumWe may work on this issue if we find the timebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions