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