{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module Language.LSP.Protocol.Internal.Types.DidOpenTextDocumentParams 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.TextDocumentItem
import qualified Language.LSP.Protocol.Types.Common
data DidOpenTextDocumentParams = DidOpenTextDocumentParams
{
DidOpenTextDocumentParams -> TextDocumentItem
_textDocument :: Language.LSP.Protocol.Internal.Types.TextDocumentItem.TextDocumentItem
}
deriving stock (Int -> DidOpenTextDocumentParams -> ShowS
[DidOpenTextDocumentParams] -> ShowS
DidOpenTextDocumentParams -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DidOpenTextDocumentParams] -> ShowS
$cshowList :: [DidOpenTextDocumentParams] -> ShowS
show :: DidOpenTextDocumentParams -> String
$cshow :: DidOpenTextDocumentParams -> String
showsPrec :: Int -> DidOpenTextDocumentParams -> ShowS
$cshowsPrec :: Int -> DidOpenTextDocumentParams -> ShowS
Show, DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
$c/= :: DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
== :: DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
$c== :: DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
Eq, Eq DidOpenTextDocumentParams
DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Ordering
DidOpenTextDocumentParams
-> DidOpenTextDocumentParams -> DidOpenTextDocumentParams
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 :: DidOpenTextDocumentParams
-> DidOpenTextDocumentParams -> DidOpenTextDocumentParams
$cmin :: DidOpenTextDocumentParams
-> DidOpenTextDocumentParams -> DidOpenTextDocumentParams
max :: DidOpenTextDocumentParams
-> DidOpenTextDocumentParams -> DidOpenTextDocumentParams
$cmax :: DidOpenTextDocumentParams
-> DidOpenTextDocumentParams -> DidOpenTextDocumentParams
>= :: DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
$c>= :: DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
> :: DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
$c> :: DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
<= :: DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
$c<= :: DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
< :: DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
$c< :: DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
compare :: DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Ordering
$ccompare :: DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Ordering
Ord, forall x.
Rep DidOpenTextDocumentParams x -> DidOpenTextDocumentParams
forall x.
DidOpenTextDocumentParams -> Rep DidOpenTextDocumentParams x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DidOpenTextDocumentParams x -> DidOpenTextDocumentParams
$cfrom :: forall x.
DidOpenTextDocumentParams -> Rep DidOpenTextDocumentParams x
Generic)
deriving anyclass (DidOpenTextDocumentParams -> ()
forall a. (a -> ()) -> NFData a
rnf :: DidOpenTextDocumentParams -> ()
$crnf :: DidOpenTextDocumentParams -> ()
NFData, Eq DidOpenTextDocumentParams
Int -> DidOpenTextDocumentParams -> Int
DidOpenTextDocumentParams -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: DidOpenTextDocumentParams -> Int
$chash :: DidOpenTextDocumentParams -> Int
hashWithSalt :: Int -> DidOpenTextDocumentParams -> Int
$chashWithSalt :: Int -> DidOpenTextDocumentParams -> Int
Hashable)
deriving forall ann. [DidOpenTextDocumentParams] -> Doc ann
forall ann. DidOpenTextDocumentParams -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [DidOpenTextDocumentParams] -> Doc ann
$cprettyList :: forall ann. [DidOpenTextDocumentParams] -> Doc ann
pretty :: forall ann. DidOpenTextDocumentParams -> Doc ann
$cpretty :: forall ann. DidOpenTextDocumentParams -> Doc ann
Pretty via (ViaJSON DidOpenTextDocumentParams)
instance Aeson.ToJSON DidOpenTextDocumentParams where
toJSON :: DidOpenTextDocumentParams -> Value
toJSON (DidOpenTextDocumentParams TextDocumentItem
arg0) = [Pair] -> Value
Aeson.object forall a b. (a -> b) -> a -> b
$ forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat forall a b. (a -> b) -> a -> b
$ [[Key
"textDocument" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Aeson..= TextDocumentItem
arg0]]
instance Aeson.FromJSON DidOpenTextDocumentParams where
parseJSON :: Value -> Parser DidOpenTextDocumentParams
parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"DidOpenTextDocumentParams" forall a b. (a -> b) -> a -> b
$ \Object
arg -> TextDocumentItem -> DidOpenTextDocumentParams
DidOpenTextDocumentParams forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"textDocument"