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