Equations
- Lean.Syntax.prettyPrint stx = match Lean.Syntax.reprint (Lean.Syntax.unsetTrailing stx) with | some str => Lean.format (String.toFormat str) | none => Lean.format stx
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
@[inline]
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Elab.addMacroStack
{m : Type → Type}
[inst : Monad m]
[inst : Lean.MonadOptions m]
(msgData : Lean.MessageData)
(macroStack : Lean.Elab.MacroStack)
:
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Elab.checkSyntaxNodeKind
{m : Type → Type}
[inst : Monad m]
[inst : Lean.MonadEnv m]
[inst : Lean.MonadError m]
(k : Lean.Name)
:
Equations
- Lean.Elab.checkSyntaxNodeKind k = do let a ← Lean.getEnv if Lean.Parser.isValidSyntaxNodeKind a k = true then pure k else Lean.throwError (Lean.toMessageData "failed")
def
Lean.Elab.checkSyntaxNodeKindAtNamespaces
{m : Type → Type}
[inst : Monad m]
[inst : Lean.MonadEnv m]
[inst : Lean.MonadError m]
(k : Lean.Name)
:
Equations
- One or more equations did not get rendered due to their size.
- Lean.Elab.checkSyntaxNodeKindAtNamespaces k Lean.Name.anonymous = Lean.Elab.checkSyntaxNodeKind k
- Lean.Elab.checkSyntaxNodeKindAtNamespaces k _fun_discr = Lean.throwError (Lean.toMessageData "failed")
Equations
- Lean.Elab.checkSyntaxNodeKindAtCurrentNamespaces k = do let ctx ← read Lean.Elab.checkSyntaxNodeKindAtNamespaces k ctx.currNamespace
Equations
- One or more equations did not get rendered due to their size.
@[implementedBy _private.Lean.Elab.Util.0.Lean.Elab.evalSyntaxConstantUnsafe]
opaque
Lean.Elab.evalSyntaxConstant
(env : Lean.Environment)
(opts : Lean.Options)
(constName : Lean.Name)
:
Equations
- Lean.Elab.mkMacroAttributeUnsafe = Lean.Elab.mkElabAttribute Lean.Macro `Lean.Elab.macroAttribute `builtinMacro `macro Lean.Name.anonymous `Lean.Macro "macro"
@[implementedBy 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.
- getCurrMacroScope : m Lean.MacroScope
- getNextMacroScope : m Lean.MacroScope
- setNextMacroScope : Lean.MacroScope → m Unit
instance
Lean.Elab.instMonadMacroAdapter
(m : Type → Type)
(n : Type → Type)
[inst : MonadLift m n]
[inst : Lean.Elab.MonadMacroAdapter m]
:
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Elab.liftMacroM
{α : Type}
{m : Type → Type}
[inst : Monad m]
[inst : Lean.Elab.MonadMacroAdapter m]
[inst : Lean.MonadEnv m]
[inst : Lean.MonadRecDepth m]
[inst : Lean.MonadError m]
[inst : Lean.MonadResolveName m]
[inst : Lean.MonadTrace m]
[inst : Lean.MonadOptions m]
[inst : Lean.AddMessageContext m]
(x : Lean.MacroM α)
:
m α
Equations
- One or more equations did not get rendered due to their size.
@[inline]
def
Lean.Elab.adaptMacro
{m : Type → Type}
[inst : Monad m]
[inst : Lean.Elab.MonadMacroAdapter m]
[inst : Lean.MonadEnv m]
[inst : Lean.MonadRecDepth m]
[inst : Lean.MonadError m]
[inst : Lean.MonadResolveName m]
[inst : Lean.MonadTrace m]
[inst : Lean.MonadOptions m]
[inst : Lean.AddMessageContext m]
(x : Lean.Macro)
(stx : Lean.Syntax)
:
Equations
- Lean.Elab.adaptMacro x stx = Lean.Elab.liftMacroM (x stx)
Equations
- One or more equations did not get rendered due to their size.
partial def
Lean.Elab.mkUnusedBaseName.loop
(baseName : Lean.Name)
(currNamespace : Lean.Name)
(idx : Nat)
:
def
Lean.Elab.logException
{m : Type → Type}
[inst : Monad m]
[inst : Lean.MonadLog m]
[inst : Lean.AddMessageContext m]
[inst : MonadLiftT IO m]
(ex : Lean.Exception)
:
m Unit
Equations
- One or more equations did not get rendered due to their size.
@[inline]
def
Lean.Elab.trace
{m : Type → Type}
[inst : Monad m]
[inst : Lean.MonadLog m]
[inst : Lean.AddMessageContext m]
[inst : Lean.MonadOptions m]
(cls : Lean.Name)
(msg : Unit → Lean.MessageData)
:
m Unit
Equations
- Lean.Elab.trace cls msg = do let a ← Lean.getOptions if Lean.checkTraceOption a cls = true then Lean.logTrace cls (msg ()) else pure PUnit.unit
def
Lean.Elab.logDbgTrace
{m : Type → Type}
[inst : Monad m]
[inst : Lean.MonadLog m]
[inst : Lean.AddMessageContext m]
[inst : Lean.MonadOptions m]
(msg : Lean.MessageData)
:
m Unit
Equations
- Lean.Elab.logDbgTrace msg = Lean.Elab.trace `Elab.debug fun x => msg
def
Lean.Elab.nestedExceptionToMessageData
{m : Type → Type}
[inst : Monad m]
[inst : Lean.MonadLog m]
(ex : Lean.Exception)
:
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Elab.throwErrorWithNestedErrors
{m : Type → Type}
{α : Type}
[inst : Lean.MonadError m]
[inst : Monad m]
[inst : Lean.MonadLog m]
(msg : Lean.MessageData)
(exs : Array Lean.Exception)
:
m α
Equations
- One or more equations did not get rendered due to their size.