@[instance 100]
Equations
- instToFormatOfToString = { format := Std.Format.text ∘ toString }
Equations
- [].format = Std.Format.text "[]"
- x.format = (Lean.Format.joinSep x (Std.Format.text "," ++ Lean.Format.line)).sbracket
Instances For
Equations
- instToFormatList = { format := List.format }
Equations
- instToFormatArray = { format := fun (a : Array α) => Std.Format.text "#" ++ Lean.format a.toList }
Equations
- none.format = Std.Format.text "none"
- (some a).format = Std.Format.text "some " ++ Lean.format a
Instances For
Equations
- instToFormatOption = { format := Option.format }
instance
instToFormatProd
{α : Type u}
{β : Type v}
[Lean.ToFormat α]
[Lean.ToFormat β]
:
Lean.ToFormat (α × β)
Equations
- instToFormatProd = { format := fun (x : α × β) => match x with | (a, b) => (Lean.format a ++ Std.Format.text "," ++ Lean.Format.line ++ Lean.format b).paren }
Equations
- s.toFormat = Lean.Format.joinSep (s.splitOn "\n") Lean.Format.line
Instances For
Equations
- instToFormatPos = { format := fun (p : String.Pos) => Lean.format p.byteIdx }