feat(library/init/lean/position): HasToString instance
This commit is contained in:
parent
113ab4824f
commit
fa96fb8deb
1 changed files with 3 additions and 0 deletions
|
|
@ -26,6 +26,9 @@ protected def lt : Position → Position → Bool
|
|||
instance : HasFormat Position :=
|
||||
⟨fun ⟨l, c⟩ => "⟨" ++ fmt l ++ ", " ++ fmt c ++ "⟩"⟩
|
||||
|
||||
instance : HasToString Position :=
|
||||
⟨fun ⟨l, c⟩ => "⟨" ++ toString l ++ ", " ++ toString c ++ "⟩"⟩
|
||||
|
||||
instance : Inhabited Position := ⟨⟨1, 0⟩⟩
|
||||
end Position
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue