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