Equations
- instToFormat = { format := Std.Format.text ∘ toString }
Equations
- List.format x = match x with | [] => Std.Format.text "[]" | xs => Lean.Format.sbracket (Lean.Format.joinSep xs (Std.Format.text "," ++ Lean.Format.line))
Instances For
Equations
- instToFormatList = { format := List.format }
Equations
- instToFormatArray = { format := fun a => Std.Format.text "#" ++ Std.format (Array.toList a) }
Equations
- Option.format x = match x with | none => Std.Format.text "none" | some a => Std.Format.text "some " ++ Std.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.paren (Std.format a ++ Std.Format.text "," ++ Lean.Format.line ++ Std.format b) }
Equations
- String.toFormat s = Lean.Format.joinSep (String.splitOn s "\n") Lean.Format.line
Instances For
Equations
- instToFormatPos = { format := fun p => Std.format p.byteIdx }