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