chore: use local instance in Lsp.Diagnostics (#5031)

I'm experimenting with changing the signature of `Ord.arrayOrd`; rather
than make a local synonym here, let's make a local instance so it
doesn't interact with the experiments.
This commit is contained in:
Kim Morrison 2024-08-14 15:04:32 +10:00 committed by GitHub
parent 154385fdb9
commit 8c96d213f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -113,8 +113,7 @@ structure DiagnosticWith (α : Type) where
def DiagnosticWith.fullRange (d : DiagnosticWith α) : Range :=
d.fullRange?.getD d.range
local instance [Ord α] : Ord (Array α) := Ord.arrayOrd
attribute [local instance] Ord.arrayOrd in
/-- Restriction of `DiagnosticWith` to properties that are displayed to users in the InfoView. -/
private structure DiagnosticWith.UserVisible (α : Type) where
range : Range