{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module Language.LSP.Protocol.Internal.Types.FoldingRangeClientCapabilities 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 as Row
import qualified Data.Row.Aeson as Aeson
import qualified Data.Row.Hashable as Hashable
import qualified Language.LSP.Protocol.Internal.Types.FoldingRangeKind
import qualified Language.LSP.Protocol.Types.Common
data FoldingRangeClientCapabilities = FoldingRangeClientCapabilities
{
FoldingRangeClientCapabilities -> Maybe Bool
_dynamicRegistration :: (Maybe Bool)
,
FoldingRangeClientCapabilities -> Maybe UInt
_rangeLimit :: (Maybe Language.LSP.Protocol.Types.Common.UInt)
,
FoldingRangeClientCapabilities -> Maybe Bool
_lineFoldingOnly :: (Maybe Bool)
,
FoldingRangeClientCapabilities
-> Maybe
(Rec
(Extend "valueSet" (Maybe [FoldingRangeKind]) ('R '[]) .+ 'R '[]))
_foldingRangeKind :: (Maybe (Row.Rec ("valueSet" Row..== (Maybe [Language.LSP.Protocol.Internal.Types.FoldingRangeKind.FoldingRangeKind]) Row..+ Row.Empty)))
,
FoldingRangeClientCapabilities
-> Maybe
(Rec (Extend "collapsedText" (Maybe Bool) ('R '[]) .+ 'R '[]))
_foldingRange :: (Maybe (Row.Rec ("collapsedText" Row..== (Maybe Bool) Row..+ Row.Empty)))
}
deriving stock (Int -> FoldingRangeClientCapabilities -> ShowS
[FoldingRangeClientCapabilities] -> ShowS
FoldingRangeClientCapabilities -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FoldingRangeClientCapabilities] -> ShowS
$cshowList :: [FoldingRangeClientCapabilities] -> ShowS
show :: FoldingRangeClientCapabilities -> String
$cshow :: FoldingRangeClientCapabilities -> String
showsPrec :: Int -> FoldingRangeClientCapabilities -> ShowS
$cshowsPrec :: Int -> FoldingRangeClientCapabilities -> ShowS
Show, FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> Bool
$c/= :: FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> Bool
== :: FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> Bool
$c== :: FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> Bool
Eq, Eq FoldingRangeClientCapabilities
FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> Bool
FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> Ordering
FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> FoldingRangeClientCapabilities
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 :: FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> FoldingRangeClientCapabilities
$cmin :: FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> FoldingRangeClientCapabilities
max :: FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> FoldingRangeClientCapabilities
$cmax :: FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> FoldingRangeClientCapabilities
>= :: FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> Bool
$c>= :: FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> Bool
> :: FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> Bool
$c> :: FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> Bool
<= :: FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> Bool
$c<= :: FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> Bool
< :: FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> Bool
$c< :: FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> Bool
compare :: FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> Ordering
$ccompare :: FoldingRangeClientCapabilities
-> FoldingRangeClientCapabilities -> Ordering
Ord, forall x.
Rep FoldingRangeClientCapabilities x
-> FoldingRangeClientCapabilities
forall x.
FoldingRangeClientCapabilities
-> Rep FoldingRangeClientCapabilities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FoldingRangeClientCapabilities x
-> FoldingRangeClientCapabilities
$cfrom :: forall x.
FoldingRangeClientCapabilities
-> Rep FoldingRangeClientCapabilities x
Generic)
deriving anyclass (FoldingRangeClientCapabilities -> ()
forall a. (a -> ()) -> NFData a
rnf :: FoldingRangeClientCapabilities -> ()
$crnf :: FoldingRangeClientCapabilities -> ()
NFData, Eq FoldingRangeClientCapabilities
Int -> FoldingRangeClientCapabilities -> Int
FoldingRangeClientCapabilities -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: FoldingRangeClientCapabilities -> Int
$chash :: FoldingRangeClientCapabilities -> Int
hashWithSalt :: Int -> FoldingRangeClientCapabilities -> Int
$chashWithSalt :: Int -> FoldingRangeClientCapabilities -> Int
Hashable)
deriving forall ann. [FoldingRangeClientCapabilities] -> Doc ann
forall ann. FoldingRangeClientCapabilities -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [FoldingRangeClientCapabilities] -> Doc ann
$cprettyList :: forall ann. [FoldingRangeClientCapabilities] -> Doc ann
pretty :: forall ann. FoldingRangeClientCapabilities -> Doc ann
$cpretty :: forall ann. FoldingRangeClientCapabilities -> Doc ann
Pretty via (ViaJSON FoldingRangeClientCapabilities)
instance Aeson.ToJSON FoldingRangeClientCapabilities where
toJSON :: FoldingRangeClientCapabilities -> Value
toJSON (FoldingRangeClientCapabilities Maybe Bool
arg0 Maybe UInt
arg1 Maybe Bool
arg2 Maybe
(Rec
(Extend "valueSet" (Maybe [FoldingRangeKind]) ('R '[]) .+ 'R '[]))
arg3 Maybe
(Rec (Extend "collapsedText" (Maybe Bool) ('R '[]) .+ 'R '[]))
arg4) = [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
"dynamicRegistration" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg0
,String
"rangeLimit" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe UInt
arg1
,String
"lineFoldingOnly" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe Bool
arg2
,String
"foldingRangeKind" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe
(Rec
(Extend "valueSet" (Maybe [FoldingRangeKind]) ('R '[]) .+ 'R '[]))
arg3
,String
"foldingRange" forall kv v. (KeyValue kv, ToJSON v) => String -> Maybe v -> [kv]
Language.LSP.Protocol.Types.Common..=? Maybe
(Rec (Extend "collapsedText" (Maybe Bool) ('R '[]) .+ 'R '[]))
arg4]
instance Aeson.FromJSON FoldingRangeClientCapabilities where
parseJSON :: Value -> Parser FoldingRangeClientCapabilities
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"FoldingRangeClientCapabilities" forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool
-> Maybe UInt
-> Maybe Bool
-> Maybe
(Rec
(Extend "valueSet" (Maybe [FoldingRangeKind]) ('R '[]) .+ 'R '[]))
-> Maybe
(Rec (Extend "collapsedText" (Maybe Bool) ('R '[]) .+ 'R '[]))
-> FoldingRangeClientCapabilities
FoldingRangeClientCapabilities 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
"dynamicRegistration" 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
"rangeLimit" 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
"lineFoldingOnly" 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
"foldingRangeKind" 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
"foldingRange"