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