{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module Language.LSP.Protocol.Internal.Types.CodeActionTriggerKind 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 Data.Set
import qualified Data.String
import qualified Language.LSP.Protocol.Types.Common
import qualified Language.LSP.Protocol.Types.LspEnum
data CodeActionTriggerKind =
CodeActionTriggerKind_Invoked
|
CodeActionTriggerKind_Automatic
deriving stock (Int -> CodeActionTriggerKind -> ShowS
[CodeActionTriggerKind] -> ShowS
CodeActionTriggerKind -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CodeActionTriggerKind] -> ShowS
$cshowList :: [CodeActionTriggerKind] -> ShowS
show :: CodeActionTriggerKind -> String
$cshow :: CodeActionTriggerKind -> String
showsPrec :: Int -> CodeActionTriggerKind -> ShowS
$cshowsPrec :: Int -> CodeActionTriggerKind -> ShowS
Show, CodeActionTriggerKind -> CodeActionTriggerKind -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CodeActionTriggerKind -> CodeActionTriggerKind -> Bool
$c/= :: CodeActionTriggerKind -> CodeActionTriggerKind -> Bool
== :: CodeActionTriggerKind -> CodeActionTriggerKind -> Bool
$c== :: CodeActionTriggerKind -> CodeActionTriggerKind -> Bool
Eq, Eq CodeActionTriggerKind
CodeActionTriggerKind -> CodeActionTriggerKind -> Bool
CodeActionTriggerKind -> CodeActionTriggerKind -> Ordering
CodeActionTriggerKind
-> CodeActionTriggerKind -> CodeActionTriggerKind
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 :: CodeActionTriggerKind
-> CodeActionTriggerKind -> CodeActionTriggerKind
$cmin :: CodeActionTriggerKind
-> CodeActionTriggerKind -> CodeActionTriggerKind
max :: CodeActionTriggerKind
-> CodeActionTriggerKind -> CodeActionTriggerKind
$cmax :: CodeActionTriggerKind
-> CodeActionTriggerKind -> CodeActionTriggerKind
>= :: CodeActionTriggerKind -> CodeActionTriggerKind -> Bool
$c>= :: CodeActionTriggerKind -> CodeActionTriggerKind -> Bool
> :: CodeActionTriggerKind -> CodeActionTriggerKind -> Bool
$c> :: CodeActionTriggerKind -> CodeActionTriggerKind -> Bool
<= :: CodeActionTriggerKind -> CodeActionTriggerKind -> Bool
$c<= :: CodeActionTriggerKind -> CodeActionTriggerKind -> Bool
< :: CodeActionTriggerKind -> CodeActionTriggerKind -> Bool
$c< :: CodeActionTriggerKind -> CodeActionTriggerKind -> Bool
compare :: CodeActionTriggerKind -> CodeActionTriggerKind -> Ordering
$ccompare :: CodeActionTriggerKind -> CodeActionTriggerKind -> Ordering
Ord, forall x. Rep CodeActionTriggerKind x -> CodeActionTriggerKind
forall x. CodeActionTriggerKind -> Rep CodeActionTriggerKind x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CodeActionTriggerKind x -> CodeActionTriggerKind
$cfrom :: forall x. CodeActionTriggerKind -> Rep CodeActionTriggerKind x
Generic)
deriving anyclass (CodeActionTriggerKind -> ()
forall a. (a -> ()) -> NFData a
rnf :: CodeActionTriggerKind -> ()
$crnf :: CodeActionTriggerKind -> ()
NFData, Eq CodeActionTriggerKind
Int -> CodeActionTriggerKind -> Int
CodeActionTriggerKind -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: CodeActionTriggerKind -> Int
$chash :: CodeActionTriggerKind -> Int
hashWithSalt :: Int -> CodeActionTriggerKind -> Int
$chashWithSalt :: Int -> CodeActionTriggerKind -> Int
Hashable)
deriving ( [CodeActionTriggerKind] -> Encoding
[CodeActionTriggerKind] -> Value
CodeActionTriggerKind -> Encoding
CodeActionTriggerKind -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [CodeActionTriggerKind] -> Encoding
$ctoEncodingList :: [CodeActionTriggerKind] -> Encoding
toJSONList :: [CodeActionTriggerKind] -> Value
$ctoJSONList :: [CodeActionTriggerKind] -> Value
toEncoding :: CodeActionTriggerKind -> Encoding
$ctoEncoding :: CodeActionTriggerKind -> Encoding
toJSON :: CodeActionTriggerKind -> Value
$ctoJSON :: CodeActionTriggerKind -> Value
Aeson.ToJSON
, Value -> Parser [CodeActionTriggerKind]
Value -> Parser CodeActionTriggerKind
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [CodeActionTriggerKind]
$cparseJSONList :: Value -> Parser [CodeActionTriggerKind]
parseJSON :: Value -> Parser CodeActionTriggerKind
$cparseJSON :: Value -> Parser CodeActionTriggerKind
Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CodeActionTriggerKind Language.LSP.Protocol.Types.Common.UInt)
deriving forall ann. [CodeActionTriggerKind] -> Doc ann
forall ann. CodeActionTriggerKind -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [CodeActionTriggerKind] -> Doc ann
$cprettyList :: forall ann. [CodeActionTriggerKind] -> Doc ann
pretty :: forall ann. CodeActionTriggerKind -> Doc ann
$cpretty :: forall ann. CodeActionTriggerKind -> Doc ann
Pretty via (ViaJSON CodeActionTriggerKind)
instance Language.LSP.Protocol.Types.LspEnum.LspEnum CodeActionTriggerKind where
knownValues :: Set CodeActionTriggerKind
knownValues = forall a. Ord a => [a] -> Set a
Data.Set.fromList [CodeActionTriggerKind
CodeActionTriggerKind_Invoked
,CodeActionTriggerKind
CodeActionTriggerKind_Automatic]
type EnumBaseType CodeActionTriggerKind = Language.LSP.Protocol.Types.Common.UInt
toEnumBaseType :: CodeActionTriggerKind -> EnumBaseType CodeActionTriggerKind
toEnumBaseType CodeActionTriggerKind
CodeActionTriggerKind_Invoked = UInt
1
toEnumBaseType CodeActionTriggerKind
CodeActionTriggerKind_Automatic = UInt
2
fromEnumBaseType :: EnumBaseType CodeActionTriggerKind -> Maybe CodeActionTriggerKind
fromEnumBaseType EnumBaseType CodeActionTriggerKind
1 = forall (f :: * -> *) a. Applicative f => a -> f a
pure CodeActionTriggerKind
CodeActionTriggerKind_Invoked
fromEnumBaseType EnumBaseType CodeActionTriggerKind
2 = forall (f :: * -> *) a. Applicative f => a -> f a
pure CodeActionTriggerKind
CodeActionTriggerKind_Automatic
fromEnumBaseType EnumBaseType CodeActionTriggerKind
_ = forall a. Maybe a
Nothing