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