{-# 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
(Int -> MonikerOptions -> ShowS)
-> (MonikerOptions -> String)
-> ([MonikerOptions] -> ShowS)
-> Show MonikerOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MonikerOptions -> ShowS
showsPrec :: Int -> MonikerOptions -> ShowS
$cshow :: MonikerOptions -> String
show :: MonikerOptions -> String
$cshowList :: [MonikerOptions] -> ShowS
showList :: [MonikerOptions] -> ShowS
Show, MonikerOptions -> MonikerOptions -> Bool
(MonikerOptions -> MonikerOptions -> Bool)
-> (MonikerOptions -> MonikerOptions -> Bool) -> Eq MonikerOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MonikerOptions -> MonikerOptions -> Bool
== :: MonikerOptions -> MonikerOptions -> Bool
$c/= :: MonikerOptions -> MonikerOptions -> Bool
/= :: MonikerOptions -> MonikerOptions -> Bool
Eq, Eq MonikerOptions
Eq MonikerOptions =>
(MonikerOptions -> MonikerOptions -> Ordering)
-> (MonikerOptions -> MonikerOptions -> Bool)
-> (MonikerOptions -> MonikerOptions -> Bool)
-> (MonikerOptions -> MonikerOptions -> Bool)
-> (MonikerOptions -> MonikerOptions -> Bool)
-> (MonikerOptions -> MonikerOptions -> MonikerOptions)
-> (MonikerOptions -> MonikerOptions -> MonikerOptions)
-> Ord 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
$ccompare :: MonikerOptions -> MonikerOptions -> Ordering
compare :: MonikerOptions -> MonikerOptions -> Ordering
$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
>= :: MonikerOptions -> MonikerOptions -> Bool
$cmax :: MonikerOptions -> MonikerOptions -> MonikerOptions
max :: MonikerOptions -> MonikerOptions -> MonikerOptions
$cmin :: MonikerOptions -> MonikerOptions -> MonikerOptions
min :: MonikerOptions -> MonikerOptions -> MonikerOptions
Ord, (forall x. MonikerOptions -> Rep MonikerOptions x)
-> (forall x. Rep MonikerOptions x -> MonikerOptions)
-> Generic MonikerOptions
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
$cfrom :: forall x. MonikerOptions -> Rep MonikerOptions x
from :: forall x. MonikerOptions -> Rep MonikerOptions x
$cto :: forall x. Rep MonikerOptions x -> MonikerOptions
to :: forall x. Rep MonikerOptions x -> MonikerOptions
Generic)
deriving anyclass (MonikerOptions -> ()
(MonikerOptions -> ()) -> NFData MonikerOptions
forall a. (a -> ()) -> NFData a
$crnf :: MonikerOptions -> ()
rnf :: MonikerOptions -> ()
NFData, Eq MonikerOptions
Eq MonikerOptions =>
(Int -> MonikerOptions -> Int)
-> (MonikerOptions -> Int) -> Hashable MonikerOptions
Int -> MonikerOptions -> Int
MonikerOptions -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> MonikerOptions -> Int
hashWithSalt :: Int -> MonikerOptions -> Int
$chash :: MonikerOptions -> Int
hash :: MonikerOptions -> Int
Hashable)
deriving (forall ann. MonikerOptions -> Doc ann)
-> (forall ann. [MonikerOptions] -> Doc ann)
-> Pretty MonikerOptions
forall ann. [MonikerOptions] -> Doc ann
forall ann. MonikerOptions -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. MonikerOptions -> Doc ann
pretty :: forall ann. MonikerOptions -> Doc ann
$cprettyList :: forall ann. [MonikerOptions] -> Doc ann
prettyList :: 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 ([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 MonikerOptions where
parseJSON :: Value -> Parser MonikerOptions
parseJSON = String
-> (Object -> Parser MonikerOptions)
-> Value
-> Parser MonikerOptions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"MonikerOptions" ((Object -> Parser MonikerOptions)
-> Value -> Parser MonikerOptions)
-> (Object -> Parser MonikerOptions)
-> Value
-> Parser MonikerOptions
forall a b. (a -> b) -> a -> b
$ \Object
arg -> Maybe Bool -> MonikerOptions
MonikerOptions (Maybe Bool -> MonikerOptions)
-> Parser (Maybe Bool) -> Parser MonikerOptions
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"