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