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