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