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