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