Equations
- Lean.setEnv env = Lean.modifyEnv fun x => env
Instances For
def
Lean.withEnv
{m : Type → Type}
{α : Type}
[Monad m]
[MonadFinally m]
[Lean.MonadEnv m]
(env : Lean.Environment)
(x : m α)
:
m α
Equations
- Lean.withEnv env x = do let saved ← Lean.getEnv tryFinally (do Lean.setEnv env x) (Lean.setEnv saved)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.isRecCore env declName = match Lean.Environment.find? env declName with | some (Lean.ConstantInfo.recInfo val) => true | x => false
Instances For
Equations
- Lean.isRec declName = do let __do_lift ← Lean.getEnv pure (Lean.isRecCore __do_lift declName)
Instances For
@[inline]
def
Lean.withoutModifyingEnv
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
[MonadFinally m]
{α : Type}
(x : m α)
:
m α
Equations
- Lean.withoutModifyingEnv x = do let env ← Lean.getEnv tryFinally x (Lean.setEnv env)
Instances For
@[inline]
def
Lean.withoutModifyingEnv'
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
[MonadFinally m]
{α : Type}
(x : m α)
:
m (α × Lean.Environment)
Similar to withoutModifyingEnv
, but also returns the updated environment
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
def
Lean.matchConst
{m : Type → Type}
{α : Type}
[Monad m]
[Lean.MonadEnv m]
(e : Lean.Expr)
(failK : Unit → m α)
(k : Lean.ConstantInfo → List Lean.Level → m α)
:
m α
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
def
Lean.matchConstInduct
{m : Type → Type}
{α : Type}
[Monad m]
[Lean.MonadEnv m]
(e : Lean.Expr)
(failK : Unit → m α)
(k : Lean.InductiveVal → List Lean.Level → m α)
:
m α
Equations
- Lean.matchConstInduct e failK k = Lean.matchConst e failK fun cinfo us => match cinfo with | Lean.ConstantInfo.inductInfo val => k val us | x => failK ()
Instances For
@[inline]
def
Lean.matchConstCtor
{m : Type → Type}
{α : Type}
[Monad m]
[Lean.MonadEnv m]
(e : Lean.Expr)
(failK : Unit → m α)
(k : Lean.ConstructorVal → List Lean.Level → m α)
:
m α
Equations
- Lean.matchConstCtor e failK k = Lean.matchConst e failK fun cinfo us => match cinfo with | Lean.ConstantInfo.ctorInfo val => k val us | x => failK ()
Instances For
@[inline]
def
Lean.matchConstRec
{m : Type → Type}
{α : Type}
[Monad m]
[Lean.MonadEnv m]
(e : Lean.Expr)
(failK : Unit → m α)
(k : Lean.RecursorVal → List Lean.Level → m α)
:
m α
Equations
- Lean.matchConstRec e failK k = Lean.matchConst e failK fun cinfo us => match cinfo with | Lean.ConstantInfo.recInfo val => k val us | x => failK ()
Instances For
Equations
- Lean.hasConst constName = do let __do_lift ← Lean.getEnv pure (Lean.Environment.contains __do_lift constName)
Instances For
def
Lean.mkAuxName
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
(baseName : Lake.Name)
(idx : Nat)
:
Equations
- Lean.mkAuxName baseName idx = do let __do_lift ← Lean.getEnv pure (Lean.mkAuxNameAux __do_lift baseName idx)
Instances For
def
Lean.getConstInfo
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
[Lean.MonadError m]
(constName : Lake.Name)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.mkConstWithLevelParams
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
[Lean.MonadError m]
(constName : Lake.Name)
:
Equations
- Lean.mkConstWithLevelParams constName = do let info ← Lean.getConstInfo constName pure (Lean.mkConst constName (List.map Lean.mkLevelParam (Lean.ConstantInfo.levelParams info)))
Instances For
def
Lean.getConstInfoDefn
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
[Lean.MonadError m]
(constName : Lake.Name)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.getConstInfoInduct
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
[Lean.MonadError m]
(constName : Lake.Name)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.getConstInfoCtor
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
[Lean.MonadError m]
(constName : Lake.Name)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.getConstInfoRec
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
[Lean.MonadError m]
(constName : Lake.Name)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
def
Lean.matchConstStruct
{m : Type → Type}
{α : Type}
[Monad m]
[Lean.MonadEnv m]
[Lean.MonadError m]
(e : Lean.Expr)
(failK : Unit → m α)
(k : Lean.InductiveVal → List Lean.Level → Lean.ConstructorVal → m α)
:
m α
Equations
- One or more equations did not get rendered due to their size.
Instances For
unsafe def
Lean.evalConst
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
[Lean.MonadError m]
[Lean.MonadOptions m]
(α : Type)
(constName : Lake.Name)
:
m α
Equations
- Lean.evalConst α constName = do let __do_lift ← Lean.getEnv let __do_lift_1 ← Lean.getOptions Lean.ofExcept (Lean.Environment.evalConst α __do_lift __do_lift_1 constName)
Instances For
unsafe def
Lean.evalConstCheck
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
[Lean.MonadError m]
[Lean.MonadOptions m]
(α : Type)
(typeName : Lake.Name)
(constName : Lake.Name)
:
m α
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.findModuleOf?
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
[Lean.MonadError m]
(declName : Lake.Name)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.isEnumType
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
[Lean.MonadError m]
(declName : Lake.Name)
:
m Bool
Equations
- One or more equations did not get rendered due to their size.