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