{- 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.TraceValue 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 Data.Text
import qualified Language.LSP.Protocol.Types.LspEnum

{-|

-}
data TraceValue = 
    {-|
  Turn tracing off.
  -}
  TraceValue_Off
  | {-|
  Trace messages only.
  -}
  TraceValue_Messages
  | {-|
  Verbose message tracing.
  -}
  TraceValue_Verbose
  deriving stock (Int -> TraceValue -> ShowS
[TraceValue] -> ShowS
TraceValue -> String
(Int -> TraceValue -> ShowS)
-> (TraceValue -> String)
-> ([TraceValue] -> ShowS)
-> Show TraceValue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TraceValue -> ShowS
showsPrec :: Int -> TraceValue -> ShowS
$cshow :: TraceValue -> String
show :: TraceValue -> String
$cshowList :: [TraceValue] -> ShowS
showList :: [TraceValue] -> ShowS
Show, TraceValue -> TraceValue -> Bool
(TraceValue -> TraceValue -> Bool)
-> (TraceValue -> TraceValue -> Bool) -> Eq TraceValue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TraceValue -> TraceValue -> Bool
== :: TraceValue -> TraceValue -> Bool
$c/= :: TraceValue -> TraceValue -> Bool
/= :: TraceValue -> TraceValue -> Bool
Eq, Eq TraceValue
Eq TraceValue =>
(TraceValue -> TraceValue -> Ordering)
-> (TraceValue -> TraceValue -> Bool)
-> (TraceValue -> TraceValue -> Bool)
-> (TraceValue -> TraceValue -> Bool)
-> (TraceValue -> TraceValue -> Bool)
-> (TraceValue -> TraceValue -> TraceValue)
-> (TraceValue -> TraceValue -> TraceValue)
-> Ord TraceValue
TraceValue -> TraceValue -> Bool
TraceValue -> TraceValue -> Ordering
TraceValue -> TraceValue -> TraceValue
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 :: TraceValue -> TraceValue -> Ordering
compare :: TraceValue -> TraceValue -> Ordering
$c< :: TraceValue -> TraceValue -> Bool
< :: TraceValue -> TraceValue -> Bool
$c<= :: TraceValue -> TraceValue -> Bool
<= :: TraceValue -> TraceValue -> Bool
$c> :: TraceValue -> TraceValue -> Bool
> :: TraceValue -> TraceValue -> Bool
$c>= :: TraceValue -> TraceValue -> Bool
>= :: TraceValue -> TraceValue -> Bool
$cmax :: TraceValue -> TraceValue -> TraceValue
max :: TraceValue -> TraceValue -> TraceValue
$cmin :: TraceValue -> TraceValue -> TraceValue
min :: TraceValue -> TraceValue -> TraceValue
Ord, (forall x. TraceValue -> Rep TraceValue x)
-> (forall x. Rep TraceValue x -> TraceValue) -> Generic TraceValue
forall x. Rep TraceValue x -> TraceValue
forall x. TraceValue -> Rep TraceValue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. TraceValue -> Rep TraceValue x
from :: forall x. TraceValue -> Rep TraceValue x
$cto :: forall x. Rep TraceValue x -> TraceValue
to :: forall x. Rep TraceValue x -> TraceValue
Generic)
  deriving anyclass (TraceValue -> ()
(TraceValue -> ()) -> NFData TraceValue
forall a. (a -> ()) -> NFData a
$crnf :: TraceValue -> ()
rnf :: TraceValue -> ()
NFData, Eq TraceValue
Eq TraceValue =>
(Int -> TraceValue -> Int)
-> (TraceValue -> Int) -> Hashable TraceValue
Int -> TraceValue -> Int
TraceValue -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> TraceValue -> Int
hashWithSalt :: Int -> TraceValue -> Int
$chash :: TraceValue -> Int
hash :: TraceValue -> Int
Hashable)
  deriving ( [TraceValue] -> Value
[TraceValue] -> Encoding
TraceValue -> Bool
TraceValue -> Value
TraceValue -> Encoding
(TraceValue -> Value)
-> (TraceValue -> Encoding)
-> ([TraceValue] -> Value)
-> ([TraceValue] -> Encoding)
-> (TraceValue -> Bool)
-> ToJSON TraceValue
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> (a -> Bool)
-> ToJSON a
$ctoJSON :: TraceValue -> Value
toJSON :: TraceValue -> Value
$ctoEncoding :: TraceValue -> Encoding
toEncoding :: TraceValue -> Encoding
$ctoJSONList :: [TraceValue] -> Value
toJSONList :: [TraceValue] -> Value
$ctoEncodingList :: [TraceValue] -> Encoding
toEncodingList :: [TraceValue] -> Encoding
$comitField :: TraceValue -> Bool
omitField :: TraceValue -> Bool
Aeson.ToJSON
  , Maybe TraceValue
Value -> Parser [TraceValue]
Value -> Parser TraceValue
(Value -> Parser TraceValue)
-> (Value -> Parser [TraceValue])
-> Maybe TraceValue
-> FromJSON TraceValue
forall a.
(Value -> Parser a)
-> (Value -> Parser [a]) -> Maybe a -> FromJSON a
$cparseJSON :: Value -> Parser TraceValue
parseJSON :: Value -> Parser TraceValue
$cparseJSONList :: Value -> Parser [TraceValue]
parseJSONList :: Value -> Parser [TraceValue]
$comittedField :: Maybe TraceValue
omittedField :: Maybe TraceValue
Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum TraceValue)
  deriving (forall ann. TraceValue -> Doc ann)
-> (forall ann. [TraceValue] -> Doc ann) -> Pretty TraceValue
forall ann. [TraceValue] -> Doc ann
forall ann. TraceValue -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. TraceValue -> Doc ann
pretty :: forall ann. TraceValue -> Doc ann
$cprettyList :: forall ann. [TraceValue] -> Doc ann
prettyList :: forall ann. [TraceValue] -> Doc ann
Pretty via (ViaJSON TraceValue)

instance Language.LSP.Protocol.Types.LspEnum.LspEnum TraceValue where
  knownValues :: Set TraceValue
knownValues = [TraceValue] -> Set TraceValue
forall a. Ord a => [a] -> Set a
Data.Set.fromList [TraceValue
TraceValue_Off
    ,TraceValue
TraceValue_Messages
    ,TraceValue
TraceValue_Verbose]
  type EnumBaseType TraceValue = Data.Text.Text
  toEnumBaseType :: TraceValue -> EnumBaseType TraceValue
toEnumBaseType TraceValue
TraceValue_Off = Text
EnumBaseType TraceValue
"off"
  toEnumBaseType TraceValue
TraceValue_Messages = Text
EnumBaseType TraceValue
"messages"
  toEnumBaseType TraceValue
TraceValue_Verbose = Text
EnumBaseType TraceValue
"verbose"
  fromEnumBaseType :: EnumBaseType TraceValue -> Maybe TraceValue
fromEnumBaseType EnumBaseType TraceValue
"off" = TraceValue -> Maybe TraceValue
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure TraceValue
TraceValue_Off
  fromEnumBaseType EnumBaseType TraceValue
"messages" = TraceValue -> Maybe TraceValue
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure TraceValue
TraceValue_Messages
  fromEnumBaseType EnumBaseType TraceValue
"verbose" = TraceValue -> Maybe TraceValue
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure TraceValue
TraceValue_Verbose
  fromEnumBaseType EnumBaseType TraceValue
_ = Maybe TraceValue
forall a. Maybe a
Nothing