{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module Language.LSP.Protocol.Internal.Types.SemanticTokensDeltaPartialResult 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.SemanticTokensEdit
import qualified Language.LSP.Protocol.Types.Common
data SemanticTokensDeltaPartialResult = SemanticTokensDeltaPartialResult
{
SemanticTokensDeltaPartialResult -> [SemanticTokensEdit]
_edits :: [Language.LSP.Protocol.Internal.Types.SemanticTokensEdit.SemanticTokensEdit]
}
deriving stock (Int -> SemanticTokensDeltaPartialResult -> ShowS
[SemanticTokensDeltaPartialResult] -> ShowS
SemanticTokensDeltaPartialResult -> String
(Int -> SemanticTokensDeltaPartialResult -> ShowS)
-> (SemanticTokensDeltaPartialResult -> String)
-> ([SemanticTokensDeltaPartialResult] -> ShowS)
-> Show SemanticTokensDeltaPartialResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SemanticTokensDeltaPartialResult -> ShowS
showsPrec :: Int -> SemanticTokensDeltaPartialResult -> ShowS
$cshow :: SemanticTokensDeltaPartialResult -> String
show :: SemanticTokensDeltaPartialResult -> String
$cshowList :: [SemanticTokensDeltaPartialResult] -> ShowS
showList :: [SemanticTokensDeltaPartialResult] -> ShowS
Show, SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool
(SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool)
-> (SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool)
-> Eq SemanticTokensDeltaPartialResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool
== :: SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool
$c/= :: SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool
/= :: SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool
Eq, Eq SemanticTokensDeltaPartialResult
Eq SemanticTokensDeltaPartialResult =>
(SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Ordering)
-> (SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool)
-> (SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool)
-> (SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool)
-> (SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool)
-> (SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult)
-> (SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult)
-> Ord SemanticTokensDeltaPartialResult
SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool
SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Ordering
SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult
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
$ccompare :: SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Ordering
compare :: SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Ordering
$c< :: SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool
< :: SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool
$c<= :: SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool
<= :: SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool
$c> :: SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool
> :: SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool
$c>= :: SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool
>= :: SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult -> Bool
$cmax :: SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult
max :: SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult
$cmin :: SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult
min :: SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult
-> SemanticTokensDeltaPartialResult
Ord, (forall x.
SemanticTokensDeltaPartialResult
-> Rep SemanticTokensDeltaPartialResult x)
-> (forall x.
Rep SemanticTokensDeltaPartialResult x
-> SemanticTokensDeltaPartialResult)
-> Generic SemanticTokensDeltaPartialResult
forall x.
Rep SemanticTokensDeltaPartialResult x
-> SemanticTokensDeltaPartialResult
forall x.
SemanticTokensDeltaPartialResult
-> Rep SemanticTokensDeltaPartialResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SemanticTokensDeltaPartialResult
-> Rep SemanticTokensDeltaPartialResult x
from :: forall x.
SemanticTokensDeltaPartialResult
-> Rep SemanticTokensDeltaPartialResult x
$cto :: forall x.
Rep SemanticTokensDeltaPartialResult x
-> SemanticTokensDeltaPartialResult
to :: forall x.
Rep SemanticTokensDeltaPartialResult x
-> SemanticTokensDeltaPartialResult
Generic)
deriving anyclass (SemanticTokensDeltaPartialResult -> ()
(SemanticTokensDeltaPartialResult -> ())
-> NFData SemanticTokensDeltaPartialResult
forall a. (a -> ()) -> NFData a
$crnf :: SemanticTokensDeltaPartialResult -> ()
rnf :: SemanticTokensDeltaPartialResult -> ()
NFData, Eq SemanticTokensDeltaPartialResult
Eq SemanticTokensDeltaPartialResult =>
(Int -> SemanticTokensDeltaPartialResult -> Int)
-> (SemanticTokensDeltaPartialResult -> Int)
-> Hashable SemanticTokensDeltaPartialResult
Int -> SemanticTokensDeltaPartialResult -> Int
SemanticTokensDeltaPartialResult -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> SemanticTokensDeltaPartialResult -> Int
hashWithSalt :: Int -> SemanticTokensDeltaPartialResult -> Int
$chash :: SemanticTokensDeltaPartialResult -> Int
hash :: SemanticTokensDeltaPartialResult -> Int
Hashable)
deriving (forall ann. SemanticTokensDeltaPartialResult -> Doc ann)
-> (forall ann. [SemanticTokensDeltaPartialResult] -> Doc ann)
-> Pretty SemanticTokensDeltaPartialResult
forall ann. [SemanticTokensDeltaPartialResult] -> Doc ann
forall ann. SemanticTokensDeltaPartialResult -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. SemanticTokensDeltaPartialResult -> Doc ann
pretty :: forall ann. SemanticTokensDeltaPartialResult -> Doc ann
$cprettyList :: forall ann. [SemanticTokensDeltaPartialResult] -> Doc ann
prettyList :: forall ann. [SemanticTokensDeltaPartialResult] -> Doc ann
Pretty via (ViaJSON SemanticTokensDeltaPartialResult)
instance Aeson.ToJSON SemanticTokensDeltaPartialResult where
toJSON :: SemanticTokensDeltaPartialResult -> Value
toJSON (SemanticTokensDeltaPartialResult [SemanticTokensEdit]
arg0) = [Pair] -> Value
Aeson.object ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$ [[Pair]] -> [Pair]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat ([[Pair]] -> [Pair]) -> [[Pair]] -> [Pair]
forall a b. (a -> b) -> a -> b
$ [[Key
"edits" Key -> [SemanticTokensEdit] -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [SemanticTokensEdit]
arg0]]
instance Aeson.FromJSON SemanticTokensDeltaPartialResult where
parseJSON :: Value -> Parser SemanticTokensDeltaPartialResult
parseJSON = String
-> (Object -> Parser SemanticTokensDeltaPartialResult)
-> Value
-> Parser SemanticTokensDeltaPartialResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"SemanticTokensDeltaPartialResult" ((Object -> Parser SemanticTokensDeltaPartialResult)
-> Value -> Parser SemanticTokensDeltaPartialResult)
-> (Object -> Parser SemanticTokensDeltaPartialResult)
-> Value
-> Parser SemanticTokensDeltaPartialResult
forall a b. (a -> b) -> a -> b
$ \Object
arg -> [SemanticTokensEdit] -> SemanticTokensDeltaPartialResult
SemanticTokensDeltaPartialResult ([SemanticTokensEdit] -> SemanticTokensDeltaPartialResult)
-> Parser [SemanticTokensEdit]
-> Parser SemanticTokensDeltaPartialResult
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg Object -> Key -> Parser [SemanticTokensEdit]
forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"edits"