Documentation

Lean.Widget.TaggedText

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

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

Instances For
    Equations
      Instances For
        partial def Lean.Widget.instBEqTaggedText.beq {α✝ : Type u_1} [BEq α✝] :
        TaggedText α✝TaggedText α✝Bool
        instance Lean.Widget.instBEqTaggedText {α✝ : Type u_1} [BEq α✝] :
        BEq (TaggedText α✝)
        Equations
          instance Lean.Widget.instReprTaggedText {α✝ : Type u_1} [Repr α✝] :
          Equations
            partial def Lean.Widget.instReprTaggedText.repr {α✝ : Type u_1} [Repr α✝] :
            TaggedText α✝NatFormat
            Equations
              partial def Lean.Widget.instToJsonTaggedText.toJson {α✝ : Type u_1} [ToJson α✝] :
              TaggedText α✝Json
              instance Lean.Widget.instToJsonTaggedText {α✝ : Type u_1} [ToJson α✝] :
              Equations
                Equations
                  Instances For
                    def Lean.Widget.TaggedText.appendTag {α : Type u_1} (acc : TaggedText α) (t₀ : α) (a₀ : TaggedText α) :
                    Equations
                      Instances For
                        partial def Lean.Widget.TaggedText.map {α : Type u_1} {β : Type u_2} (f : αβ) :
                        partial def Lean.Widget.TaggedText.mapM {m : Type u_1 → Type u_2} {α : Type u_3} {β : Type u_1} [Monad m] (f : αm β) :
                        TaggedText αm (TaggedText β)
                        partial def Lean.Widget.TaggedText.forM {m : TypeType u_1} {α : Type u_2} [Monad m] (f : αTaggedText αm Unit) :
                        TaggedText αm Unit
                        partial def Lean.Widget.TaggedText.rewrite {α : Type u_1} {β : Type u_2} (f : αTaggedText αTaggedText β) :
                        partial def Lean.Widget.TaggedText.rewriteM {m : Type u_1 → Type u_2} {α : Type u_3} {β : Type u_1} [Monad m] (f : αTaggedText αm (TaggedText β)) :
                        TaggedText αm (TaggedText β)

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

                        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
                          Instances For

                            Remove tags, leaving just the pretty-printed string.

                            Equations
                              Instances For