{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module Language.LSP.Protocol.Internal.Types.SemanticTokensRangeParams where
import Control.DeepSeq
import Data.Hashable
import GHC.Generics
import Language.LSP.Protocol.Utils.Misc
import Prettyprinter
import qualified Data.Aeson as Aeson
import qualified Data.Row.Aeson as Aeson
import qualified Data.Row.Hashable as Hashable
import qualified Language.LSP.Protocol.Internal.Types.ProgressToken
import qualified Language.LSP.Protocol.Internal.Types.Range
import qualified Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier
import qualified Language.LSP.Protocol.Types.Common
data SemanticTokensRangeParams = SemanticTokensRangeParams
{
SemanticTokensRangeParams -> Maybe ProgressToken
_workDoneToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)
,
SemanticTokensRangeParams -> Maybe ProgressToken
_partialResultToken :: (Maybe Language.LSP.Protocol.Internal.Types.ProgressToken.ProgressToken)
,
SemanticTokensRangeParams -> TextDocumentIdentifier
_textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentIdentifier.TextDocumentIdentifier
,
SemanticTokensRangeParams -> Range
_range :: Language.LSP.Protocol.Internal.Types.Range.Range
}
deriving stock (Int -> SemanticTokensRangeParams -> ShowS
[SemanticTokensRangeParams] -> ShowS
SemanticTokensRangeParams -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SemanticTokensRangeParams] -> ShowS
$cshowList :: [SemanticTokensRangeParams] -> ShowS
show :: SemanticTokensRangeParams -> String
$cshow :: SemanticTokensRangeParams -> String
showsPrec :: Int -> SemanticTokensRangeParams -> ShowS
$cshowsPrec :: Int -> SemanticTokensRangeParams -> ShowS
Show, SemanticTokensRangeParams -> SemanticTokensRangeParams -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SemanticTokensRangeParams -> SemanticTokensRangeParams -> Bool
$c/= :: SemanticTokensRangeParams -> SemanticTokensRangeParams -> Bool
== :: SemanticTokensRangeParams -> SemanticTokensRangeParams -> Bool
$c== :: SemanticTokensRangeParams -> SemanticTokensRangeParams -> Bool
Eq, Eq SemanticTokensRangeParams
SemanticTokensRangeParams -> SemanticTokensRangeParams -> Bool
SemanticTokensRangeParams -> SemanticTokensRangeParams -> Ordering
SemanticTokensRangeParams
-> SemanticTokensRangeParams -> SemanticTokensRangeParams
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: SemanticTokensRangeParams
-> SemanticTokensRangeParams -> SemanticTokensRangeParams
$cmin :: SemanticTokensRangeParams
-> SemanticTokensRangeParams -> SemanticTokensRangeParams
max :: SemanticTokensRangeParams
-> SemanticTokensRangeParams -> SemanticTokensRangeParams
$cmax :: SemanticTokensRangeParams
-> SemanticTokensRangeParams -> SemanticTokensRangeParams
>= :: SemanticTokensRangeParams -> SemanticTokensRangeParams -> Bool
$c>= :: SemanticTokensRangeParams -> SemanticTokensRangeParams -> Bool
> :: SemanticTokensRangeParams -> SemanticTokensRangeParams -> Bool
$c> :: SemanticTokensRangeParams -> SemanticTokensRangeParams -> Bool
<= :: SemanticTokensRangeParams -> SemanticTokensRangeParams -> Bool
$c<= :: SemanticTokensRangeParams -> SemanticTokensRangeParams -> Bool
< :: SemanticTokensRangeParams -> SemanticTokensRangeParams -> Bool
$c< :: SemanticTokensRangeParams -> SemanticTokensRangeParams -> Bool
compare :: SemanticTokensRangeParams -> SemanticTokensRangeParams -> Ordering
$ccompare :: SemanticTokensRangeParams -> SemanticTokensRangeParams -> Ordering
Ord, forall x.
Rep SemanticTokensRangeParams x -> SemanticTokensRangeParams
forall x.
SemanticTokensRangeParams -> Rep SemanticTokensRangeParams x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SemanticTokensRangeParams x -> SemanticTokensRangeParams
$cfrom :: forall x.
SemanticTokensRangeParams -> Rep SemanticTokensRangeParams x
Generic)
deriving anyclass (SemanticTokensRangeParams -> ()
forall a. (a -> ()) -> NFData a
rnf :: SemanticTokensRangeParams -> ()
$crnf :: SemanticTokensRangeParams -> ()
NFData, Eq SemanticTokensRangeParams
Int -> SemanticTokensRangeParams -> Int
SemanticTokensRangeParams -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: SemanticTokensRangeParams -> Int
$chash :: SemanticTokensRangeParams -> Int
hashWithSalt :: Int -> SemanticTokensRangeParams -> Int
$chashWithSalt :: Int -> SemanticTokensRangeParams -> Int
Hashable)
deriving forall ann. [SemanticTokensRangeParams] -> Doc ann
forall ann. SemanticTokensRangeParams -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [SemanticTokensRangeParams] -> Doc ann
$cprettyList :: forall ann. [SemanticTokensRangeParams] -> Doc ann
pretty :: forall ann. SemanticTokensRangeParams -> Doc ann
$cpretty :: forall ann. SemanticTokensRangeParams -> Doc ann
Pretty via (ViaJSON SemanticTokensRangeParams)
instance Aeson.ToJSON SemanticTokensRangeParams where
toJSON :: SemanticTokensRangeParams -> Value
toJSON (SemanticTokensRangeParams Maybe ProgressToken
arg0 Maybe ProgressToken
arg1 TextDocumentIdentifier
arg2 Range
arg3) = [Pair] -> Value
Aeson.object forall a b. (a -> b) -> a -> b
$ forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat forall a b. (a -> b) -> a -> b
$ [String
"workDoneToken" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe ProgressToken
arg0
,String
"partialResultToken" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe ProgressToken
arg1
,[Key
"textDocument" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= TextDocumentIdentifier
arg2]
,[Key
"range" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= Range
arg3]]
instance Aeson.FromJSON SemanticTokensRangeParams where
parseJSON :: Value -> Parser SemanticTokensRangeParams
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"SemanticTokensRangeParams" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe ProgressToken
-> Maybe ProgressToken
-> TextDocumentIdentifier
-> Range
-> SemanticTokensRangeParams
SemanticTokensRangeParams forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Aeson..:! Key
"workDoneToken" forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
arg forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Aeson..:! Key
"partialResultToken" forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
arg forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"textDocument" forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
arg forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"range"