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