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

unknown constant '_obj' #6553

Open
nomeata opened this issue Jan 6, 2025 · 1 comment
Open

unknown constant '_obj' #6553

nomeata opened this issue Jan 6, 2025 · 1 comment
Labels
depends on new code generator We are currently working on a new compiler (code generator) for Lean. This issue/PR is blocked by it P-medium We may work on this issue if we find the time

Comments

@nomeata
Copy link
Collaborator

nomeata commented Jan 6, 2025

I just ran into this. I fear this is yet another code generator bug (if so, maybe it’s at least useful to test the completeness of the fixes once we fix them.)

import Lean

open Lean Meta

def go : MetaM Unit := do
  for (_name, ci) in (← getEnv).constants do
    if ci.isTheorem then continue

    forallTelescope ci.type fun _xs _r => do
    --   -- unless r.isApp do return
    --   -- unless r.appFn!.isFVar do return
    --   -- dbg_trace f!"{name}"
      pure ()

/-- error: unknown constant '_obj' -/
#guard_msgs in
run_meta go

Version

Lean 4.16.0-nightly-2025-01-06
@nomeata
Copy link
Collaborator Author

nomeata commented Jan 6, 2025

Hmm, or maybe it’s another issue; if I add

    if name.isInternal then continue

after the for it seems to help.

@Kha Kha added the depends on new code generator We are currently working on a new compiler (code generator) for Lean. This issue/PR is blocked by it label Jan 10, 2025
@leanprover-bot leanprover-bot added the P-medium We may work on this issue if we find the time label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depends on new code generator We are currently working on a new compiler (code generator) for Lean. This issue/PR is blocked by it P-medium We may work on this issue if we find the time
Projects
None yet
Development

No branches or pull requests

3 participants