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