Documentation

Lean.Widget.TaggedText

inductive Lean.Widget.TaggedText (α : Type u) :
Type u

The minimal structure needed to represent "string with interesting (tagged) substrings". Much like Lean 3 sf, but with indentation already stringified.

Equations
instance Lean.Widget.instBEqTaggedText:
{α : Type u_1} → [inst : BEq α] → BEq (Lean.Widget.TaggedText α)
Equations
  • Lean.Widget.instBEqTaggedText = { beq := [anonymous] }
instance Lean.Widget.instReprTaggedText:
{α : Type u_1} → [inst : Repr α] → Repr (Lean.Widget.TaggedText α)
Equations
  • Lean.Widget.instReprTaggedText = { reprPrec := [anonymous] }
Equations
  • Lean.Widget.instFromJsonTaggedText = { fromJson? := [anonymous] }
instance Lean.Widget.instToJsonTaggedText:
{α : Type u_1} → [inst : Lean.ToJson α] → Lean.ToJson (Lean.Widget.TaggedText α)
Equations
  • Lean.Widget.instToJsonTaggedText = { toJson := [anonymous] }
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.
partial def Lean.Widget.TaggedText.map {α : Type u_1} {β : Type u_2} (f : αβ) :
partial def Lean.Widget.TaggedText.mapM {m : Type u_1Type u_2} {α : Type u_3} {β : Type u_1} [inst : Monad m] (f : αm β) :
partial def Lean.Widget.TaggedText.rewriteM {m : Type u_1Type u_2} {α : Type u_3} {β : Type u_1} [inst : Monad m] (f : αLean.Widget.TaggedText αm (Lean.Widget.TaggedText β)) :

Like mapM but allows rewriting the whole subtree at tag nodes.

Equations
  • One or more equations did not get rendered due to their size.

The output is tagged with (tag, indent) where tag is from the input Format and indent is the indentation level at this point. The latter is used to print sub-trees accurately by passing it again as the indent argument.

Equations

Remove tags, leaving just the pretty-printed string.

Equations