Equations
- stx.prettyPrint = match stx.unsetTrailing.reprint with | some str => Std.format str.toFormat | none => Std.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
- a.equalScope b = (a.scopes == b.scopes && a.mainModule == b.mainModule && a.imported == b.imported)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
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
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
Equations
- Lean.Elab.checkSyntaxNodeKindAtNamespaces k (p.str str) = (Lean.Elab.checkSyntaxNodeKind (p.str str ++ k) <|> 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
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Elab.mkMacroAttributeUnsafe ref = Lean.Elab.mkElabAttribute Lean.Macro `builtin_macro `macro Lean.Name.anonymous `Lean.Macro "macro" ref
Instances For
Registers a macro expander for a given syntax node kind.
A macro expander should have type Lean.Macro
(which is Lean.Syntax → Lean.MacroM Lean.Syntax
),
i.e. should take syntax of the given syntax node kind as a parameter and produce different syntax
in the same syntax category.
The macro_rules
and macro
commands should usually be preferred over using this attribute
directly.
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 MacroScope
- getNextMacroScope : m MacroScope
- setNextMacroScope : MacroScope → m Unit
Instances
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.
Instances For
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
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
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
Equations
- One or more equations did not get rendered due to their size.