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