Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


Quelle  ImportLean.lean   Sprache: Lean

 

module

public import Mathlib

/-
Lean's metaprogramming API is available while elaborating files that import Mathlib, but it should
not be available to runtime declarations unless it is imported explicitly.

If this test fails in your PR because `foo` no longer produces an error, you have almost certainly
introduced an ordinary import that exposes Lean's metaprogramming API at runtime through `Mathlib`.
Check your new or changed imports and their transitive dependencies, and change imports used only
for elaboration to `meta import`. Tactic implementations should be marked `meta` and meta-import
their Lean dependencies.
-/


/--
error: Invalid definition `foo`, may not access declaration `Lean.Expr.bvar` imported as `meta`; consider adding `import Lean.Expr`
-/

#guard_msgs in
public def foo : Lean.Expr := .bvar 0

-- The same API remains usable during elaboration.
public meta def elaboratedExpr : Lean.Expr := .bvar 0

Messung
CHZG
100100100100

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,068
#Domains=861,803