Equations
- Lean.Core.getMaxHeartbeats opts = Lean.Option.get opts Lean.Core.maxHeartbeats * 1000
Instances For
Equations
Instances For
- instLevelType : Lean.Core.InstantiateLevelCache
- instLevelValue : Lean.Core.InstantiateLevelCache
Cache for the CoreM
monad
Instances For
Equations
- Lean.Core.instInhabitedCache = { default := { instLevelType := default, instLevelValue := default } }
- env : Lean.Environment
Current environment.
- nextMacroScope : Lean.MacroScope
Next macro scope. We use macro scopes to avoid accidental name capture.
- ngen : Lean.NameGenerator
Name generator for producing unique
FVarId
s,MVarId
s, andLMVarId
s - traceState : Lean.TraceState
Trace messages
- cache : Lean.Core.Cache
Cache for instantiating universe polymorphic declarations.
- messages : Lean.MessageLog
Message log.
- infoState : Lean.Elab.InfoState
Info tree. We have the info tree here because we want to update it while adding attributes.
State for the CoreM monad.
Instances For
- fileName : String
Name of the file being compiled.
- fileMap : Lean.FileMap
Auxiliary datastructure for converting
String.Pos
into Line/Column number. - options : Lean.Options
- currRecDepth : Nat
- maxRecDepth : Nat
- ref : Lean.Syntax
- currNamespace : Lake.Name
- openDecls : List Lean.OpenDecl
- initHeartbeats : Nat
- maxHeartbeats : Nat
- currMacroScope : Lean.MacroScope
Context for the CoreM monad.
Instances For
CoreM is a monad for manipulating the Lean environment.
It is the base monad for MetaM
.
The main features it provides are:
- name generator state
- environment state
- Lean options context
- the current open namespace
Equations
Instances For
Equations
- Lean.Core.instMonadCoreM = let i := inferInstanceAs (Monad Lean.CoreM); Monad.mk
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.Core.instMonadOptionsCoreM = { getOptions := do let __do_lift ← read pure __do_lift.options }
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Core.instAddMessageContextCoreM = { 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.
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.Core.modifyInstLevelTypeCache f = Lean.Core.modifyCache fun x => match x with | { instLevelType := c₁, instLevelValue := c₂ } => { instLevelType := f c₁, instLevelValue := c₂ }
Instances For
Equations
- Lean.Core.modifyInstLevelValueCache f = Lean.Core.modifyCache fun x => match x with | { instLevelType := c₁, instLevelValue := c₂ } => { instLevelType := c₁, instLevelValue := f c₂ }
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.Core.liftIOCore x = do let ref ← Lean.getRef liftM (IO.toEIO (fun err => Lean.Exception.error ref ((Lean.MessageData.ofFormat ∘ Std.format) (toString err))) x)
Instances For
Equations
- Lean.Core.instMonadLiftIOCoreM = { monadLift := fun {α} => Lean.Core.liftIOCore }
Equations
- One or more equations did not get rendered due to their size.
Restore backtrackable parts of the state.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- Lean.Core.CoreM.run x ctx s = StateRefT'.run (x ctx) s
Instances For
Equations
- Lean.Core.CoreM.run' x ctx s = Prod.fst <$> Lean.Core.CoreM.run x ctx s
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
- Lean.Core.withIncRecDepth x = controlAt Lean.CoreM fun runInBase => Lean.withIncRecDepth (runInBase x)
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.checkMaxHeartbeats moduleName = do let __do_lift ← read Lean.Core.checkMaxHeartbeatsCore moduleName `maxHeartbeats __do_lift.maxHeartbeats
Instances For
Equations
- Lean.withCurrHeartbeats x = controlAt Lean.CoreM fun runInBase => Lean.Core.withCurrHeartbeatsImp (runInBase x)
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.Core.getMessageLog = do let __do_lift ← get pure __do_lift.messages
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
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
Return true if ex
was generated by throwMaxHeartbeat
.
This function is a bit hackish. The heartbeat exception should probably be an internal exception.
We used a similar hack at Exception.isMaxRecDepth
Equations
- One or more equations did not get rendered due to their size.
Instances For
Creates the expression d → b
Equations
- Lean.mkArrow d b = do let __do_lift ← Lean.mkFreshUserName `x pure (Lean.mkForall __do_lift Lean.BinderInfo.default d b)
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
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.addAndCompile decl = do Lean.addDecl decl Lean.compileDecl decl
Instances For
Equations
- One or more equations did not get rendered due to their size.