0 | module Language.LSP.Message.Location
4 | import Language.LSP.Message.Derive
5 | import Language.LSP.Message.URI
6 | import Language.LSP.Message.Utils
7 | import Language.Reflection
10 | %language ElabReflection
15 | record Position where
16 | constructor MkPosition
19 | %runElab deriveJSON defaultOpts `{Position
}
23 | (MkPosition line1 char1) == (MkPosition line2 char2) = line1 == line2 && char1 == char2
31 | %runElab deriveJSON defaultOpts `{Range
}
35 | (MkRange start1 end1) == (MkRange start2 end2) = start1 == start2 && end1 == end2
39 | record Location where
40 | constructor MkLocation
43 | %runElab deriveJSON defaultOpts `{Location
}
47 | (MkLocation uri1 range1) == (MkLocation uri2 range2) = uri1 == uri2 && range1 == range2
51 | record LocationLink where
52 | constructor MkLocationLink
53 | originSelectionRange : Maybe Range
56 | targetSelectionRange : Range
57 | %runElab deriveJSON defaultOpts `{LocationLink
}