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