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