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