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