Documentation

Lean.CoreM

structure Lean.Core.State :
Type
Equations
structure Lean.Core.Context :
Type
Equations
  • Lean.Core.instInhabitedCoreM = { default := fun x x => throw default }
Equations
  • Lean.Core.instMonadRefCoreM = { getRef := do let a ← read pure a.ref, withRef := fun {α} ref x => withReader (fun ctx => { options := ctx.options, currRecDepth := ctx.currRecDepth, maxRecDepth := ctx.maxRecDepth, ref := ref, currNamespace := ctx.currNamespace, openDecls := ctx.openDecls, initHeartbeats := ctx.initHeartbeats, maxHeartbeats := ctx.maxHeartbeats }) x }
Equations
  • Lean.Core.instMonadEnvCoreM = { getEnv := do let a ← get pure a.env, modifyEnv := fun f => modify fun s => { env := f s.env, nextMacroScope := s.nextMacroScope, ngen := s.ngen, traceState := s.traceState } }
Equations
Equations
  • Lean.Core.instMonadWithOptionsCoreM = { withOptions := fun {α} f x => withReader (fun ctx => { options := f ctx.options, currRecDepth := ctx.currRecDepth, maxRecDepth := ctx.maxRecDepth, ref := ctx.ref, currNamespace := ctx.currNamespace, openDecls := ctx.openDecls, initHeartbeats := ctx.initHeartbeats, maxHeartbeats := ctx.maxHeartbeats }) x }
Equations
Equations
Equations
  • Lean.Core.instMonadRecDepthCoreM = { withRecDepth := fun {α} d x => withReader (fun ctx => { options := ctx.options, currRecDepth := d, maxRecDepth := ctx.maxRecDepth, ref := ctx.ref, currNamespace := ctx.currNamespace, openDecls := ctx.openDecls, initHeartbeats := ctx.initHeartbeats, maxHeartbeats := ctx.maxHeartbeats }) x, getRecDepth := do let a ← read pure a.currRecDepth, getMaxRecDepth := do let a ← read pure a.maxRecDepth }
Equations
@[inline]
def Lean.Core.liftIOCore {α : Type} (x : IO α) :
Equations
Equations
Equations
  • Lean.Core.instMonadTraceCoreM = { modifyTraceState := fun f => modify fun s => { env := s.env, nextMacroScope := s.nextMacroScope, ngen := s.ngen, traceState := f s.traceState }, getTraceState := do let a ← get pure a.traceState }
Equations
  • Lean.Core.restore b = modify fun s => { env := b.env, nextMacroScope := s.nextMacroScope, ngen := s.ngen, traceState := s.traceState }
@[inline]
Equations
@[inline]
Equations
@[inline]
Equations
instance Lean.Core.instMetaEvalCoreM {α : Type} [inst : Lean.MetaEval α] :
Equations
def Lean.Core.withIncRecDepth {m : TypeType u_1} {α : Type} [inst : Monad m] [inst : MonadControlT Lean.CoreM m] (x : m α) :
m α
Equations
def Lean.Core.checkMaxHeartbeatsCore (moduleName : String) (optionName : Lean.Name) (max : Nat) :
Equations
Equations
def Lean.Core.withCurrHeartbeats {m : TypeType u_1} {α : Type} [inst : Monad m] [inst : MonadControlT Lean.CoreM m] (x : m α) :
m α
Equations
@[inline]
def Lean.catchInternalId {m : Type u_1Type u_2} {α : Type u_1} [inst : Monad m] [inst : MonadExcept Lean.Exception m] (id : Lean.InternalExceptionId) (x : m α) (h : Lean.Exceptionm α) :
m α
Equations
@[inline]
def Lean.catchInternalIds {m : Type u_1Type u_2} {α : Type u_1} [inst : Monad m] [inst : MonadExcept Lean.Exception m] (ids : List Lean.InternalExceptionId) (x : m α) (h : Lean.Exceptionm α) :
m α
Equations