Equations
Instances For
def
Lean.withEnv
{m : Type → Type}
{α : Type}
[Monad m]
[MonadFinally m]
[MonadEnv m]
(env : Environment)
(x : m α)
:
m α
Equations
Instances For
@[inline]
def
Lean.withoutModifyingEnv
{m : Type → Type}
[Monad m]
[MonadEnv m]
[MonadFinally m]
{α : Type}
(x : m α)
:
m α
Equations
Instances For
@[inline]
def
Lean.withoutModifyingEnv'
{m : Type → Type}
[Monad m]
[MonadEnv m]
[MonadFinally m]
{α : Type}
(x : m α)
:
m (α × Environment)
Similar to withoutModifyingEnv
, but also returns the updated environment
Equations
Instances For
Equations
Instances For
Equations
Instances For
def
Lean.getAsyncConstInfo
{m : Type → Type}
[Monad m]
[MonadEnv m]
[MonadError m]
(constName : Name)
(skipRealize : Bool := false)
:
Equations
Instances For
def
Lean.mkConstWithLevelParams
{m : Type → Type}
[Monad m]
[MonadEnv m]
[MonadError m]
(constName : Name)
:
m Expr
Equations
Instances For
def
Lean.getConstInfoDefn
{m : Type → Type}
[Monad m]
[MonadEnv m]
[MonadError m]
(constName : Name)
:
Equations
Instances For
def
Lean.getConstInfoInduct
{m : Type → Type}
[Monad m]
[MonadEnv m]
[MonadError m]
(constName : Name)
:
Equations
Instances For
def
Lean.getConstInfoCtor
{m : Type → Type}
[Monad m]
[MonadEnv m]
[MonadError m]
(constName : Name)
:
Equations
Instances For
def
Lean.getConstInfoRec
{m : Type → Type}
[Monad m]
[MonadEnv m]
[MonadError m]
(constName : Name)
:
Equations
Instances For
@[inline]
def
Lean.matchConstStructure
{m : Type → Type}
{α : Type}
[Monad m]
[MonadEnv m]
[MonadError m]
(e : Expr)
(failK : Unit → m α)
(k : InductiveVal → List Level → ConstructorVal → m α)
:
m α
Matches if e
is a constant that is an inductive type with one constructor.
Such types can be used with primitive projections.
See also Lean.matchConstStructLike
for a more restrictive version.
Equations
Instances For
@[inline]
def
Lean.matchConstStructureLike
{m : Type → Type}
{α : Type}
[Monad m]
[MonadEnv m]
[MonadError m]
(e : Expr)
(failK : Unit → m α)
(k : InductiveVal → List Level → ConstructorVal → m α)
:
m α
Matches if e
is a constant that is an non-recursive inductive type with no indices and with one constructor.
Such a type satisfies Lean.isStructureLike
.
See also Lean.matchConstStructure
for a less restrictive version.
Equations
Instances For
unsafe def
Lean.evalConst
{m : Type → Type}
[Monad m]
[MonadEnv m]
[MonadError m]
[MonadOptions m]
(α : Type)
(constName : Name)
:
m α
Equations
Instances For
unsafe def
Lean.evalConstCheck
{m : Type → Type}
[Monad m]
[MonadEnv m]
[MonadError m]
[MonadOptions m]
(α : Type)
(typeName constName : Name)
:
m α
Equations
Instances For
Equations
Instances For
def
Lean.isEnumType
{m : Type → Type}
[Monad m]
[MonadEnv m]
[MonadError m]
(declName : Name)
:
m Bool