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