{-# LANGUAGE DuplicateRecordFields      #-}
{-# LANGUAGE TemplateHaskell            #-}
{-# LANGUAGE TypeOperators              #-}
module Language.LSP.Types.TextDocument where

import           Data.Aeson
import           Data.Aeson.TH
import           Data.Default
import           Data.Text                      ( Text )

import           Language.LSP.Types.Common
import           Language.LSP.Types.DocumentFilter
import           Language.LSP.Types.Location
import           Language.LSP.Types.Uri
import           Language.LSP.Types.Utils

-- ---------------------------------------------------------------------

data TextDocumentIdentifier =
  TextDocumentIdentifier
    { TextDocumentIdentifier -> Uri
_uri :: Uri
    } deriving (Int -> TextDocumentIdentifier -> ShowS
[TextDocumentIdentifier] -> ShowS
TextDocumentIdentifier -> String
(Int -> TextDocumentIdentifier -> ShowS)
-> (TextDocumentIdentifier -> String)
-> ([TextDocumentIdentifier] -> ShowS)
-> Show TextDocumentIdentifier
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TextDocumentIdentifier -> ShowS
showsPrec :: Int -> TextDocumentIdentifier -> ShowS
$cshow :: TextDocumentIdentifier -> String
show :: TextDocumentIdentifier -> String
$cshowList :: [TextDocumentIdentifier] -> ShowS
showList :: [TextDocumentIdentifier] -> ShowS
Show, ReadPrec [TextDocumentIdentifier]
ReadPrec TextDocumentIdentifier
Int -> ReadS TextDocumentIdentifier
ReadS [TextDocumentIdentifier]
(Int -> ReadS TextDocumentIdentifier)
-> ReadS [TextDocumentIdentifier]
-> ReadPrec TextDocumentIdentifier
-> ReadPrec [TextDocumentIdentifier]
-> Read TextDocumentIdentifier
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS TextDocumentIdentifier
readsPrec :: Int -> ReadS TextDocumentIdentifier
$creadList :: ReadS [TextDocumentIdentifier]
readList :: ReadS [TextDocumentIdentifier]
$creadPrec :: ReadPrec TextDocumentIdentifier
readPrec :: ReadPrec TextDocumentIdentifier
$creadListPrec :: ReadPrec [TextDocumentIdentifier]
readListPrec :: ReadPrec [TextDocumentIdentifier]
Read, TextDocumentIdentifier -> TextDocumentIdentifier -> Bool
(TextDocumentIdentifier -> TextDocumentIdentifier -> Bool)
-> (TextDocumentIdentifier -> TextDocumentIdentifier -> Bool)
-> Eq TextDocumentIdentifier
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TextDocumentIdentifier -> TextDocumentIdentifier -> Bool
== :: TextDocumentIdentifier -> TextDocumentIdentifier -> Bool
$c/= :: TextDocumentIdentifier -> TextDocumentIdentifier -> Bool
/= :: TextDocumentIdentifier -> TextDocumentIdentifier -> Bool
Eq)
deriveJSON lspOptions ''TextDocumentIdentifier

type TextDocumentVersion = Maybe Int32

makeExtendingDatatype "VersionedTextDocumentIdentifier" [''TextDocumentIdentifier]
  [ ("_version", [t| TextDocumentVersion |])]
deriveJSON lspOptions ''VersionedTextDocumentIdentifier

data TextDocumentItem =
  TextDocumentItem {
    TextDocumentItem -> Uri
_uri        :: Uri
  , TextDocumentItem -> Text
_languageId :: Text
  , TextDocumentItem -> Int32
_version    :: Int32
  , TextDocumentItem -> Text
_text       :: Text
  } deriving (Int -> TextDocumentItem -> ShowS
[TextDocumentItem] -> ShowS
TextDocumentItem -> String
(Int -> TextDocumentItem -> ShowS)
-> (TextDocumentItem -> String)
-> ([TextDocumentItem] -> ShowS)
-> Show TextDocumentItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TextDocumentItem -> ShowS
showsPrec :: Int -> TextDocumentItem -> ShowS
$cshow :: TextDocumentItem -> String
show :: TextDocumentItem -> String
$cshowList :: [TextDocumentItem] -> ShowS
showList :: [TextDocumentItem] -> ShowS
Show, ReadPrec [TextDocumentItem]
ReadPrec TextDocumentItem
Int -> ReadS TextDocumentItem
ReadS [TextDocumentItem]
(Int -> ReadS TextDocumentItem)
-> ReadS [TextDocumentItem]
-> ReadPrec TextDocumentItem
-> ReadPrec [TextDocumentItem]
-> Read TextDocumentItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS TextDocumentItem
readsPrec :: Int -> ReadS TextDocumentItem
$creadList :: ReadS [TextDocumentItem]
readList :: ReadS [TextDocumentItem]
$creadPrec :: ReadPrec TextDocumentItem
readPrec :: ReadPrec TextDocumentItem
$creadListPrec :: ReadPrec [TextDocumentItem]
readListPrec :: ReadPrec [TextDocumentItem]
Read, TextDocumentItem -> TextDocumentItem -> Bool
(TextDocumentItem -> TextDocumentItem -> Bool)
-> (TextDocumentItem -> TextDocumentItem -> Bool)
-> Eq TextDocumentItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TextDocumentItem -> TextDocumentItem -> Bool
== :: TextDocumentItem -> TextDocumentItem -> Bool
$c/= :: TextDocumentItem -> TextDocumentItem -> Bool
/= :: TextDocumentItem -> TextDocumentItem -> Bool
Eq)

deriveJSON lspOptions ''TextDocumentItem

-- ---------------------------------------------------------------------

data TextDocumentPositionParams =
  TextDocumentPositionParams
    { -- | The text document.
      TextDocumentPositionParams -> TextDocumentIdentifier
_textDocument :: TextDocumentIdentifier
    , -- | The position inside the text document.
      TextDocumentPositionParams -> Position
_position     :: Position
    } deriving (Int -> TextDocumentPositionParams -> ShowS
[TextDocumentPositionParams] -> ShowS
TextDocumentPositionParams -> String
(Int -> TextDocumentPositionParams -> ShowS)
-> (TextDocumentPositionParams -> String)
-> ([TextDocumentPositionParams] -> ShowS)
-> Show TextDocumentPositionParams
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TextDocumentPositionParams -> ShowS
showsPrec :: Int -> TextDocumentPositionParams -> ShowS
$cshow :: TextDocumentPositionParams -> String
show :: TextDocumentPositionParams -> String
$cshowList :: [TextDocumentPositionParams] -> ShowS
showList :: [TextDocumentPositionParams] -> ShowS
Show, ReadPrec [TextDocumentPositionParams]
ReadPrec TextDocumentPositionParams
Int -> ReadS TextDocumentPositionParams
ReadS [TextDocumentPositionParams]
(Int -> ReadS TextDocumentPositionParams)
-> ReadS [TextDocumentPositionParams]
-> ReadPrec TextDocumentPositionParams
-> ReadPrec [TextDocumentPositionParams]
-> Read TextDocumentPositionParams
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS TextDocumentPositionParams
readsPrec :: Int -> ReadS TextDocumentPositionParams
$creadList :: ReadS [TextDocumentPositionParams]
readList :: ReadS [TextDocumentPositionParams]
$creadPrec :: ReadPrec TextDocumentPositionParams
readPrec :: ReadPrec TextDocumentPositionParams
$creadListPrec :: ReadPrec [TextDocumentPositionParams]
readListPrec :: ReadPrec [TextDocumentPositionParams]
Read, TextDocumentPositionParams -> TextDocumentPositionParams -> Bool
(TextDocumentPositionParams -> TextDocumentPositionParams -> Bool)
-> (TextDocumentPositionParams
    -> TextDocumentPositionParams -> Bool)
-> Eq TextDocumentPositionParams
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TextDocumentPositionParams -> TextDocumentPositionParams -> Bool
== :: TextDocumentPositionParams -> TextDocumentPositionParams -> Bool
$c/= :: TextDocumentPositionParams -> TextDocumentPositionParams -> Bool
/= :: TextDocumentPositionParams -> TextDocumentPositionParams -> Bool
Eq)

deriveJSON lspOptions ''TextDocumentPositionParams

-- -------------------------------------

-- Text document synchronisation


data TextDocumentSyncClientCapabilities =
  TextDocumentSyncClientCapabilities
    { -- | Whether text document synchronization supports dynamic registration.
      TextDocumentSyncClientCapabilities -> Maybe Bool
_dynamicRegistration :: Maybe Bool

      -- | The client supports sending will save notifications.
    , TextDocumentSyncClientCapabilities -> Maybe Bool
_willSave :: Maybe Bool

      -- | The client supports sending a will save request and waits for a
      -- response providing text edits which will be applied to the document
      -- before it is saved.
    , TextDocumentSyncClientCapabilities -> Maybe Bool
_willSaveWaitUntil :: Maybe Bool

      -- | The client supports did save notifications.
    , TextDocumentSyncClientCapabilities -> Maybe Bool
_didSave :: Maybe Bool
    } deriving (Int -> TextDocumentSyncClientCapabilities -> ShowS
[TextDocumentSyncClientCapabilities] -> ShowS
TextDocumentSyncClientCapabilities -> String
(Int -> TextDocumentSyncClientCapabilities -> ShowS)
-> (TextDocumentSyncClientCapabilities -> String)
-> ([TextDocumentSyncClientCapabilities] -> ShowS)
-> Show TextDocumentSyncClientCapabilities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TextDocumentSyncClientCapabilities -> ShowS
showsPrec :: Int -> TextDocumentSyncClientCapabilities -> ShowS
$cshow :: TextDocumentSyncClientCapabilities -> String
show :: TextDocumentSyncClientCapabilities -> String
$cshowList :: [TextDocumentSyncClientCapabilities] -> ShowS
showList :: [TextDocumentSyncClientCapabilities] -> ShowS
Show, ReadPrec [TextDocumentSyncClientCapabilities]
ReadPrec TextDocumentSyncClientCapabilities
Int -> ReadS TextDocumentSyncClientCapabilities
ReadS [TextDocumentSyncClientCapabilities]
(Int -> ReadS TextDocumentSyncClientCapabilities)
-> ReadS [TextDocumentSyncClientCapabilities]
-> ReadPrec TextDocumentSyncClientCapabilities
-> ReadPrec [TextDocumentSyncClientCapabilities]
-> Read TextDocumentSyncClientCapabilities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS TextDocumentSyncClientCapabilities
readsPrec :: Int -> ReadS TextDocumentSyncClientCapabilities
$creadList :: ReadS [TextDocumentSyncClientCapabilities]
readList :: ReadS [TextDocumentSyncClientCapabilities]
$creadPrec :: ReadPrec TextDocumentSyncClientCapabilities
readPrec :: ReadPrec TextDocumentSyncClientCapabilities
$creadListPrec :: ReadPrec [TextDocumentSyncClientCapabilities]
readListPrec :: ReadPrec [TextDocumentSyncClientCapabilities]
Read, TextDocumentSyncClientCapabilities
-> TextDocumentSyncClientCapabilities -> Bool
(TextDocumentSyncClientCapabilities
 -> TextDocumentSyncClientCapabilities -> Bool)
-> (TextDocumentSyncClientCapabilities
    -> TextDocumentSyncClientCapabilities -> Bool)
-> Eq TextDocumentSyncClientCapabilities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TextDocumentSyncClientCapabilities
-> TextDocumentSyncClientCapabilities -> Bool
== :: TextDocumentSyncClientCapabilities
-> TextDocumentSyncClientCapabilities -> Bool
$c/= :: TextDocumentSyncClientCapabilities
-> TextDocumentSyncClientCapabilities -> Bool
/= :: TextDocumentSyncClientCapabilities
-> TextDocumentSyncClientCapabilities -> Bool
Eq)

deriveJSON lspOptions ''TextDocumentSyncClientCapabilities

instance Default TextDocumentSyncClientCapabilities where
  def :: TextDocumentSyncClientCapabilities
def = Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> TextDocumentSyncClientCapabilities
TextDocumentSyncClientCapabilities Maybe Bool
forall a. Default a => a
def Maybe Bool
forall a. Default a => a
def Maybe Bool
forall a. Default a => a
def Maybe Bool
forall a. Default a => a
def

-- -------------------------------------

data SaveOptions =
  SaveOptions
  { -- | The client is supposed to include the content on save.
    SaveOptions -> Maybe Bool
_includeText :: Maybe Bool
  } deriving (Int -> SaveOptions -> ShowS
[SaveOptions] -> ShowS
SaveOptions -> String
(Int -> SaveOptions -> ShowS)
-> (SaveOptions -> String)
-> ([SaveOptions] -> ShowS)
-> Show SaveOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SaveOptions -> ShowS
showsPrec :: Int -> SaveOptions -> ShowS
$cshow :: SaveOptions -> String
show :: SaveOptions -> String
$cshowList :: [SaveOptions] -> ShowS
showList :: [SaveOptions] -> ShowS
Show, ReadPrec [SaveOptions]
ReadPrec SaveOptions
Int -> ReadS SaveOptions
ReadS [SaveOptions]
(Int -> ReadS SaveOptions)
-> ReadS [SaveOptions]
-> ReadPrec SaveOptions
-> ReadPrec [SaveOptions]
-> Read SaveOptions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS SaveOptions
readsPrec :: Int -> ReadS SaveOptions
$creadList :: ReadS [SaveOptions]
readList :: ReadS [SaveOptions]
$creadPrec :: ReadPrec SaveOptions
readPrec :: ReadPrec SaveOptions
$creadListPrec :: ReadPrec [SaveOptions]
readListPrec :: ReadPrec [SaveOptions]
Read, SaveOptions -> SaveOptions -> Bool
(SaveOptions -> SaveOptions -> Bool)
-> (SaveOptions -> SaveOptions -> Bool) -> Eq SaveOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SaveOptions -> SaveOptions -> Bool
== :: SaveOptions -> SaveOptions -> Bool
$c/= :: SaveOptions -> SaveOptions -> Bool
/= :: SaveOptions -> SaveOptions -> Bool
Eq)
deriveJSON lspOptions ''SaveOptions

-- -------------------------------------

-- | Defines how the host (editor) should sync document changes to the language server.
data TextDocumentSyncKind
  = -- | Documents should not be synced at all.
    TdSyncNone
  | -- | Documents are synced by always sending the full content of the document.
    TdSyncFull
  | -- | Documents are synced by sending the full content on open. After that only incremental updates to the document are send.
    TdSyncIncremental
  deriving (ReadPrec [TextDocumentSyncKind]
ReadPrec TextDocumentSyncKind
Int -> ReadS TextDocumentSyncKind
ReadS [TextDocumentSyncKind]
(Int -> ReadS TextDocumentSyncKind)
-> ReadS [TextDocumentSyncKind]
-> ReadPrec TextDocumentSyncKind
-> ReadPrec [TextDocumentSyncKind]
-> Read TextDocumentSyncKind
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS TextDocumentSyncKind
readsPrec :: Int -> ReadS TextDocumentSyncKind
$creadList :: ReadS [TextDocumentSyncKind]
readList :: ReadS [TextDocumentSyncKind]
$creadPrec :: ReadPrec TextDocumentSyncKind
readPrec :: ReadPrec TextDocumentSyncKind
$creadListPrec :: ReadPrec [TextDocumentSyncKind]
readListPrec :: ReadPrec [TextDocumentSyncKind]
Read, TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
(TextDocumentSyncKind -> TextDocumentSyncKind -> Bool)
-> (TextDocumentSyncKind -> TextDocumentSyncKind -> Bool)
-> Eq TextDocumentSyncKind
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
== :: TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
$c/= :: TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
/= :: TextDocumentSyncKind -> TextDocumentSyncKind -> Bool
Eq, Int -> TextDocumentSyncKind -> ShowS
[TextDocumentSyncKind] -> ShowS
TextDocumentSyncKind -> String
(Int -> TextDocumentSyncKind -> ShowS)
-> (TextDocumentSyncKind -> String)
-> ([TextDocumentSyncKind] -> ShowS)
-> Show TextDocumentSyncKind
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TextDocumentSyncKind -> ShowS
showsPrec :: Int -> TextDocumentSyncKind -> ShowS
$cshow :: TextDocumentSyncKind -> String
show :: TextDocumentSyncKind -> String
$cshowList :: [TextDocumentSyncKind] -> ShowS
showList :: [TextDocumentSyncKind] -> ShowS
Show)

instance ToJSON TextDocumentSyncKind where
  toJSON :: TextDocumentSyncKind -> Value
toJSON TextDocumentSyncKind
TdSyncNone        = Scientific -> Value
Number Scientific
0
  toJSON TextDocumentSyncKind
TdSyncFull        = Scientific -> Value
Number Scientific
1
  toJSON TextDocumentSyncKind
TdSyncIncremental = Scientific -> Value
Number Scientific
2

instance FromJSON TextDocumentSyncKind where
  parseJSON :: Value -> Parser TextDocumentSyncKind
parseJSON (Number Scientific
0) = TextDocumentSyncKind -> Parser TextDocumentSyncKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure TextDocumentSyncKind
TdSyncNone
  parseJSON (Number Scientific
1) = TextDocumentSyncKind -> Parser TextDocumentSyncKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure TextDocumentSyncKind
TdSyncFull
  parseJSON (Number Scientific
2) = TextDocumentSyncKind -> Parser TextDocumentSyncKind
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure TextDocumentSyncKind
TdSyncIncremental
  parseJSON Value
_          = String -> Parser TextDocumentSyncKind
forall a. String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"TextDocumentSyncKind"

data TextDocumentSyncOptions =
  TextDocumentSyncOptions
  { -- | Open and close notifications are sent to the server. If omitted open
    -- close notification should not be sent.
    TextDocumentSyncOptions -> Maybe Bool
_openClose :: Maybe Bool
  , -- | Change notifications are sent to the server. See
    -- TextDocumentSyncKind.None, TextDocumentSyncKind.Full
    -- and TextDocumentSyncKind.Incremental. If omitted it defaults to
    -- TextDocumentSyncKind.None.
    TextDocumentSyncOptions -> Maybe TextDocumentSyncKind
_change    :: Maybe TextDocumentSyncKind
    -- | If present will save notifications are sent to the server. If omitted the notification should not be
    -- sent.
  , TextDocumentSyncOptions -> Maybe Bool
_willSave  :: Maybe Bool
    -- | If present will save wait until requests are sent to the server. If omitted the request should not be
    -- sent.
  , TextDocumentSyncOptions -> Maybe Bool
_willSaveWaitUntil :: Maybe Bool
    -- | If present save notifications are sent to the server. If omitted the
    -- notification should not be sent.
  , TextDocumentSyncOptions -> Maybe (Bool |? SaveOptions)
_save      :: Maybe (Bool |? SaveOptions)
  } deriving (Int -> TextDocumentSyncOptions -> ShowS
[TextDocumentSyncOptions] -> ShowS
TextDocumentSyncOptions -> String
(Int -> TextDocumentSyncOptions -> ShowS)
-> (TextDocumentSyncOptions -> String)
-> ([TextDocumentSyncOptions] -> ShowS)
-> Show TextDocumentSyncOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TextDocumentSyncOptions -> ShowS
showsPrec :: Int -> TextDocumentSyncOptions -> ShowS
$cshow :: TextDocumentSyncOptions -> String
show :: TextDocumentSyncOptions -> String
$cshowList :: [TextDocumentSyncOptions] -> ShowS
showList :: [TextDocumentSyncOptions] -> ShowS
Show, ReadPrec [TextDocumentSyncOptions]
ReadPrec TextDocumentSyncOptions
Int -> ReadS TextDocumentSyncOptions
ReadS [TextDocumentSyncOptions]
(Int -> ReadS TextDocumentSyncOptions)
-> ReadS [TextDocumentSyncOptions]
-> ReadPrec TextDocumentSyncOptions
-> ReadPrec [TextDocumentSyncOptions]
-> Read TextDocumentSyncOptions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS TextDocumentSyncOptions
readsPrec :: Int -> ReadS TextDocumentSyncOptions
$creadList :: ReadS [TextDocumentSyncOptions]
readList :: ReadS [TextDocumentSyncOptions]
$creadPrec :: ReadPrec TextDocumentSyncOptions
readPrec :: ReadPrec TextDocumentSyncOptions
$creadListPrec :: ReadPrec [TextDocumentSyncOptions]
readListPrec :: ReadPrec [TextDocumentSyncOptions]
Read, TextDocumentSyncOptions -> TextDocumentSyncOptions -> Bool
(TextDocumentSyncOptions -> TextDocumentSyncOptions -> Bool)
-> (TextDocumentSyncOptions -> TextDocumentSyncOptions -> Bool)
-> Eq TextDocumentSyncOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TextDocumentSyncOptions -> TextDocumentSyncOptions -> Bool
== :: TextDocumentSyncOptions -> TextDocumentSyncOptions -> Bool
$c/= :: TextDocumentSyncOptions -> TextDocumentSyncOptions -> Bool
/= :: TextDocumentSyncOptions -> TextDocumentSyncOptions -> Bool
Eq)
deriveJSON lspOptions ''TextDocumentSyncOptions

-- -------------------------------------

{-
Since most of the registration options require to specify a document selector
there is a base interface that can be used.
-}

data TextDocumentRegistrationOptions =
  TextDocumentRegistrationOptions
    { TextDocumentRegistrationOptions -> Maybe DocumentSelector
_documentSelector :: Maybe DocumentSelector
    } deriving (Int -> TextDocumentRegistrationOptions -> ShowS
[TextDocumentRegistrationOptions] -> ShowS
TextDocumentRegistrationOptions -> String
(Int -> TextDocumentRegistrationOptions -> ShowS)
-> (TextDocumentRegistrationOptions -> String)
-> ([TextDocumentRegistrationOptions] -> ShowS)
-> Show TextDocumentRegistrationOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TextDocumentRegistrationOptions -> ShowS
showsPrec :: Int -> TextDocumentRegistrationOptions -> ShowS
$cshow :: TextDocumentRegistrationOptions -> String
show :: TextDocumentRegistrationOptions -> String
$cshowList :: [TextDocumentRegistrationOptions] -> ShowS
showList :: [TextDocumentRegistrationOptions] -> ShowS
Show, ReadPrec [TextDocumentRegistrationOptions]
ReadPrec TextDocumentRegistrationOptions
Int -> ReadS TextDocumentRegistrationOptions
ReadS [TextDocumentRegistrationOptions]
(Int -> ReadS TextDocumentRegistrationOptions)
-> ReadS [TextDocumentRegistrationOptions]
-> ReadPrec TextDocumentRegistrationOptions
-> ReadPrec [TextDocumentRegistrationOptions]
-> Read TextDocumentRegistrationOptions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS TextDocumentRegistrationOptions
readsPrec :: Int -> ReadS TextDocumentRegistrationOptions
$creadList :: ReadS [TextDocumentRegistrationOptions]
readList :: ReadS [TextDocumentRegistrationOptions]
$creadPrec :: ReadPrec TextDocumentRegistrationOptions
readPrec :: ReadPrec TextDocumentRegistrationOptions
$creadListPrec :: ReadPrec [TextDocumentRegistrationOptions]
readListPrec :: ReadPrec [TextDocumentRegistrationOptions]
Read, TextDocumentRegistrationOptions
-> TextDocumentRegistrationOptions -> Bool
(TextDocumentRegistrationOptions
 -> TextDocumentRegistrationOptions -> Bool)
-> (TextDocumentRegistrationOptions
    -> TextDocumentRegistrationOptions -> Bool)
-> Eq TextDocumentRegistrationOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TextDocumentRegistrationOptions
-> TextDocumentRegistrationOptions -> Bool
== :: TextDocumentRegistrationOptions
-> TextDocumentRegistrationOptions -> Bool
$c/= :: TextDocumentRegistrationOptions
-> TextDocumentRegistrationOptions -> Bool
/= :: TextDocumentRegistrationOptions
-> TextDocumentRegistrationOptions -> Bool
Eq)

deriveJSON lspOptions ''TextDocumentRegistrationOptions

-- -------------------------------------

data DidOpenTextDocumentParams =
  DidOpenTextDocumentParams
  { -- | The document that was opened.
    DidOpenTextDocumentParams -> TextDocumentItem
_textDocument :: TextDocumentItem
  } deriving (Int -> DidOpenTextDocumentParams -> ShowS
[DidOpenTextDocumentParams] -> ShowS
DidOpenTextDocumentParams -> String
(Int -> DidOpenTextDocumentParams -> ShowS)
-> (DidOpenTextDocumentParams -> String)
-> ([DidOpenTextDocumentParams] -> ShowS)
-> Show DidOpenTextDocumentParams
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DidOpenTextDocumentParams -> ShowS
showsPrec :: Int -> DidOpenTextDocumentParams -> ShowS
$cshow :: DidOpenTextDocumentParams -> String
show :: DidOpenTextDocumentParams -> String
$cshowList :: [DidOpenTextDocumentParams] -> ShowS
showList :: [DidOpenTextDocumentParams] -> ShowS
Show, ReadPrec [DidOpenTextDocumentParams]
ReadPrec DidOpenTextDocumentParams
Int -> ReadS DidOpenTextDocumentParams
ReadS [DidOpenTextDocumentParams]
(Int -> ReadS DidOpenTextDocumentParams)
-> ReadS [DidOpenTextDocumentParams]
-> ReadPrec DidOpenTextDocumentParams
-> ReadPrec [DidOpenTextDocumentParams]
-> Read DidOpenTextDocumentParams
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS DidOpenTextDocumentParams
readsPrec :: Int -> ReadS DidOpenTextDocumentParams
$creadList :: ReadS [DidOpenTextDocumentParams]
readList :: ReadS [DidOpenTextDocumentParams]
$creadPrec :: ReadPrec DidOpenTextDocumentParams
readPrec :: ReadPrec DidOpenTextDocumentParams
$creadListPrec :: ReadPrec [DidOpenTextDocumentParams]
readListPrec :: ReadPrec [DidOpenTextDocumentParams]
Read, DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
(DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool)
-> (DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool)
-> Eq DidOpenTextDocumentParams
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
== :: DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
$c/= :: DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
/= :: DidOpenTextDocumentParams -> DidOpenTextDocumentParams -> Bool
Eq)

deriveJSON lspOptions ''DidOpenTextDocumentParams

-- -------------------------------------

makeExtendingDatatype "TextDocumentChangeRegistrationOptions"
  [''TextDocumentRegistrationOptions]
  [("_syncKind", [t| TextDocumentSyncKind |])]

deriveJSON lspOptions ''TextDocumentChangeRegistrationOptions

data TextDocumentContentChangeEvent =
  TextDocumentContentChangeEvent
    { -- | The range of the document that changed.
      TextDocumentContentChangeEvent -> Maybe Range
_range       :: Maybe Range
      -- | The optional length of the range that got replaced.
      -- Deprecated, use _range instead
    , TextDocumentContentChangeEvent -> Maybe UInt
_rangeLength :: Maybe UInt
      -- | The new text for the provided range, if provided.
      -- Otherwise the new text of the whole document.
    , TextDocumentContentChangeEvent -> Text
_text        :: Text
    }
  deriving (ReadPrec [TextDocumentContentChangeEvent]
ReadPrec TextDocumentContentChangeEvent
Int -> ReadS TextDocumentContentChangeEvent
ReadS [TextDocumentContentChangeEvent]
(Int -> ReadS TextDocumentContentChangeEvent)
-> ReadS [TextDocumentContentChangeEvent]
-> ReadPrec TextDocumentContentChangeEvent
-> ReadPrec [TextDocumentContentChangeEvent]
-> Read TextDocumentContentChangeEvent
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS TextDocumentContentChangeEvent
readsPrec :: Int -> ReadS TextDocumentContentChangeEvent
$creadList :: ReadS [TextDocumentContentChangeEvent]
readList :: ReadS [TextDocumentContentChangeEvent]
$creadPrec :: ReadPrec TextDocumentContentChangeEvent
readPrec :: ReadPrec TextDocumentContentChangeEvent
$creadListPrec :: ReadPrec [TextDocumentContentChangeEvent]
readListPrec :: ReadPrec [TextDocumentContentChangeEvent]
Read,Int -> TextDocumentContentChangeEvent -> ShowS
[TextDocumentContentChangeEvent] -> ShowS
TextDocumentContentChangeEvent -> String
(Int -> TextDocumentContentChangeEvent -> ShowS)
-> (TextDocumentContentChangeEvent -> String)
-> ([TextDocumentContentChangeEvent] -> ShowS)
-> Show TextDocumentContentChangeEvent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TextDocumentContentChangeEvent -> ShowS
showsPrec :: Int -> TextDocumentContentChangeEvent -> ShowS
$cshow :: TextDocumentContentChangeEvent -> String
show :: TextDocumentContentChangeEvent -> String
$cshowList :: [TextDocumentContentChangeEvent] -> ShowS
showList :: [TextDocumentContentChangeEvent] -> ShowS
Show,TextDocumentContentChangeEvent
-> TextDocumentContentChangeEvent -> Bool
(TextDocumentContentChangeEvent
 -> TextDocumentContentChangeEvent -> Bool)
-> (TextDocumentContentChangeEvent
    -> TextDocumentContentChangeEvent -> Bool)
-> Eq TextDocumentContentChangeEvent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TextDocumentContentChangeEvent
-> TextDocumentContentChangeEvent -> Bool
== :: TextDocumentContentChangeEvent
-> TextDocumentContentChangeEvent -> Bool
$c/= :: TextDocumentContentChangeEvent
-> TextDocumentContentChangeEvent -> Bool
/= :: TextDocumentContentChangeEvent
-> TextDocumentContentChangeEvent -> Bool
Eq)

deriveJSON lspOptions ''TextDocumentContentChangeEvent

-- -------------------------------------

data DidChangeTextDocumentParams =
  DidChangeTextDocumentParams
    { -- | The document that did change. The version number points
      -- to the version after all provided content changes have
      -- been applied.
      DidChangeTextDocumentParams -> VersionedTextDocumentIdentifier
_textDocument   :: VersionedTextDocumentIdentifier
      -- | The actual content changes. The content changes describe single state changes
      -- to the document. So if there are two content changes c1 (at array index 0) and
      -- c2 (at array index 1) for a document in state S then c1 moves the document from
      -- S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed
      -- on the state S'.
      --
      -- To mirror the content of a document using change events use the following approach:
      -- - start with the same initial content
      -- - apply the 'textDocument/didChange' notifications in the order you recevie them.
      -- - apply the `TextDocumentContentChangeEvent`s in a single notification in the order
      --   you receive them.
    , DidChangeTextDocumentParams -> List TextDocumentContentChangeEvent
_contentChanges :: List TextDocumentContentChangeEvent
    } deriving (Int -> DidChangeTextDocumentParams -> ShowS
[DidChangeTextDocumentParams] -> ShowS
DidChangeTextDocumentParams -> String
(Int -> DidChangeTextDocumentParams -> ShowS)
-> (DidChangeTextDocumentParams -> String)
-> ([DidChangeTextDocumentParams] -> ShowS)
-> Show DidChangeTextDocumentParams
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DidChangeTextDocumentParams -> ShowS
showsPrec :: Int -> DidChangeTextDocumentParams -> ShowS
$cshow :: DidChangeTextDocumentParams -> String
show :: DidChangeTextDocumentParams -> String
$cshowList :: [DidChangeTextDocumentParams] -> ShowS
showList :: [DidChangeTextDocumentParams] -> ShowS
Show,ReadPrec [DidChangeTextDocumentParams]
ReadPrec DidChangeTextDocumentParams
Int -> ReadS DidChangeTextDocumentParams
ReadS [DidChangeTextDocumentParams]
(Int -> ReadS DidChangeTextDocumentParams)
-> ReadS [DidChangeTextDocumentParams]
-> ReadPrec DidChangeTextDocumentParams
-> ReadPrec [DidChangeTextDocumentParams]
-> Read DidChangeTextDocumentParams
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS DidChangeTextDocumentParams
readsPrec :: Int -> ReadS DidChangeTextDocumentParams
$creadList :: ReadS [DidChangeTextDocumentParams]
readList :: ReadS [DidChangeTextDocumentParams]
$creadPrec :: ReadPrec DidChangeTextDocumentParams
readPrec :: ReadPrec DidChangeTextDocumentParams
$creadListPrec :: ReadPrec [DidChangeTextDocumentParams]
readListPrec :: ReadPrec [DidChangeTextDocumentParams]
Read,DidChangeTextDocumentParams -> DidChangeTextDocumentParams -> Bool
(DidChangeTextDocumentParams
 -> DidChangeTextDocumentParams -> Bool)
-> (DidChangeTextDocumentParams
    -> DidChangeTextDocumentParams -> Bool)
-> Eq DidChangeTextDocumentParams
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DidChangeTextDocumentParams -> DidChangeTextDocumentParams -> Bool
== :: DidChangeTextDocumentParams -> DidChangeTextDocumentParams -> Bool
$c/= :: DidChangeTextDocumentParams -> DidChangeTextDocumentParams -> Bool
/= :: DidChangeTextDocumentParams -> DidChangeTextDocumentParams -> Bool
Eq)

deriveJSON lspOptions ''DidChangeTextDocumentParams

-- -------------------------------------

data TextDocumentSaveReason
  = SaveManual
         -- ^ Manually triggered, e.g. by the user pressing save, by starting
         -- debugging, or by an API call.
  | SaveAfterDelay -- ^ Automatic after a delay
  | SaveFocusOut   -- ^ When the editor lost focus
  deriving (Int -> TextDocumentSaveReason -> ShowS
[TextDocumentSaveReason] -> ShowS
TextDocumentSaveReason -> String
(Int -> TextDocumentSaveReason -> ShowS)
-> (TextDocumentSaveReason -> String)
-> ([TextDocumentSaveReason] -> ShowS)
-> Show TextDocumentSaveReason
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TextDocumentSaveReason -> ShowS
showsPrec :: Int -> TextDocumentSaveReason -> ShowS
$cshow :: TextDocumentSaveReason -> String
show :: TextDocumentSaveReason -> String
$cshowList :: [TextDocumentSaveReason] -> ShowS
showList :: [TextDocumentSaveReason] -> ShowS
Show, ReadPrec [TextDocumentSaveReason]
ReadPrec TextDocumentSaveReason
Int -> ReadS TextDocumentSaveReason
ReadS [TextDocumentSaveReason]
(Int -> ReadS TextDocumentSaveReason)
-> ReadS [TextDocumentSaveReason]
-> ReadPrec TextDocumentSaveReason
-> ReadPrec [TextDocumentSaveReason]
-> Read TextDocumentSaveReason
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS TextDocumentSaveReason
readsPrec :: Int -> ReadS TextDocumentSaveReason
$creadList :: ReadS [TextDocumentSaveReason]
readList :: ReadS [TextDocumentSaveReason]
$creadPrec :: ReadPrec TextDocumentSaveReason
readPrec :: ReadPrec TextDocumentSaveReason
$creadListPrec :: ReadPrec [TextDocumentSaveReason]
readListPrec :: ReadPrec [TextDocumentSaveReason]
Read, TextDocumentSaveReason -> TextDocumentSaveReason -> Bool
(TextDocumentSaveReason -> TextDocumentSaveReason -> Bool)
-> (TextDocumentSaveReason -> TextDocumentSaveReason -> Bool)
-> Eq TextDocumentSaveReason
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TextDocumentSaveReason -> TextDocumentSaveReason -> Bool
== :: TextDocumentSaveReason -> TextDocumentSaveReason -> Bool
$c/= :: TextDocumentSaveReason -> TextDocumentSaveReason -> Bool
/= :: TextDocumentSaveReason -> TextDocumentSaveReason -> Bool
Eq)

instance ToJSON TextDocumentSaveReason where
  toJSON :: TextDocumentSaveReason -> Value
toJSON TextDocumentSaveReason
SaveManual     = Scientific -> Value
Number Scientific
1
  toJSON TextDocumentSaveReason
SaveAfterDelay = Scientific -> Value
Number Scientific
2
  toJSON TextDocumentSaveReason
SaveFocusOut   = Scientific -> Value
Number Scientific
3

instance FromJSON TextDocumentSaveReason where
  parseJSON :: Value -> Parser TextDocumentSaveReason
parseJSON (Number Scientific
1) = TextDocumentSaveReason -> Parser TextDocumentSaveReason
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure TextDocumentSaveReason
SaveManual
  parseJSON (Number Scientific
2) = TextDocumentSaveReason -> Parser TextDocumentSaveReason
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure TextDocumentSaveReason
SaveAfterDelay
  parseJSON (Number Scientific
3) = TextDocumentSaveReason -> Parser TextDocumentSaveReason
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure TextDocumentSaveReason
SaveFocusOut
  parseJSON Value
_          = String -> Parser TextDocumentSaveReason
forall a. String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
fail String
"TextDocumentSaveReason"

data WillSaveTextDocumentParams =
  WillSaveTextDocumentParams
    { -- | The document that will be saved.
      WillSaveTextDocumentParams -> TextDocumentIdentifier
_textDocument :: TextDocumentIdentifier
      -- | The 'TextDocumentSaveReason'.
    , WillSaveTextDocumentParams -> TextDocumentSaveReason
_reason       :: TextDocumentSaveReason
    } deriving (Int -> WillSaveTextDocumentParams -> ShowS
[WillSaveTextDocumentParams] -> ShowS
WillSaveTextDocumentParams -> String
(Int -> WillSaveTextDocumentParams -> ShowS)
-> (WillSaveTextDocumentParams -> String)
-> ([WillSaveTextDocumentParams] -> ShowS)
-> Show WillSaveTextDocumentParams
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WillSaveTextDocumentParams -> ShowS
showsPrec :: Int -> WillSaveTextDocumentParams -> ShowS
$cshow :: WillSaveTextDocumentParams -> String
show :: WillSaveTextDocumentParams -> String
$cshowList :: [WillSaveTextDocumentParams] -> ShowS
showList :: [WillSaveTextDocumentParams] -> ShowS
Show, ReadPrec [WillSaveTextDocumentParams]
ReadPrec WillSaveTextDocumentParams
Int -> ReadS WillSaveTextDocumentParams
ReadS [WillSaveTextDocumentParams]
(Int -> ReadS WillSaveTextDocumentParams)
-> ReadS [WillSaveTextDocumentParams]
-> ReadPrec WillSaveTextDocumentParams
-> ReadPrec [WillSaveTextDocumentParams]
-> Read WillSaveTextDocumentParams
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS WillSaveTextDocumentParams
readsPrec :: Int -> ReadS WillSaveTextDocumentParams
$creadList :: ReadS [WillSaveTextDocumentParams]
readList :: ReadS [WillSaveTextDocumentParams]
$creadPrec :: ReadPrec WillSaveTextDocumentParams
readPrec :: ReadPrec WillSaveTextDocumentParams
$creadListPrec :: ReadPrec [WillSaveTextDocumentParams]
readListPrec :: ReadPrec [WillSaveTextDocumentParams]
Read, WillSaveTextDocumentParams -> WillSaveTextDocumentParams -> Bool
(WillSaveTextDocumentParams -> WillSaveTextDocumentParams -> Bool)
-> (WillSaveTextDocumentParams
    -> WillSaveTextDocumentParams -> Bool)
-> Eq WillSaveTextDocumentParams
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WillSaveTextDocumentParams -> WillSaveTextDocumentParams -> Bool
== :: WillSaveTextDocumentParams -> WillSaveTextDocumentParams -> Bool
$c/= :: WillSaveTextDocumentParams -> WillSaveTextDocumentParams -> Bool
/= :: WillSaveTextDocumentParams -> WillSaveTextDocumentParams -> Bool
Eq)

deriveJSON lspOptions ''WillSaveTextDocumentParams

-- -------------------------------------


makeExtendingDatatype "TextDocumentSaveRegistrationOptions"
  [''TextDocumentRegistrationOptions]
  [("_includeText", [t| Maybe Bool |])]

deriveJSON lspOptions ''TextDocumentSaveRegistrationOptions

data DidSaveTextDocumentParams =
  DidSaveTextDocumentParams
    { -- | The document that was saved.
      DidSaveTextDocumentParams -> TextDocumentIdentifier
_textDocument :: TextDocumentIdentifier
      -- | Optional the content when saved. Depends on the includeText value
      -- when the save notification was requested.
    , DidSaveTextDocumentParams -> Maybe Text
_text         :: Maybe Text
    } deriving (ReadPrec [DidSaveTextDocumentParams]
ReadPrec DidSaveTextDocumentParams
Int -> ReadS DidSaveTextDocumentParams
ReadS [DidSaveTextDocumentParams]
(Int -> ReadS DidSaveTextDocumentParams)
-> ReadS [DidSaveTextDocumentParams]
-> ReadPrec DidSaveTextDocumentParams
-> ReadPrec [DidSaveTextDocumentParams]
-> Read DidSaveTextDocumentParams
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS DidSaveTextDocumentParams
readsPrec :: Int -> ReadS DidSaveTextDocumentParams
$creadList :: ReadS [DidSaveTextDocumentParams]
readList :: ReadS [DidSaveTextDocumentParams]
$creadPrec :: ReadPrec DidSaveTextDocumentParams
readPrec :: ReadPrec DidSaveTextDocumentParams
$creadListPrec :: ReadPrec [DidSaveTextDocumentParams]
readListPrec :: ReadPrec [DidSaveTextDocumentParams]
Read,Int -> DidSaveTextDocumentParams -> ShowS
[DidSaveTextDocumentParams] -> ShowS
DidSaveTextDocumentParams -> String
(Int -> DidSaveTextDocumentParams -> ShowS)
-> (DidSaveTextDocumentParams -> String)
-> ([DidSaveTextDocumentParams] -> ShowS)
-> Show DidSaveTextDocumentParams
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DidSaveTextDocumentParams -> ShowS
showsPrec :: Int -> DidSaveTextDocumentParams -> ShowS
$cshow :: DidSaveTextDocumentParams -> String
show :: DidSaveTextDocumentParams -> String
$cshowList :: [DidSaveTextDocumentParams] -> ShowS
showList :: [DidSaveTextDocumentParams] -> ShowS
Show,DidSaveTextDocumentParams -> DidSaveTextDocumentParams -> Bool
(DidSaveTextDocumentParams -> DidSaveTextDocumentParams -> Bool)
-> (DidSaveTextDocumentParams -> DidSaveTextDocumentParams -> Bool)
-> Eq DidSaveTextDocumentParams
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DidSaveTextDocumentParams -> DidSaveTextDocumentParams -> Bool
== :: DidSaveTextDocumentParams -> DidSaveTextDocumentParams -> Bool
$c/= :: DidSaveTextDocumentParams -> DidSaveTextDocumentParams -> Bool
/= :: DidSaveTextDocumentParams -> DidSaveTextDocumentParams -> Bool
Eq)

deriveJSON lspOptions ''DidSaveTextDocumentParams

-- -------------------------------------

data DidCloseTextDocumentParams =
  DidCloseTextDocumentParams
    { -- | The document that was closed.
      DidCloseTextDocumentParams -> TextDocumentIdentifier
_textDocument :: TextDocumentIdentifier
    } deriving (ReadPrec [DidCloseTextDocumentParams]
ReadPrec DidCloseTextDocumentParams
Int -> ReadS DidCloseTextDocumentParams
ReadS [DidCloseTextDocumentParams]
(Int -> ReadS DidCloseTextDocumentParams)
-> ReadS [DidCloseTextDocumentParams]
-> ReadPrec DidCloseTextDocumentParams
-> ReadPrec [DidCloseTextDocumentParams]
-> Read DidCloseTextDocumentParams
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS DidCloseTextDocumentParams
readsPrec :: Int -> ReadS DidCloseTextDocumentParams
$creadList :: ReadS [DidCloseTextDocumentParams]
readList :: ReadS [DidCloseTextDocumentParams]
$creadPrec :: ReadPrec DidCloseTextDocumentParams
readPrec :: ReadPrec DidCloseTextDocumentParams
$creadListPrec :: ReadPrec [DidCloseTextDocumentParams]
readListPrec :: ReadPrec [DidCloseTextDocumentParams]
Read,Int -> DidCloseTextDocumentParams -> ShowS
[DidCloseTextDocumentParams] -> ShowS
DidCloseTextDocumentParams -> String
(Int -> DidCloseTextDocumentParams -> ShowS)
-> (DidCloseTextDocumentParams -> String)
-> ([DidCloseTextDocumentParams] -> ShowS)
-> Show DidCloseTextDocumentParams
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DidCloseTextDocumentParams -> ShowS
showsPrec :: Int -> DidCloseTextDocumentParams -> ShowS
$cshow :: DidCloseTextDocumentParams -> String
show :: DidCloseTextDocumentParams -> String
$cshowList :: [DidCloseTextDocumentParams] -> ShowS
showList :: [DidCloseTextDocumentParams] -> ShowS
Show,DidCloseTextDocumentParams -> DidCloseTextDocumentParams -> Bool
(DidCloseTextDocumentParams -> DidCloseTextDocumentParams -> Bool)
-> (DidCloseTextDocumentParams
    -> DidCloseTextDocumentParams -> Bool)
-> Eq DidCloseTextDocumentParams
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DidCloseTextDocumentParams -> DidCloseTextDocumentParams -> Bool
== :: DidCloseTextDocumentParams -> DidCloseTextDocumentParams -> Bool
$c/= :: DidCloseTextDocumentParams -> DidCloseTextDocumentParams -> Bool
/= :: DidCloseTextDocumentParams -> DidCloseTextDocumentParams -> Bool
Eq)

deriveJSON lspOptions ''DidCloseTextDocumentParams