{- 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.DocumentSelector 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 Language.LSP.Protocol.Internal.Types.DocumentFilter

{-|
A document selector is the combination of one or many document filters.

@sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`;

The use of a string as a document filter is deprecated @since 3.16.0.
-}
newtype DocumentSelector = DocumentSelector [Language.LSP.Protocol.Internal.Types.DocumentFilter.DocumentFilter]
  deriving newtype ([DocumentSelector] -> Encoding
[DocumentSelector] -> Value
DocumentSelector -> Encoding
DocumentSelector -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [DocumentSelector] -> Encoding
$ctoEncodingList :: [DocumentSelector] -> Encoding
toJSONList :: [DocumentSelector] -> Value
$ctoJSONList :: [DocumentSelector] -> Value
toEncoding :: DocumentSelector -> Encoding
$ctoEncoding :: DocumentSelector -> Encoding
toJSON :: DocumentSelector -> Value
$ctoJSON :: DocumentSelector -> Value
Aeson.ToJSON, Value -> Parser [DocumentSelector]
Value -> Parser DocumentSelector
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [DocumentSelector]
$cparseJSONList :: Value -> Parser [DocumentSelector]
parseJSON :: Value -> Parser DocumentSelector
$cparseJSON :: Value -> Parser DocumentSelector
Aeson.FromJSON)
  deriving stock (Int -> DocumentSelector -> ShowS
[DocumentSelector] -> ShowS
DocumentSelector -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DocumentSelector] -> ShowS
$cshowList :: [DocumentSelector] -> ShowS
show :: DocumentSelector -> String
$cshow :: DocumentSelector -> String
showsPrec :: Int -> DocumentSelector -> ShowS
$cshowsPrec :: Int -> DocumentSelector -> ShowS
Show, DocumentSelector -> DocumentSelector -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DocumentSelector -> DocumentSelector -> Bool
$c/= :: DocumentSelector -> DocumentSelector -> Bool
== :: DocumentSelector -> DocumentSelector -> Bool
$c== :: DocumentSelector -> DocumentSelector -> Bool
Eq, Eq DocumentSelector
DocumentSelector -> DocumentSelector -> Bool
DocumentSelector -> DocumentSelector -> Ordering
DocumentSelector -> DocumentSelector -> DocumentSelector
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 :: DocumentSelector -> DocumentSelector -> DocumentSelector
$cmin :: DocumentSelector -> DocumentSelector -> DocumentSelector
max :: DocumentSelector -> DocumentSelector -> DocumentSelector
$cmax :: DocumentSelector -> DocumentSelector -> DocumentSelector
>= :: DocumentSelector -> DocumentSelector -> Bool
$c>= :: DocumentSelector -> DocumentSelector -> Bool
> :: DocumentSelector -> DocumentSelector -> Bool
$c> :: DocumentSelector -> DocumentSelector -> Bool
<= :: DocumentSelector -> DocumentSelector -> Bool
$c<= :: DocumentSelector -> DocumentSelector -> Bool
< :: DocumentSelector -> DocumentSelector -> Bool
$c< :: DocumentSelector -> DocumentSelector -> Bool
compare :: DocumentSelector -> DocumentSelector -> Ordering
$ccompare :: DocumentSelector -> DocumentSelector -> Ordering
Ord, forall x. Rep DocumentSelector x -> DocumentSelector
forall x. DocumentSelector -> Rep DocumentSelector x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DocumentSelector x -> DocumentSelector
$cfrom :: forall x. DocumentSelector -> Rep DocumentSelector x
Generic)
  deriving anyclass (DocumentSelector -> ()
forall a. (a -> ()) -> NFData a
rnf :: DocumentSelector -> ()
$crnf :: DocumentSelector -> ()
NFData, Eq DocumentSelector
Int -> DocumentSelector -> Int
DocumentSelector -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: DocumentSelector -> Int
$chash :: DocumentSelector -> Int
hashWithSalt :: Int -> DocumentSelector -> Int
$chashWithSalt :: Int -> DocumentSelector -> Int
Hashable)
  deriving forall ann. [DocumentSelector] -> Doc ann
forall ann. DocumentSelector -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [DocumentSelector] -> Doc ann
$cprettyList :: forall ann. [DocumentSelector] -> Doc ann
pretty :: forall ann. DocumentSelector -> Doc ann
$cpretty :: forall ann. DocumentSelector -> Doc ann
Pretty via (ViaJSON DocumentSelector)