Documentation

Lean.Compiler.LCNF.ScopeM

@[inline]

A general abstraction for the idea of a scope in the compiler.

Equations
def Lean.Compiler.LCNF.ScopeM.withBackTrackingScope {m : TypeType u_1} {α : Type} [inst : MonadLiftT Lean.Compiler.LCNF.ScopeM m] [inst : Monad m] [inst : MonadFinally m] (x : m α) :
m α

Execute x but recover the previous scope after doing so.

Equations
def Lean.Compiler.LCNF.ScopeM.withNewScope {m : TypeType u_1} {α : Type} [inst : MonadLiftT Lean.Compiler.LCNF.ScopeM m] [inst : Monad m] [inst : MonadFinally m] (x : m α) :
m α

Clear the current scope for the monadic action x, afterwards continuing with the old one.

Equations

Check whether fvarId is in the current scope, that is, was declared within the current fun declaration that is being processed.

Equations

Add a new FVarId to the current scope.

Equations