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