File tree Expand file tree Collapse file tree 4 files changed +7
-13
lines changed
src/Language/LSP/Protocol Expand file tree Collapse file tree 4 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -115,12 +115,12 @@ library
115115 Language.LSP.Protocol.Message.Registration
116116 Language.LSP.Protocol.Message.Types
117117 Language.LSP.Protocol.Types.Common
118- Language.LSP.Protocol.Types.CustomInstances
119118 Language.LSP.Protocol.Types.Edit
120119 Language.LSP.Protocol.Types.Lens
121120 Language.LSP.Protocol.Types.Location
122121 Language.LSP.Protocol.Types.LspEnum
123122 Language.LSP.Protocol.Types.MarkupContent
123+ Language.LSP.Protocol.Types.Orphans
124124 Language.LSP.Protocol.Types.Progress
125125 Language.LSP.Protocol.Types.SemanticTokens
126126 Language.LSP.Protocol.Types.Singletons
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ module Language.LSP.Protocol.Types (
2222 , module SemanticTokens
2323 -- * Main LSP types and functions
2424 , module Generated
25- -- ** Custom instances for the generated types
26- , module CustomInstances
25+ -- ** Orphan instances for the generated types
26+ , module Orphans
2727 ) where
2828
2929import Language.LSP.Protocol.Internal.Types as Generated
@@ -37,4 +37,4 @@ import Language.LSP.Protocol.Types.Singletons as Singletons
3737import Language.LSP.Protocol.Types.Uri as Uri
3838import Language.LSP.Protocol.Types.Uri.OsPath as Uri
3939import Language.LSP.Protocol.Types.Edit as Edits
40- import Language.LSP.Protocol.Types.CustomInstances as CustomInstances
40+ import Language.LSP.Protocol.Types.Orphans as Orphans
Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ maybeToNull :: Maybe a -> a |? Null
128128maybeToNull (Just x) = InL x
129129maybeToNull Nothing = InR Null
130130
131+ -- This is equivalent to the instance for 'Maybe s'
131132instance Semigroup s => Semigroup (s |? Null ) where
132133 InL x <> InL y = InL (x <> y)
133134 InL x <> InR _ = InL x
Original file line number Diff line number Diff line change 11{-# OPTIONS_GHC -Wno-orphans #-}
2- module Language.LSP.Protocol.Types.CustomInstances where
2+ module Language.LSP.Protocol.Types.Orphans where
33
44import Language.LSP.Protocol.Internal.Types
55import Data.Default
6- import Data.Hashable
76import Data.Semigroup ()
87
98instance Semigroup WorkspaceEdit where
109 (WorkspaceEdit a b c) <> (WorkspaceEdit a' b' c') = WorkspaceEdit (a <> a') (b <> b') (c <> c')
1110instance Monoid WorkspaceEdit where
1211 mempty = WorkspaceEdit Nothing Nothing Nothing
1312
14- instance Hashable Location
15- instance Hashable Range
16- instance Hashable Position
17-
1813instance Default ClientCapabilities where
19- def = ClientCapabilities (Just def) (Just def) (Just def) (Just def) (Just def) Nothing
20-
14+ def = ClientCapabilities def def def def def Nothing
2115instance Default WorkspaceClientCapabilities
2216instance Default TextDocumentClientCapabilities
2317instance Default NotebookDocumentClientCapabilities where
24- def = NotebookDocumentClientCapabilities def
2518instance Default NotebookDocumentSyncClientCapabilities
2619instance Default WindowClientCapabilities
2720instance Default GeneralClientCapabilities
You can’t perform that action at this time.
0 commit comments