{- 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] -> Value
[DocumentSelector] -> Encoding
DocumentSelector -> Bool
DocumentSelector -> Value
DocumentSelector -> Encoding
(DocumentSelector -> Value)
-> (DocumentSelector -> Encoding)
-> ([DocumentSelector] -> Value)
-> ([DocumentSelector] -> Encoding)
-> (DocumentSelector -> Bool)
-> ToJSON DocumentSelector
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> (a -> Bool)
-> ToJSON a
$ctoJSON :: DocumentSelector -> Value
toJSON :: DocumentSelector -> Value
$ctoEncoding :: DocumentSelector -> Encoding
toEncoding :: DocumentSelector -> Encoding
$ctoJSONList :: [DocumentSelector] -> Value
toJSONList :: [DocumentSelector] -> Value
$ctoEncodingList :: [DocumentSelector] -> Encoding
toEncodingList :: [DocumentSelector] -> Encoding
$comitField :: DocumentSelector -> Bool
omitField :: DocumentSelector -> Bool
Aeson.ToJSON, Maybe DocumentSelector
Value -> Parser [DocumentSelector]
Value -> Parser DocumentSelector
(Value -> Parser DocumentSelector)
-> (Value -> Parser [DocumentSelector])
-> Maybe DocumentSelector
-> FromJSON DocumentSelector
forall a.
(Value -> Parser a)
-> (Value -> Parser [a]) -> Maybe a -> FromJSON a
$cparseJSON :: Value -> Parser DocumentSelector
parseJSON :: Value -> Parser DocumentSelector
$cparseJSONList :: Value -> Parser [DocumentSelector]
parseJSONList :: Value -> Parser [DocumentSelector]
$comittedField :: Maybe DocumentSelector
omittedField :: Maybe DocumentSelector
Aeson.FromJSON)
  deriving stock (Int -> DocumentSelector -> ShowS
[DocumentSelector] -> ShowS
DocumentSelector -> String
(Int -> DocumentSelector -> ShowS)
-> (DocumentSelector -> String)
-> ([DocumentSelector] -> ShowS)
-> Show DocumentSelector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DocumentSelector -> ShowS
showsPrec :: Int -> DocumentSelector -> ShowS
$cshow :: DocumentSelector -> String
show :: DocumentSelector -> String
$cshowList :: [DocumentSelector] -> ShowS
showList :: [DocumentSelector] -> ShowS
Show, DocumentSelector -> DocumentSelector -> Bool
(DocumentSelector -> DocumentSelector -> Bool)
-> (DocumentSelector -> DocumentSelector -> Bool)
-> Eq DocumentSelector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DocumentSelector -> DocumentSelector -> Bool
== :: DocumentSelector -> DocumentSelector -> Bool
$c/= :: DocumentSelector -> DocumentSelector -> Bool
/= :: DocumentSelector -> DocumentSelector -> Bool
Eq, Eq DocumentSelector
Eq DocumentSelector =>
(DocumentSelector -> DocumentSelector -> Ordering)
-> (DocumentSelector -> DocumentSelector -> Bool)
-> (DocumentSelector -> DocumentSelector -> Bool)
-> (DocumentSelector -> DocumentSelector -> Bool)
-> (DocumentSelector -> DocumentSelector -> Bool)
-> (DocumentSelector -> DocumentSelector -> DocumentSelector)
-> (DocumentSelector -> DocumentSelector -> DocumentSelector)
-> Ord 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
$ccompare :: DocumentSelector -> DocumentSelector -> Ordering
compare :: DocumentSelector -> DocumentSelector -> Ordering
$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
>= :: DocumentSelector -> DocumentSelector -> Bool
$cmax :: DocumentSelector -> DocumentSelector -> DocumentSelector
max :: DocumentSelector -> DocumentSelector -> DocumentSelector
$cmin :: DocumentSelector -> DocumentSelector -> DocumentSelector
min :: DocumentSelector -> DocumentSelector -> DocumentSelector
Ord, (forall x. DocumentSelector -> Rep DocumentSelector x)
-> (forall x. Rep DocumentSelector x -> DocumentSelector)
-> Generic DocumentSelector
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
$cfrom :: forall x. DocumentSelector -> Rep DocumentSelector x
from :: forall x. DocumentSelector -> Rep DocumentSelector x
$cto :: forall x. Rep DocumentSelector x -> DocumentSelector
to :: forall x. Rep DocumentSelector x -> DocumentSelector
Generic)
  deriving anyclass (DocumentSelector -> ()
(DocumentSelector -> ()) -> NFData DocumentSelector
forall a. (a -> ()) -> NFData a
$crnf :: DocumentSelector -> ()
rnf :: DocumentSelector -> ()
NFData, Eq DocumentSelector
Eq DocumentSelector =>
(Int -> DocumentSelector -> Int)
-> (DocumentSelector -> Int) -> Hashable DocumentSelector
Int -> DocumentSelector -> Int
DocumentSelector -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> DocumentSelector -> Int
hashWithSalt :: Int -> DocumentSelector -> Int
$chash :: DocumentSelector -> Int
hash :: DocumentSelector -> Int
Hashable)
  deriving (forall ann. DocumentSelector -> Doc ann)
-> (forall ann. [DocumentSelector] -> Doc ann)
-> Pretty DocumentSelector
forall ann. [DocumentSelector] -> Doc ann
forall ann. DocumentSelector -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. DocumentSelector -> Doc ann
pretty :: forall ann. DocumentSelector -> Doc ann
$cprettyList :: forall ann. [DocumentSelector] -> Doc ann
prettyList :: forall ann. [DocumentSelector] -> Doc ann
Pretty via (ViaJSON DocumentSelector)