Equations
- stx.prettyPrint = match stx.unsetTrailing.reprint with | some str => Lean.format str.toFormat | none => Lean.format stx
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Two names are from the same lexical scope if their scoping information modulo MacroScopesView.name
is equal.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[reducible, inline]
Instances For
If ref
does not have position information, then try to use macroStack
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Elab.addMacroStack
{m : Type → Type}
[Monad m]
[Lean.MonadOptions m]
(msgData : Lean.MessageData)
(macroStack : Lean.Elab.MacroStack)
:
Equations
- One or more equations did not get rendered due to their size.
- Lean.Elab.addMacroStack msgData [] = do let __do_lift ← Lean.getOptions if (!Lean.Option.get __do_lift Lean.Elab.pp.macroStack) = true then pure msgData else pure msgData
Instances For
def
Lean.Elab.checkSyntaxNodeKind
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
[Lean.MonadError m]
(k : Lake.Name)
:
Equations
- Lean.Elab.checkSyntaxNodeKind k = do let __do_lift ← Lean.getEnv if Lean.Parser.isValidSyntaxNodeKind __do_lift k = true then pure k else Lean.throwError (Lean.toMessageData "failed")
Instances For
def
Lean.Elab.checkSyntaxNodeKindAtNamespaces
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
[Lean.MonadError m]
(k : Lake.Name)
:
Equations
- Lean.Elab.checkSyntaxNodeKindAtNamespaces k (p.str str) = HOrElse.hOrElse (Lean.Elab.checkSyntaxNodeKind (p.str str ++ k)) fun (x : Unit) => Lean.Elab.checkSyntaxNodeKindAtNamespaces k p
- Lean.Elab.checkSyntaxNodeKindAtNamespaces k Lean.Name.anonymous = Lean.Elab.checkSyntaxNodeKind k
- Lean.Elab.checkSyntaxNodeKindAtNamespaces k x = Lean.throwError (Lean.toMessageData "failed")
Instances For
Equations
- Lean.Elab.checkSyntaxNodeKindAtCurrentNamespaces k = do let ctx ← read Lean.Elab.checkSyntaxNodeKindAtNamespaces k ctx.currNamespace
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[implemented_by _private.Lean.Elab.Util.0.Lean.Elab.evalSyntaxConstantUnsafe]
opaque
Lean.Elab.evalSyntaxConstant
(env : Lean.Environment)
(opts : Lean.Options)
(constName : Lake.Name)
:
Instances For
@[implemented_by Lean.Elab.mkMacroAttributeUnsafe]
Try to expand macro at syntax tree root and return macro declaration name and new syntax if successful.
Return none if all macros threw Macro.Exception.unsupportedSyntax
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
- getCurrMacroScope : m Lean.MacroScope
- getNextMacroScope : m Lean.MacroScope
- setNextMacroScope : Lean.MacroScope → m Unit
Instances
@[always_inline]
instance
Lean.Elab.instMonadMacroAdapterOfMonadLift
(m : Type → Type)
(n : Type → Type)
[MonadLift m n]
[Lean.Elab.MonadMacroAdapter m]
:
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Elab.liftMacroM
{m : Type → Type}
{α : Type}
[Monad m]
[Lean.Elab.MonadMacroAdapter m]
[Lean.MonadEnv m]
[Lean.MonadRecDepth m]
[Lean.MonadError m]
[Lean.MonadResolveName m]
[Lean.MonadTrace m]
[Lean.MonadOptions m]
[Lean.AddMessageContext m]
[MonadLiftT IO m]
(x : Lean.MacroM α)
:
m α
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
def
Lean.Elab.adaptMacro
{m : Type → Type}
[Monad m]
[Lean.Elab.MonadMacroAdapter m]
[Lean.MonadEnv m]
[Lean.MonadRecDepth m]
[Lean.MonadError m]
[Lean.MonadResolveName m]
[Lean.MonadTrace m]
[Lean.MonadOptions m]
[Lean.AddMessageContext m]
[MonadLiftT IO m]
(x : Lean.Macro)
(stx : Lean.Syntax)
:
Equations
- Lean.Elab.adaptMacro x stx = Lean.Elab.liftMacroM (x stx)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
partial def
Lean.Elab.mkUnusedBaseName.loop
(baseName : Lake.Name)
(currNamespace : Lake.Name)
(idx : Nat)
:
def
Lean.Elab.logException
{m : Type → Type}
[Monad m]
[Lean.MonadLog m]
[Lean.AddMessageContext m]
[Lean.MonadOptions m]
[MonadLiftT IO m]
(ex : Lean.Exception)
:
m Unit
Equations
- One or more equations did not get rendered due to their size.
- Lean.Elab.logException (Lean.Exception.error ref msg) = Lean.logErrorAt ref msg
Instances For
def
Lean.Elab.withLogging
{m : Type → Type}
[Monad m]
[Lean.MonadLog m]
[MonadExcept Lean.Exception m]
[Lean.AddMessageContext m]
[Lean.MonadOptions m]
[MonadLiftT IO m]
(x : m Unit)
:
m Unit
If x
throws an exception, catch it and turn it into a log message (using logException
).
Equations
- Lean.Elab.withLogging x = tryCatch x fun (ex : Lean.Exception) => Lean.Elab.logException ex
Instances For
def
Lean.Elab.nestedExceptionToMessageData
{m : Type → Type}
[Monad m]
[Lean.MonadLog m]
(ex : Lean.Exception)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Elab.throwErrorWithNestedErrors
{m : Type → Type}
{α : Type}
[Lean.MonadError m]
[Monad m]
[Lean.MonadLog m]
(msg : Lean.MessageData)
(exs : Array Lean.Exception)
:
m α
Equations
- One or more equations did not get rendered due to their size.