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