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

{-|
Defines how the host (editor) should sync
document changes to the language server.
-}
data TextDocumentSyncKind = 
    {-|
  Documents should not be synced at all.
  -}
  TextDocumentSyncKind_None
  | {-|
  Documents are synced by always sending the full content
  of the document.
  -}
  TextDocumentSyncKind_Full
  | {-|
  Documents are synced by sending the full content on open.
  After that only incremental updates to the document are
  send.
  -}
  TextDocumentSyncKind_Incremental
  deriving stock (Int -> TextDocumentSyncKind -> ShowS
[TextDocumentSyncKind] -> ShowS
TextDocumentSyncKind -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TextDocumentSyncKind] -> ShowS
$cshowList :: [TextDocumentSyncKind] -> ShowS
show :: TextDocumentSyncKind -> String
$cshow :: TextDocumentSyncKind -> String
showsPrec :: Int -> TextDocumentSyncKind -> ShowS
$cshowsPrec :: Int -> TextDocumentSyncKind -> ShowS
Show, TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
$c/= :: TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
== :: TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
$c== :: TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
Eq, Eq TextDocumentSyncKind
TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
TextDocumentSyncKind -> TextDocumentSyncKind -> Ordering
TextDocumentSyncKind
-> TextDocumentSyncKind -> TextDocumentSyncKind
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 :: TextDocumentSyncKind
-> TextDocumentSyncKind -> TextDocumentSyncKind
$cmin :: TextDocumentSyncKind
-> TextDocumentSyncKind -> TextDocumentSyncKind
max :: TextDocumentSyncKind
-> TextDocumentSyncKind -> TextDocumentSyncKind
$cmax :: TextDocumentSyncKind
-> TextDocumentSyncKind -> TextDocumentSyncKind
>= :: TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
$c>= :: TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
> :: TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
$c> :: TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
<= :: TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
$c<= :: TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
< :: TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
$c< :: TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
compare :: TextDocumentSyncKind -> TextDocumentSyncKind -> Ordering
$ccompare :: TextDocumentSyncKind -> TextDocumentSyncKind -> Ordering
Ord, forall x. Rep TextDocumentSyncKind x -> TextDocumentSyncKind
forall x. TextDocumentSyncKind -> Rep TextDocumentSyncKind x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TextDocumentSyncKind x -> TextDocumentSyncKind
$cfrom :: forall x. TextDocumentSyncKind -> Rep TextDocumentSyncKind x
Generic)
  deriving anyclass (TextDocumentSyncKind -> ()
forall a. (a -> ()) -> NFData a
rnf :: TextDocumentSyncKind -> ()
$crnf :: TextDocumentSyncKind -> ()
NFData, Eq TextDocumentSyncKind
Int -> TextDocumentSyncKind -> Int
TextDocumentSyncKind -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: TextDocumentSyncKind -> Int
$chash :: TextDocumentSyncKind -> Int
hashWithSalt :: Int -> TextDocumentSyncKind -> Int
$chashWithSalt :: Int -> TextDocumentSyncKind -> Int
Hashable)
  deriving ( [TextDocumentSyncKind] -> Encoding
[TextDocumentSyncKind] -> Value
TextDocumentSyncKind -> Encoding
TextDocumentSyncKind -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [TextDocumentSyncKind] -> Encoding
$ctoEncodingList :: [TextDocumentSyncKind] -> Encoding
toJSONList :: [TextDocumentSyncKind] -> Value
$ctoJSONList :: [TextDocumentSyncKind] -> Value
toEncoding :: TextDocumentSyncKind -> Encoding
$ctoEncoding :: TextDocumentSyncKind -> Encoding
toJSON :: TextDocumentSyncKind -> Value
$ctoJSON :: TextDocumentSyncKind -> Value
Aeson.ToJSON
  , Value -> Parser [TextDocumentSyncKind]
Value -> Parser TextDocumentSyncKind
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [TextDocumentSyncKind]
$cparseJSONList :: Value -> Parser [TextDocumentSyncKind]
parseJSON :: Value -> Parser TextDocumentSyncKind
$cparseJSON :: Value -> Parser TextDocumentSyncKind
Aeson.FromJSON ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum TextDocumentSyncKind Language.LSP.Protocol.Types.Common.UInt)
  deriving forall ann. [TextDocumentSyncKind] -> Doc ann
forall ann. TextDocumentSyncKind -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [TextDocumentSyncKind] -> Doc ann
$cprettyList :: forall ann. [TextDocumentSyncKind] -> Doc ann
pretty :: forall ann. TextDocumentSyncKind -> Doc ann
$cpretty :: forall ann. TextDocumentSyncKind -> Doc ann
Pretty via (ViaJSON TextDocumentSyncKind)

instance Language.LSP.Protocol.Types.LspEnum.LspEnum TextDocumentSyncKind where
  knownValues :: Set TextDocumentSyncKind
knownValues = forall a. Ord a => [a] -> Set a
Data.Set.fromList [TextDocumentSyncKind
TextDocumentSyncKind_None
    ,TextDocumentSyncKind
TextDocumentSyncKind_Full
    ,TextDocumentSyncKind
TextDocumentSyncKind_Incremental]
  type EnumBaseType TextDocumentSyncKind = Language.LSP.Protocol.Types.Common.UInt
  toEnumBaseType :: TextDocumentSyncKind -> EnumBaseType TextDocumentSyncKind
toEnumBaseType TextDocumentSyncKind
TextDocumentSyncKind_None = UInt
0
  toEnumBaseType TextDocumentSyncKind
TextDocumentSyncKind_Full = UInt
1
  toEnumBaseType TextDocumentSyncKind
TextDocumentSyncKind_Incremental = UInt
2
  fromEnumBaseType :: EnumBaseType TextDocumentSyncKind -> Maybe TextDocumentSyncKind
fromEnumBaseType EnumBaseType TextDocumentSyncKind
0 = forall (f :: * -> *) a. Applicative f => a -> f a
pure TextDocumentSyncKind
TextDocumentSyncKind_None
  fromEnumBaseType EnumBaseType TextDocumentSyncKind
1 = forall (f :: * -> *) a. Applicative f => a -> f a
pure TextDocumentSyncKind
TextDocumentSyncKind_Full
  fromEnumBaseType EnumBaseType TextDocumentSyncKind
2 = forall (f :: * -> *) a. Applicative f => a -> f a
pure TextDocumentSyncKind
TextDocumentSyncKind_Incremental
  fromEnumBaseType EnumBaseType TextDocumentSyncKind
_ = forall a. Maybe a
Nothing