{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module Language.LSP.Protocol.Internal.Types.CodeActionKind 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 Data.Text
import qualified Language.LSP.Protocol.Types.LspEnum
data CodeActionKind =
CodeActionKind_Empty
|
CodeActionKind_QuickFix
|
CodeActionKind_Refactor
|
|
CodeActionKind_RefactorInline
|
CodeActionKind_RefactorRewrite
|
CodeActionKind_Source
|
CodeActionKind_SourceOrganizeImports
|
CodeActionKind_SourceFixAll
| CodeActionKind_Custom Data.Text.Text
deriving stock (Int -> CodeActionKind -> ShowS
[CodeActionKind] -> ShowS
CodeActionKind -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CodeActionKind] -> ShowS
$cshowList :: [CodeActionKind] -> ShowS
show :: CodeActionKind -> String
$cshow :: CodeActionKind -> String
showsPrec :: Int -> CodeActionKind -> ShowS
$cshowsPrec :: Int -> CodeActionKind -> ShowS
Show, CodeActionKind -> CodeActionKind -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CodeActionKind -> CodeActionKind -> Bool
$c/= :: CodeActionKind -> CodeActionKind -> Bool
== :: CodeActionKind -> CodeActionKind -> Bool
$c== :: CodeActionKind -> CodeActionKind -> Bool
Eq, Eq CodeActionKind
CodeActionKind -> CodeActionKind -> Bool
CodeActionKind -> CodeActionKind -> Ordering
CodeActionKind -> CodeActionKind -> CodeActionKind
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 :: CodeActionKind -> CodeActionKind -> CodeActionKind
$cmin :: CodeActionKind -> CodeActionKind -> CodeActionKind
max :: CodeActionKind -> CodeActionKind -> CodeActionKind
$cmax :: CodeActionKind -> CodeActionKind -> CodeActionKind
>= :: CodeActionKind -> CodeActionKind -> Bool
$c>= :: CodeActionKind -> CodeActionKind -> Bool
> :: CodeActionKind -> CodeActionKind -> Bool
$c> :: CodeActionKind -> CodeActionKind -> Bool
<= :: CodeActionKind -> CodeActionKind -> Bool
$c<= :: CodeActionKind -> CodeActionKind -> Bool
< :: CodeActionKind -> CodeActionKind -> Bool
$c< :: CodeActionKind -> CodeActionKind -> Bool
compare :: CodeActionKind -> CodeActionKind -> Ordering
$ccompare :: CodeActionKind -> CodeActionKind -> Ordering
Ord, forall x. Rep CodeActionKind x -> CodeActionKind
forall x. CodeActionKind -> Rep CodeActionKind x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CodeActionKind x -> CodeActionKind
$cfrom :: forall x. CodeActionKind -> Rep CodeActionKind x
Generic)
deriving anyclass (CodeActionKind -> ()
forall a. (a -> ()) -> NFData a
rnf :: CodeActionKind -> ()
$crnf :: CodeActionKind -> ()
NFData, Eq CodeActionKind
Int -> CodeActionKind -> Int
CodeActionKind -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: CodeActionKind -> Int
$chash :: CodeActionKind -> Int
hashWithSalt :: Int -> CodeActionKind -> Int
$chashWithSalt :: Int -> CodeActionKind -> Int
Hashable)
deriving ( [CodeActionKind] -> Encoding
[CodeActionKind] -> Value
CodeActionKind -> Encoding
CodeActionKind -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [CodeActionKind] -> Encoding
$ctoEncodingList :: [CodeActionKind] -> Encoding
toJSONList :: [CodeActionKind] -> Value
$ctoJSONList :: [CodeActionKind] -> Value
toEncoding :: CodeActionKind -> Encoding
$ctoEncoding :: CodeActionKind -> Encoding
toJSON :: CodeActionKind -> Value
$ctoJSON :: CodeActionKind -> Value
Aeson.ToJSON
, Value -> Parser [CodeActionKind]
Value -> Parser CodeActionKind
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [CodeActionKind]
$cparseJSONList :: Value -> Parser [CodeActionKind]
parseJSON :: Value -> Parser CodeActionKind
$cparseJSON :: Value -> Parser CodeActionKind
Aeson.FromJSON
, String -> CodeActionKind
forall a. (String -> a) -> IsString a
fromString :: String -> CodeActionKind
$cfromString :: String -> CodeActionKind
Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum CodeActionKind Data.Text.Text)
deriving forall ann. [CodeActionKind] -> Doc ann
forall ann. CodeActionKind -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [CodeActionKind] -> Doc ann
$cprettyList :: forall ann. [CodeActionKind] -> Doc ann
pretty :: forall ann. CodeActionKind -> Doc ann
$cpretty :: forall ann. CodeActionKind -> Doc ann
Pretty via (ViaJSON CodeActionKind)
instance Language.LSP.Protocol.Types.LspEnum.LspEnum CodeActionKind where
knownValues :: Set CodeActionKind
knownValues = forall a. Ord a => [a] -> Set a
Data.Set.fromList [CodeActionKind
CodeActionKind_Empty
,CodeActionKind
CodeActionKind_QuickFix
,CodeActionKind
CodeActionKind_Refactor
,CodeActionKind
CodeActionKind_RefactorExtract
,CodeActionKind
CodeActionKind_RefactorInline
,CodeActionKind
CodeActionKind_RefactorRewrite
,CodeActionKind
CodeActionKind_Source
,CodeActionKind
CodeActionKind_SourceOrganizeImports
,CodeActionKind
CodeActionKind_SourceFixAll]
type EnumBaseType CodeActionKind = Data.Text.Text
toEnumBaseType :: CodeActionKind -> EnumBaseType CodeActionKind
toEnumBaseType CodeActionKind
CodeActionKind_Empty = Text
""
toEnumBaseType CodeActionKind
CodeActionKind_QuickFix = Text
"quickfix"
toEnumBaseType CodeActionKind
CodeActionKind_Refactor = Text
"refactor"
toEnumBaseType CodeActionKind
CodeActionKind_RefactorExtract = Text
"refactor.extract"
toEnumBaseType CodeActionKind
CodeActionKind_RefactorInline = Text
"refactor.inline"
toEnumBaseType CodeActionKind
CodeActionKind_RefactorRewrite = Text
"refactor.rewrite"
toEnumBaseType CodeActionKind
CodeActionKind_Source = Text
"source"
toEnumBaseType CodeActionKind
CodeActionKind_SourceOrganizeImports = Text
"source.organizeImports"
toEnumBaseType CodeActionKind
CodeActionKind_SourceFixAll = Text
"source.fixAll"
toEnumBaseType (CodeActionKind_Custom Text
arg) = Text
arg
instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum CodeActionKind where
fromOpenEnumBaseType :: EnumBaseType CodeActionKind -> CodeActionKind
fromOpenEnumBaseType EnumBaseType CodeActionKind
"" = CodeActionKind
CodeActionKind_Empty
fromOpenEnumBaseType EnumBaseType CodeActionKind
"quickfix" = CodeActionKind
CodeActionKind_QuickFix
fromOpenEnumBaseType EnumBaseType CodeActionKind
"refactor" = CodeActionKind
CodeActionKind_Refactor
fromOpenEnumBaseType EnumBaseType CodeActionKind
"refactor.extract" = CodeActionKind
CodeActionKind_RefactorExtract
fromOpenEnumBaseType EnumBaseType CodeActionKind
"refactor.inline" = CodeActionKind
CodeActionKind_RefactorInline
fromOpenEnumBaseType EnumBaseType CodeActionKind
"refactor.rewrite" = CodeActionKind
CodeActionKind_RefactorRewrite
fromOpenEnumBaseType EnumBaseType CodeActionKind
"source" = CodeActionKind
CodeActionKind_Source
fromOpenEnumBaseType EnumBaseType CodeActionKind
"source.organizeImports" = CodeActionKind
CodeActionKind_SourceOrganizeImports
fromOpenEnumBaseType EnumBaseType CodeActionKind
"source.fixAll" = CodeActionKind
CodeActionKind_SourceFixAll
fromOpenEnumBaseType EnumBaseType CodeActionKind
arg = Text -> CodeActionKind
CodeActionKind_Custom EnumBaseType CodeActionKind
arg