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