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