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