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