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

{-|
A set of predefined range kinds.
-}
data FoldingRangeKind = 
    {-|
  Folding range for a comment
  -}
  FoldingRangeKind_Comment
  | {-|
  Folding range for an import or include
  -}
  FoldingRangeKind_Imports
  | {-|
  Folding range for a region (e.g. `#region`)
  -}
  FoldingRangeKind_Region
  | FoldingRangeKind_Custom Data.Text.Text
  deriving stock (Int -> FoldingRangeKind -> ShowS
[FoldingRangeKind] -> ShowS
FoldingRangeKind -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FoldingRangeKind] -> ShowS
$cshowList :: [FoldingRangeKind] -> ShowS
show :: FoldingRangeKind -> String
$cshow :: FoldingRangeKind -> String
showsPrec :: Int -> FoldingRangeKind -> ShowS
$cshowsPrec :: Int -> FoldingRangeKind -> ShowS
Show, FoldingRangeKind -> FoldingRangeKind -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FoldingRangeKind -> FoldingRangeKind -> Bool
$c/= :: FoldingRangeKind -> FoldingRangeKind -> Bool
== :: FoldingRangeKind -> FoldingRangeKind -> Bool
$c== :: FoldingRangeKind -> FoldingRangeKind -> Bool
Eq, Eq FoldingRangeKind
FoldingRangeKind -> FoldingRangeKind -> Bool
FoldingRangeKind -> FoldingRangeKind -> Ordering
FoldingRangeKind -> FoldingRangeKind -> FoldingRangeKind
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 :: FoldingRangeKind -> FoldingRangeKind -> FoldingRangeKind
$cmin :: FoldingRangeKind -> FoldingRangeKind -> FoldingRangeKind
max :: FoldingRangeKind -> FoldingRangeKind -> FoldingRangeKind
$cmax :: FoldingRangeKind -> FoldingRangeKind -> FoldingRangeKind
>= :: FoldingRangeKind -> FoldingRangeKind -> Bool
$c>= :: FoldingRangeKind -> FoldingRangeKind -> Bool
> :: FoldingRangeKind -> FoldingRangeKind -> Bool
$c> :: FoldingRangeKind -> FoldingRangeKind -> Bool
<= :: FoldingRangeKind -> FoldingRangeKind -> Bool
$c<= :: FoldingRangeKind -> FoldingRangeKind -> Bool
< :: FoldingRangeKind -> FoldingRangeKind -> Bool
$c< :: FoldingRangeKind -> FoldingRangeKind -> Bool
compare :: FoldingRangeKind -> FoldingRangeKind -> Ordering
$ccompare :: FoldingRangeKind -> FoldingRangeKind -> Ordering
Ord, forall x. Rep FoldingRangeKind x -> FoldingRangeKind
forall x. FoldingRangeKind -> Rep FoldingRangeKind x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FoldingRangeKind x -> FoldingRangeKind
$cfrom :: forall x. FoldingRangeKind -> Rep FoldingRangeKind x
Generic)
  deriving anyclass (FoldingRangeKind -> ()
forall a. (a -> ()) -> NFData a
rnf :: FoldingRangeKind -> ()
$crnf :: FoldingRangeKind -> ()
NFData, Eq FoldingRangeKind
Int -> FoldingRangeKind -> Int
FoldingRangeKind -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: FoldingRangeKind -> Int
$chash :: FoldingRangeKind -> Int
hashWithSalt :: Int -> FoldingRangeKind -> Int
$chashWithSalt :: Int -> FoldingRangeKind -> Int
Hashable)
  deriving ( [FoldingRangeKind] -> Encoding
[FoldingRangeKind] -> Value
FoldingRangeKind -> Encoding
FoldingRangeKind -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [FoldingRangeKind] -> Encoding
$ctoEncodingList :: [FoldingRangeKind] -> Encoding
toJSONList :: [FoldingRangeKind] -> Value
$ctoJSONList :: [FoldingRangeKind] -> Value
toEncoding :: FoldingRangeKind -> Encoding
$ctoEncoding :: FoldingRangeKind -> Encoding
toJSON :: FoldingRangeKind -> Value
$ctoJSON :: FoldingRangeKind -> Value
Aeson.ToJSON
  , Value -> Parser [FoldingRangeKind]
Value -> Parser FoldingRangeKind
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [FoldingRangeKind]
$cparseJSONList :: Value -> Parser [FoldingRangeKind]
parseJSON :: Value -> Parser FoldingRangeKind
$cparseJSON :: Value -> Parser FoldingRangeKind
Aeson.FromJSON
  , String -> FoldingRangeKind
forall a. (String -> a) -> IsString a
fromString :: String -> FoldingRangeKind
$cfromString :: String -> FoldingRangeKind
Data.String.IsString ) via (Language.LSP.Protocol.Types.LspEnum.AsLspEnum FoldingRangeKind Data.Text.Text)
  deriving forall ann. [FoldingRangeKind] -> Doc ann
forall ann. FoldingRangeKind -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [FoldingRangeKind] -> Doc ann
$cprettyList :: forall ann. [FoldingRangeKind] -> Doc ann
pretty :: forall ann. FoldingRangeKind -> Doc ann
$cpretty :: forall ann. FoldingRangeKind -> Doc ann
Pretty via (ViaJSON FoldingRangeKind)

instance Language.LSP.Protocol.Types.LspEnum.LspEnum FoldingRangeKind where
  knownValues :: Set FoldingRangeKind
knownValues = forall a. Ord a => [a] -> Set a
Data.Set.fromList [FoldingRangeKind
FoldingRangeKind_Comment
    ,FoldingRangeKind
FoldingRangeKind_Imports
    ,FoldingRangeKind
FoldingRangeKind_Region]
  type EnumBaseType FoldingRangeKind = Data.Text.Text
  toEnumBaseType :: FoldingRangeKind -> EnumBaseType FoldingRangeKind
toEnumBaseType FoldingRangeKind
FoldingRangeKind_Comment = Text
"comment"
  toEnumBaseType FoldingRangeKind
FoldingRangeKind_Imports = Text
"imports"
  toEnumBaseType FoldingRangeKind
FoldingRangeKind_Region = Text
"region"
  toEnumBaseType (FoldingRangeKind_Custom Text
arg) = Text
arg

instance Language.LSP.Protocol.Types.LspEnum.LspOpenEnum FoldingRangeKind where
  fromOpenEnumBaseType :: EnumBaseType FoldingRangeKind -> FoldingRangeKind
fromOpenEnumBaseType EnumBaseType FoldingRangeKind
"comment" = FoldingRangeKind
FoldingRangeKind_Comment
  fromOpenEnumBaseType EnumBaseType FoldingRangeKind
"imports" = FoldingRangeKind
FoldingRangeKind_Imports
  fromOpenEnumBaseType EnumBaseType FoldingRangeKind
"region" = FoldingRangeKind
FoldingRangeKind_Region
  fromOpenEnumBaseType EnumBaseType FoldingRangeKind
arg = Text -> FoldingRangeKind
FoldingRangeKind_Custom EnumBaseType FoldingRangeKind
arg