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