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