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

{-|
The diagnostic tags.

@since 3.15.0
-}
data DiagnosticTag = 
    {-|
  Unused or unnecessary code.

  Clients are allowed to render diagnostics with this tag faded out instead of having
  an error squiggle.
  -}
  DiagnosticTag_Unnecessary
  | {-|
  Deprecated or obsolete code.

  Clients are allowed to rendered diagnostics with this tag strike through.
  -}
  DiagnosticTag_Deprecated
  deriving stock (Int -> DiagnosticTag -> ShowS
[DiagnosticTag] -> ShowS
DiagnosticTag -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DiagnosticTag] -> ShowS
$cshowList :: [DiagnosticTag] -> ShowS
show :: DiagnosticTag -> String
$cshow :: DiagnosticTag -> String
showsPrec :: Int -> DiagnosticTag -> ShowS
$cshowsPrec :: Int -> DiagnosticTag -> ShowS
Show, DiagnosticTag -> DiagnosticTag -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DiagnosticTag -> DiagnosticTag -> Bool
$c/= :: DiagnosticTag -> DiagnosticTag -> Bool
== :: DiagnosticTag -> DiagnosticTag -> Bool
$c== :: DiagnosticTag -> DiagnosticTag -> Bool
Eq, Eq 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
min :: DiagnosticTag -> DiagnosticTag -> DiagnosticTag
$cmin :: DiagnosticTag -> DiagnosticTag -> DiagnosticTag
max :: DiagnosticTag -> DiagnosticTag -> DiagnosticTag
$cmax :: DiagnosticTag -> DiagnosticTag -> DiagnosticTag
>= :: DiagnosticTag -> DiagnosticTag -> Bool
$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
compare :: DiagnosticTag -> DiagnosticTag -> Ordering
$ccompare :: DiagnosticTag -> DiagnosticTag -> Ordering
Ord, 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
$cto :: forall x. Rep DiagnosticTag x -> DiagnosticTag
$cfrom :: forall x. DiagnosticTag -> Rep DiagnosticTag x
Generic)
  deriving anyclass (DiagnosticTag -> ()
forall a. (a -> ()) -> NFData a
rnf :: DiagnosticTag -> ()
$crnf :: DiagnosticTag -> ()
NFData, Eq DiagnosticTag
Int -> DiagnosticTag -> Int
DiagnosticTag -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: DiagnosticTag -> Int
$chash :: DiagnosticTag -> Int
hashWithSalt :: Int -> DiagnosticTag -> Int
$chashWithSalt :: Int -> DiagnosticTag -> Int
Hashable)
  deriving ( [DiagnosticTag] -> Encoding
[DiagnosticTag] -> Value
DiagnosticTag -> Encoding
DiagnosticTag -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [DiagnosticTag] -> Encoding
$ctoEncodingList :: [DiagnosticTag] -> Encoding
toJSONList :: [DiagnosticTag] -> Value
$ctoJSONList :: [DiagnosticTag] -> Value
toEncoding :: DiagnosticTag -> Encoding
$ctoEncoding :: DiagnosticTag -> Encoding
toJSON :: DiagnosticTag -> Value
$ctoJSON :: DiagnosticTag -> Value
Aeson.ToJSON
  , Value -> Parser [DiagnosticTag]
Value -> Parser DiagnosticTag
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [DiagnosticTag]
$cparseJSONList :: Value -> Parser [DiagnosticTag]
parseJSON :: Value -> Parser DiagnosticTag
$cparseJSON :: Value -> Parser DiagnosticTag
Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum DiagnosticTag Language.LSP.Protocol.Types.Common.UInt)
  deriving forall ann. [DiagnosticTag] -> Doc ann
forall ann. DiagnosticTag -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [DiagnosticTag] -> Doc ann
$cprettyList :: forall ann. [DiagnosticTag] -> Doc ann
pretty :: forall ann. DiagnosticTag -> Doc ann
$cpretty :: forall ann. DiagnosticTag -> Doc ann
Pretty via (ViaJSON DiagnosticTag)

instance Language.LSP.Protocol.Types.LspEnum.LspEnum DiagnosticTag where
  knownValues :: Set DiagnosticTag
knownValues = 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 = UInt
1
  toEnumBaseType DiagnosticTag
DiagnosticTag_Deprecated = UInt
2
  fromEnumBaseType :: EnumBaseType DiagnosticTag -> Maybe DiagnosticTag
fromEnumBaseType EnumBaseType DiagnosticTag
1 = forall (f :: * -> *) a. Applicative f => a -> f a
pure DiagnosticTag
DiagnosticTag_Unnecessary
  fromEnumBaseType EnumBaseType DiagnosticTag
2 = forall (f :: * -> *) a. Applicative f => a -> f a
pure DiagnosticTag
DiagnosticTag_Deprecated
  fromEnumBaseType EnumBaseType DiagnosticTag
_ = forall a. Maybe a
Nothing