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