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
115
115
Language.LSP.Protocol.Message.Registration
116
116
Language.LSP.Protocol.Message.Types
117
117
Language.LSP.Protocol.Types.Common
118
- Language.LSP.Protocol.Types.CustomInstances
119
118
Language.LSP.Protocol.Types.Edit
120
119
Language.LSP.Protocol.Types.Lens
121
120
Language.LSP.Protocol.Types.Location
122
121
Language.LSP.Protocol.Types.LspEnum
123
122
Language.LSP.Protocol.Types.MarkupContent
123
+ Language.LSP.Protocol.Types.Orphans
124
124
Language.LSP.Protocol.Types.Progress
125
125
Language.LSP.Protocol.Types.SemanticTokens
126
126
Language.LSP.Protocol.Types.Singletons
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ module Language.LSP.Protocol.Types (
22
22
, module SemanticTokens
23
23
-- * Main LSP types and functions
24
24
, module Generated
25
- -- ** Custom instances for the generated types
26
- , module CustomInstances
25
+ -- ** Orphan instances for the generated types
26
+ , module Orphans
27
27
) where
28
28
29
29
import Language.LSP.Protocol.Internal.Types as Generated
@@ -37,4 +37,4 @@ import Language.LSP.Protocol.Types.Singletons as Singletons
37
37
import Language.LSP.Protocol.Types.Uri as Uri
38
38
import Language.LSP.Protocol.Types.Uri.OsPath as Uri
39
39
import 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
128
128
maybeToNull (Just x) = InL x
129
129
maybeToNull Nothing = InR Null
130
130
131
+ -- This is equivalent to the instance for 'Maybe s'
131
132
instance Semigroup s => Semigroup (s |? Null ) where
132
133
InL x <> InL y = InL (x <> y)
133
134
InL x <> InR _ = InL x
Original file line number Diff line number Diff line change 1
1
{-# OPTIONS_GHC -Wno-orphans #-}
2
- module Language.LSP.Protocol.Types.CustomInstances where
2
+ module Language.LSP.Protocol.Types.Orphans where
3
3
4
4
import Language.LSP.Protocol.Internal.Types
5
5
import Data.Default
6
- import Data.Hashable
7
6
import Data.Semigroup ()
8
7
9
8
instance Semigroup WorkspaceEdit where
10
9
(WorkspaceEdit a b c) <> (WorkspaceEdit a' b' c') = WorkspaceEdit (a <> a') (b <> b') (c <> c')
11
10
instance Monoid WorkspaceEdit where
12
11
mempty = WorkspaceEdit Nothing Nothing Nothing
13
12
14
- instance Hashable Location
15
- instance Hashable Range
16
- instance Hashable Position
17
-
18
13
instance 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
21
15
instance Default WorkspaceClientCapabilities
22
16
instance Default TextDocumentClientCapabilities
23
17
instance Default NotebookDocumentClientCapabilities where
24
- def = NotebookDocumentClientCapabilities def
25
18
instance Default NotebookDocumentSyncClientCapabilities
26
19
instance Default WindowClientCapabilities
27
20
instance Default GeneralClientCapabilities
You can’t perform that action at this time.
0 commit comments