{- ORMOLU_DISABLE -}
{- HLINT ignore -}
-- THIS IS A GENERATED FILE, DO NOT EDIT

{-# 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

{-|
The diagnostic's severity.
-}
data DiagnosticSeverity = 
    {-|
  Reports an error.
  -}
  DiagnosticSeverity_Error
  | {-|
  Reports a warning.
  -}
  DiagnosticSeverity_Warning
  | {-|
  Reports an information.
  -}
  DiagnosticSeverity_Information
  | {-|
  Reports a hint.
  -}
  DiagnosticSeverity_Hint
  deriving stock (Int -> DiagnosticSeverity -> ShowS
[DiagnosticSeverity] -> ShowS
DiagnosticSeverity -> String
(Int -> DiagnosticSeverity -> ShowS)
-> (DiagnosticSeverity -> String)
-> ([DiagnosticSeverity] -> ShowS)
-> Show DiagnosticSeverity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DiagnosticSeverity -> ShowS
showsPrec :: Int -> DiagnosticSeverity -> ShowS
$cshow :: DiagnosticSeverity -> String
show :: DiagnosticSeverity -> String
$cshowList :: [DiagnosticSeverity] -> ShowS
showList :: [DiagnosticSeverity] -> ShowS
Show, DiagnosticSeverity -> DiagnosticSeverity -> Bool
(DiagnosticSeverity -> DiagnosticSeverity -> Bool)
-> (DiagnosticSeverity -> DiagnosticSeverity -> Bool)
-> Eq DiagnosticSeverity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DiagnosticSeverity -> DiagnosticSeverity -> Bool
== :: DiagnosticSeverity -> DiagnosticSeverity -> Bool
$c/= :: DiagnosticSeverity -> DiagnosticSeverity -> Bool
/= :: DiagnosticSeverity -> DiagnosticSeverity -> Bool
Eq, Eq DiagnosticSeverity
Eq DiagnosticSeverity =>
(DiagnosticSeverity -> DiagnosticSeverity -> Ordering)
-> (DiagnosticSeverity -> DiagnosticSeverity -> Bool)
-> (DiagnosticSeverity -> DiagnosticSeverity -> Bool)
-> (DiagnosticSeverity -> DiagnosticSeverity -> Bool)
-> (DiagnosticSeverity -> DiagnosticSeverity -> Bool)
-> (DiagnosticSeverity -> DiagnosticSeverity -> DiagnosticSeverity)
-> (DiagnosticSeverity -> DiagnosticSeverity -> DiagnosticSeverity)
-> Ord 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
$ccompare :: DiagnosticSeverity -> DiagnosticSeverity -> Ordering
compare :: DiagnosticSeverity -> DiagnosticSeverity -> Ordering
$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
>= :: DiagnosticSeverity -> DiagnosticSeverity -> Bool
$cmax :: DiagnosticSeverity -> DiagnosticSeverity -> DiagnosticSeverity
max :: DiagnosticSeverity -> DiagnosticSeverity -> DiagnosticSeverity
$cmin :: DiagnosticSeverity -> DiagnosticSeverity -> DiagnosticSeverity
min :: DiagnosticSeverity -> DiagnosticSeverity -> DiagnosticSeverity
Ord, (forall x. DiagnosticSeverity -> Rep DiagnosticSeverity x)
-> (forall x. Rep DiagnosticSeverity x -> DiagnosticSeverity)
-> Generic DiagnosticSeverity
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
$cfrom :: forall x. DiagnosticSeverity -> Rep DiagnosticSeverity x
from :: forall x. DiagnosticSeverity -> Rep DiagnosticSeverity x
$cto :: forall x. Rep DiagnosticSeverity x -> DiagnosticSeverity
to :: forall x. Rep DiagnosticSeverity x -> DiagnosticSeverity
Generic)
  deriving anyclass (DiagnosticSeverity -> ()
(DiagnosticSeverity -> ()) -> NFData DiagnosticSeverity
forall a. (a -> ()) -> NFData a
$crnf :: DiagnosticSeverity -> ()
rnf :: DiagnosticSeverity -> ()
NFData, Eq DiagnosticSeverity
Eq DiagnosticSeverity =>
(Int -> DiagnosticSeverity -> Int)
-> (DiagnosticSeverity -> Int) -> Hashable DiagnosticSeverity
Int -> DiagnosticSeverity -> Int
DiagnosticSeverity -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> DiagnosticSeverity -> Int
hashWithSalt :: Int -> DiagnosticSeverity -> Int
$chash :: DiagnosticSeverity -> Int
hash :: DiagnosticSeverity -> Int
Hashable)
  deriving ( [DiagnosticSeverity] -> Value
[DiagnosticSeverity] -> Encoding
DiagnosticSeverity -> Bool
DiagnosticSeverity -> Value
DiagnosticSeverity -> Encoding
(DiagnosticSeverity -> Value)
-> (DiagnosticSeverity -> Encoding)
-> ([DiagnosticSeverity] -> Value)
-> ([DiagnosticSeverity] -> Encoding)
-> (DiagnosticSeverity -> Bool)
-> ToJSON DiagnosticSeverity
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> (a -> Bool)
-> ToJSON a
$ctoJSON :: DiagnosticSeverity -> Value
toJSON :: DiagnosticSeverity -> Value
$ctoEncoding :: DiagnosticSeverity -> Encoding
toEncoding :: DiagnosticSeverity -> Encoding
$ctoJSONList :: [DiagnosticSeverity] -> Value
toJSONList :: [DiagnosticSeverity] -> Value
$ctoEncodingList :: [DiagnosticSeverity] -> Encoding
toEncodingList :: [DiagnosticSeverity] -> Encoding
$comitField :: DiagnosticSeverity -> Bool
omitField :: DiagnosticSeverity -> Bool
Aeson.ToJSON
  , Maybe DiagnosticSeverity
Value -> Parser [DiagnosticSeverity]
Value -> Parser DiagnosticSeverity
(Value -> Parser DiagnosticSeverity)
-> (Value -> Parser [DiagnosticSeverity])
-> Maybe DiagnosticSeverity
-> FromJSON DiagnosticSeverity
forall a.
(Value -> Parser a)
-> (Value -> Parser [a]) -> Maybe a -> FromJSON a
$cparseJSON :: Value -> Parser DiagnosticSeverity
parseJSON :: Value -> Parser DiagnosticSeverity
$cparseJSONList :: Value -> Parser [DiagnosticSeverity]
parseJSONList :: Value -> Parser [DiagnosticSeverity]
$comittedField :: Maybe DiagnosticSeverity
omittedField :: Maybe DiagnosticSeverity
Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum DiagnosticSeverity)
  deriving (forall ann. DiagnosticSeverity -> Doc ann)
-> (forall ann. [DiagnosticSeverity] -> Doc ann)
-> Pretty DiagnosticSeverity
forall ann. [DiagnosticSeverity] -> Doc ann
forall ann. DiagnosticSeverity -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. DiagnosticSeverity -> Doc ann
pretty :: forall ann. DiagnosticSeverity -> Doc ann
$cprettyList :: forall ann. [DiagnosticSeverity] -> Doc ann
prettyList :: forall ann. [DiagnosticSeverity] -> Doc ann
Pretty via (ViaJSON DiagnosticSeverity)

instance Language.LSP.Protocol.Types.LspEnum.LspEnum DiagnosticSeverity where
  knownValues :: Set DiagnosticSeverity
knownValues = [DiagnosticSeverity] -> Set DiagnosticSeverity
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 = EnumBaseType DiagnosticSeverity
UInt
1
  toEnumBaseType DiagnosticSeverity
DiagnosticSeverity_Warning = EnumBaseType DiagnosticSeverity
UInt
2
  toEnumBaseType DiagnosticSeverity
DiagnosticSeverity_Information = EnumBaseType DiagnosticSeverity
UInt
3
  toEnumBaseType DiagnosticSeverity
DiagnosticSeverity_Hint = EnumBaseType DiagnosticSeverity
UInt
4
  fromEnumBaseType :: EnumBaseType DiagnosticSeverity -> Maybe DiagnosticSeverity
fromEnumBaseType EnumBaseType DiagnosticSeverity
1 = DiagnosticSeverity -> Maybe DiagnosticSeverity
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DiagnosticSeverity
DiagnosticSeverity_Error
  fromEnumBaseType EnumBaseType DiagnosticSeverity
2 = DiagnosticSeverity -> Maybe DiagnosticSeverity
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DiagnosticSeverity
DiagnosticSeverity_Warning
  fromEnumBaseType EnumBaseType DiagnosticSeverity
3 = DiagnosticSeverity -> Maybe DiagnosticSeverity
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DiagnosticSeverity
DiagnosticSeverity_Information
  fromEnumBaseType EnumBaseType DiagnosticSeverity
4 = DiagnosticSeverity -> Maybe DiagnosticSeverity
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure DiagnosticSeverity
DiagnosticSeverity_Hint
  fromEnumBaseType EnumBaseType DiagnosticSeverity
_ = Maybe DiagnosticSeverity
forall a. Maybe a
Nothing