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