{-# 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
(Int -> WorkspaceFoldersServerCapabilities -> ShowS)
-> (WorkspaceFoldersServerCapabilities -> String)
-> ([WorkspaceFoldersServerCapabilities] -> ShowS)
-> Show WorkspaceFoldersServerCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WorkspaceFoldersServerCapabilities -> ShowS
showsPrec :: Int -> WorkspaceFoldersServerCapabilities -> ShowS
$cshow :: WorkspaceFoldersServerCapabilities -> String
show :: WorkspaceFoldersServerCapabilities -> String
$cshowList :: [WorkspaceFoldersServerCapabilities] -> ShowS
showList :: [WorkspaceFoldersServerCapabilities] -> ShowS
Show, WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities -> Bool
(WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities -> Bool)
-> (WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities -> Bool)
-> Eq WorkspaceFoldersServerCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities -> Bool
== :: WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities -> Bool
$c/= :: WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities -> Bool
/= :: WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities -> Bool
Eq, Eq WorkspaceFoldersServerCapabilities
Eq WorkspaceFoldersServerCapabilities =>
(WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities -> Ordering)
-> (WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities -> Bool)
-> (WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities -> Bool)
-> (WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities -> Bool)
-> (WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities -> Bool)
-> (WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities)
-> (WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities)
-> Ord 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
$ccompare :: WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities -> Ordering
compare :: WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities -> Ordering
$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
>= :: WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities -> Bool
$cmax :: WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities
max :: WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities
$cmin :: WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities
min :: WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities
-> WorkspaceFoldersServerCapabilities
Ord, (forall x.
WorkspaceFoldersServerCapabilities
-> Rep WorkspaceFoldersServerCapabilities x)
-> (forall x.
Rep WorkspaceFoldersServerCapabilities x
-> WorkspaceFoldersServerCapabilities)
-> Generic WorkspaceFoldersServerCapabilities
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
$cfrom :: forall x.
WorkspaceFoldersServerCapabilities
-> Rep WorkspaceFoldersServerCapabilities x
from :: forall x.
WorkspaceFoldersServerCapabilities
-> Rep WorkspaceFoldersServerCapabilities x
$cto :: forall x.
Rep WorkspaceFoldersServerCapabilities x
-> WorkspaceFoldersServerCapabilities
to :: forall x.
Rep WorkspaceFoldersServerCapabilities x
-> WorkspaceFoldersServerCapabilities
Generic)
deriving anyclass (WorkspaceFoldersServerCapabilities -> ()
(WorkspaceFoldersServerCapabilities -> ())
-> NFData WorkspaceFoldersServerCapabilities
forall a. (a -> ()) -> NFData a
$crnf :: WorkspaceFoldersServerCapabilities -> ()
rnf :: WorkspaceFoldersServerCapabilities -> ()
NFData, Eq WorkspaceFoldersServerCapabilities
Eq WorkspaceFoldersServerCapabilities =>
(Int -> WorkspaceFoldersServerCapabilities -> Int)
-> (WorkspaceFoldersServerCapabilities -> Int)
-> Hashable WorkspaceFoldersServerCapabilities
Int -> WorkspaceFoldersServerCapabilities -> Int
WorkspaceFoldersServerCapabilities -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> WorkspaceFoldersServerCapabilities -> Int
hashWithSalt :: Int -> WorkspaceFoldersServerCapabilities -> Int
$chash :: WorkspaceFoldersServerCapabilities -> Int
hash :: WorkspaceFoldersServerCapabilities -> Int
Hashable)
deriving (forall ann. WorkspaceFoldersServerCapabilities -> Doc ann)
-> (forall ann. [WorkspaceFoldersServerCapabilities] -> Doc ann)
-> Pretty WorkspaceFoldersServerCapabilities
forall ann. [WorkspaceFoldersServerCapabilities] -> Doc ann
forall ann. WorkspaceFoldersServerCapabilities -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. WorkspaceFoldersServerCapabilities -> Doc ann
pretty :: forall ann. WorkspaceFoldersServerCapabilities -> Doc ann
$cprettyList :: forall ann. [WorkspaceFoldersServerCapabilities] -> Doc ann
prettyList :: 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 ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$ [[Pair]] -> [Pair]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat ([[Pair]] -> [Pair]) -> [[Pair]] -> [Pair]
forall a b. (a -> b) -> a -> b
$ [String
"supported" String -> Maybe Bool -> [Pair]
forall e kv v.
(KeyValue e kv, ToJSON v) =>
String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg0
,String
"changeNotifications" String -> Maybe (Text |? Bool) -> [Pair]
forall e kv v.
(KeyValue e 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 = String
-> (Object -> Parser WorkspaceFoldersServerCapabilities)
-> Value
-> Parser WorkspaceFoldersServerCapabilities
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"WorkspaceFoldersServerCapabilities" ((Object -> Parser WorkspaceFoldersServerCapabilities)
-> Value -> Parser WorkspaceFoldersServerCapabilities)
-> (Object -> Parser WorkspaceFoldersServerCapabilities)
-> Value
-> Parser WorkspaceFoldersServerCapabilities
forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool
-> Maybe (Text |? Bool) -> WorkspaceFoldersServerCapabilities
WorkspaceFoldersServerCapabilities (Maybe Bool
-> Maybe (Text |? Bool) -> WorkspaceFoldersServerCapabilities)
-> Parser (Maybe Bool)
-> Parser
(Maybe (Text |? Bool) -> WorkspaceFoldersServerCapabilities)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg Object -> Key -> Parser (Maybe Bool)
forall v. FromJSON v => Object -> Key -> Parser (Maybe v)
Language.LSP.Protocol.Types.Common..:!? Key
"supported" Parser (Maybe (Text |? Bool) -> WorkspaceFoldersServerCapabilities)
-> Parser (Maybe (Text |? Bool))
-> Parser WorkspaceFoldersServerCapabilities
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
arg Object -> Key -> Parser (Maybe (Text |? Bool))
forall v. FromJSON v => Object -> Key -> Parser (Maybe v)
Language.LSP.Protocol.Types.Common..:!? Key
"changeNotifications"