- header : String
- opts : Lean.Options
- currNamespace : Lake.Name
- openDecls : List Lean.OpenDecl
- varDecls : Array (Lean.TSyntax `Lean.Parser.Term.bracketedBinder)
section variables
Globally unique internal identifiers for the
varDecls
- isNoncomputable : Bool
noncomputable sections automatically add the
noncomputable
modifier to any declaration we cannot generate code for.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- env : Lean.Environment
- messages : Lean.MessageLog
- scopes : List Lean.Elab.Command.Scope
- nextMacroScope : Nat
- maxRecDepth : Nat
- nextInstIdx : Nat
- ngen : Lean.NameGenerator
- infoState : Lean.Elab.InfoState
- traceState : Lean.TraceState
Instances For
- fileName : String
- fileMap : Lean.FileMap
- currRecDepth : Nat
- cmdPos : String.Pos
- macroStack : Lean.Elab.MacroStack
- currMacroScope : Lean.MacroScope
- ref : Lean.Syntax
- tacticCache? : Option (IO.Ref Lean.Elab.Tactic.Cache)
Instances For
Equations
Instances For
Instances For
Instances For
- name : Lake.Name
Instances For
Equations
- Lean.Elab.Command.instMonadCommandElabM = let i := inferInstanceAs (Monad Lean.Elab.Command.CommandElabM); Monad.mk
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.addLinter l = do let ls ← ST.Ref.get Lean.Elab.Command.lintersRef ST.Ref.set Lean.Elab.Command.lintersRef (Array.push ls l)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.Command.instMonadOptionsCommandElabM = { getOptions := do let __do_lift ← get pure (List.head! __do_lift.scopes).opts }
Equations
- Lean.Elab.Command.getRef = do let __do_lift ← read pure __do_lift.ref
Instances For
Equations
- Lean.Elab.Command.instAddMessageContextCommandElabM = { addMessageContext := Lean.addMessageContextPartial }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Elab.Command.instMonadLiftTIOCommandElabM = { monadLift := fun {α : Type} => Lean.Elab.Command.liftIO }
Equations
- Lean.Elab.Command.getScope = do let __do_lift ← get pure (List.head! __do_lift.scopes)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Elab.Command.getCurrMacroScope = do let __do_lift ← read pure __do_lift.currMacroScope
Instances For
Equations
- Lean.Elab.Command.getMainModule = do let __do_lift ← Lean.getEnv pure (Lean.Environment.mainModule __do_lift)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Elaborate x
with stx
on the macro stack
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
elabCommand
wrapper that should be used for the initial invocation, not for recursive calls after
macro expansion etc.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Adapt a syntax transformation to a regular, command-producing elaborator.
Equations
- Lean.Elab.Command.adaptExpander exp stx = do let stx' ← exp stx Lean.Elab.Command.withMacroExpansion stx stx' (Lean.Elab.Command.elabCommand stx')
Instances For
Return identifier names in the given bracketed binder.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Lift the TermElabM
monadic action x
into a CommandElabM
monadic action.
Note that x
is executed with an empty message log. Thus, x
cannot modify/view messages produced by
previous commands.
If you need to access the free variables corresponding to the ones declared using the variable
command,
consider using runTermElabM
.
Recall that TermElabM
actions can automatically lift MetaM
and CoreM
actions.
Example:
import Lean
open Lean Elab Command Meta
def printExpr (e : Expr) : MetaM Unit := do
IO.println s!"{← ppExpr e} : {← ppExpr (← inferType e)}"
#eval
liftTermElabM do
printExpr (mkConst ``Nat)
Equations
- One or more equations did not get rendered due to their size.
Instances For
Execute the monadic action elabFn xs
as a CommandElabM
monadic action, where xs
are free variables
corresponding to all active scoped variables declared using the variable
command.
This method is similar to liftTermElabM
, but it elaborates all scoped variables declared using the variable
command.
Example:
import Lean
open Lean Elab Command Meta
variable {α : Type u} {f : α → α}
variable (n : Nat)
#eval
runTermElabM fun xs => do
for x in xs do
IO.println s!"{← ppExpr x} : {← ppExpr (← inferType x)}"
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Elab.Command.catchExceptions x ctx ref = EIO.catchExceptions (Lean.Elab.withLogging x ctx ref) fun (x : Lean.Exception) => pure ()
Instances For
Equations
- Lean.Elab.Command.getScopes = do let __do_lift ← get pure __do_lift.scopes
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Elab.Command.getLevelNames = do let __do_lift ← Lean.Elab.Command.getScope pure __do_lift.levelNames
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.