-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Haskell library for the Microsoft Language Server Protocol
--   
--   An implementation of the types, and basic message server to allow
--   language implementors to support the Language Server Protocol for
--   their specific language.
--   
--   An example of this is for Haskell via the Haskell IDE Engine, at
--   <a>https://github.com//haskell-ide-engine</a>
@package haskell-lsp
@version 0.8.1.0

module Language.Haskell.LSP.Constant
_LOG_NAME :: String
_LOG_FORMAT :: String
_LOG_FORMAT_DATE :: String

module Language.Haskell.LSP.Diagnostics
type DiagnosticStore = Map Uri StoreItem
type DiagnosticsBySource = Map (Maybe DiagnosticSource) (SortedList Diagnostic)
data StoreItem
StoreItem :: TextDocumentVersion -> DiagnosticsBySource -> StoreItem
partitionBySource :: [Diagnostic] -> DiagnosticsBySource
flushBySource :: DiagnosticStore -> Maybe DiagnosticSource -> DiagnosticStore
updateDiagnostics :: DiagnosticStore -> Uri -> TextDocumentVersion -> DiagnosticsBySource -> DiagnosticStore
getDiagnosticParamsFor :: Int -> DiagnosticStore -> Uri -> Maybe PublishDiagnosticsParams
instance GHC.Classes.Eq Language.Haskell.LSP.Diagnostics.StoreItem
instance GHC.Show.Show Language.Haskell.LSP.Diagnostics.StoreItem

module Language.Haskell.LSP.Messages

-- | A wrapper around a message that originates from the client and is sent
--   to the server.
data FromClientMessage
ReqInitialize :: InitializeRequest -> FromClientMessage
ReqShutdown :: ShutdownRequest -> FromClientMessage
ReqHover :: HoverRequest -> FromClientMessage
ReqCompletion :: CompletionRequest -> FromClientMessage
ReqCompletionItemResolve :: CompletionItemResolveRequest -> FromClientMessage
ReqSignatureHelp :: SignatureHelpRequest -> FromClientMessage
ReqDefinition :: DefinitionRequest -> FromClientMessage
ReqTypeDefinition :: TypeDefinitionRequest -> FromClientMessage
ReqImplementation :: ImplementationRequest -> FromClientMessage
ReqFindReferences :: ReferencesRequest -> FromClientMessage
ReqDocumentHighlights :: DocumentHighlightRequest -> FromClientMessage
ReqDocumentSymbols :: DocumentSymbolRequest -> FromClientMessage
ReqWorkspaceSymbols :: WorkspaceSymbolRequest -> FromClientMessage
ReqCodeAction :: CodeActionRequest -> FromClientMessage
ReqCodeLens :: CodeLensRequest -> FromClientMessage
ReqCodeLensResolve :: CodeLensResolveRequest -> FromClientMessage
ReqDocumentLink :: DocumentLinkRequest -> FromClientMessage
ReqDocumentLinkResolve :: DocumentLinkResolveRequest -> FromClientMessage
ReqDocumentColor :: DocumentColorRequest -> FromClientMessage
ReqColorPresentation :: ColorPresentationRequest -> FromClientMessage
ReqDocumentFormatting :: DocumentFormattingRequest -> FromClientMessage
ReqDocumentRangeFormatting :: DocumentRangeFormattingRequest -> FromClientMessage
ReqDocumentOnTypeFormatting :: DocumentOnTypeFormattingRequest -> FromClientMessage
ReqRename :: RenameRequest -> FromClientMessage
ReqFoldingRange :: FoldingRangeRequest -> FromClientMessage
ReqExecuteCommand :: ExecuteCommandRequest -> FromClientMessage
ReqWillSaveWaitUntil :: WillSaveWaitUntilTextDocumentRequest -> FromClientMessage
RspApplyWorkspaceEdit :: ApplyWorkspaceEditResponse -> FromClientMessage
RspFromClient :: BareResponseMessage -> FromClientMessage
NotInitialized :: InitializedNotification -> FromClientMessage
NotExit :: ExitNotification -> FromClientMessage
NotCancelRequestFromClient :: CancelNotification -> FromClientMessage
NotDidChangeConfiguration :: DidChangeConfigurationNotification -> FromClientMessage
NotDidOpenTextDocument :: DidOpenTextDocumentNotification -> FromClientMessage
NotDidChangeTextDocument :: DidChangeTextDocumentNotification -> FromClientMessage
NotDidCloseTextDocument :: DidCloseTextDocumentNotification -> FromClientMessage
NotWillSaveTextDocument :: WillSaveTextDocumentNotification -> FromClientMessage
NotDidSaveTextDocument :: DidSaveTextDocumentNotification -> FromClientMessage
NotDidChangeWatchedFiles :: DidChangeWatchedFilesNotification -> FromClientMessage
NotDidChangeWorkspaceFolders :: DidChangeWorkspaceFoldersNotification -> FromClientMessage
UnknownFromClientMessage :: Value -> FromClientMessage

-- | A wrapper around a message that originates from the server and is sent
--   to the client.
data FromServerMessage
ReqRegisterCapability :: RegisterCapabilityRequest -> FromServerMessage
ReqUnregisterCapability :: UnregisterCapabilityRequest -> FromServerMessage
ReqApplyWorkspaceEdit :: ApplyWorkspaceEditRequest -> FromServerMessage
ReqShowMessage :: ShowMessageRequest -> FromServerMessage
RspInitialize :: InitializeResponse -> FromServerMessage
RspShutdown :: ShutdownResponse -> FromServerMessage
RspHover :: HoverResponse -> FromServerMessage
RspCompletion :: CompletionResponse -> FromServerMessage
RspCompletionItemResolve :: CompletionItemResolveResponse -> FromServerMessage
RspSignatureHelp :: SignatureHelpResponse -> FromServerMessage
RspDefinition :: DefinitionResponse -> FromServerMessage
RspTypeDefinition :: TypeDefinitionResponse -> FromServerMessage
RspImplementation :: ImplementationResponse -> FromServerMessage
RspFindReferences :: ReferencesResponse -> FromServerMessage
RspDocumentHighlights :: DocumentHighlightsResponse -> FromServerMessage
RspDocumentSymbols :: DocumentSymbolsResponse -> FromServerMessage
RspWorkspaceSymbols :: WorkspaceSymbolsResponse -> FromServerMessage
RspCodeAction :: CodeActionResponse -> FromServerMessage
RspCodeLens :: CodeLensResponse -> FromServerMessage
RspCodeLensResolve :: CodeLensResolveResponse -> FromServerMessage
RspDocumentLink :: DocumentLinkResponse -> FromServerMessage
RspDocumentLinkResolve :: DocumentLinkResolveResponse -> FromServerMessage
RspDocumentColor :: DocumentColorResponse -> FromServerMessage
RspColorPresentation :: ColorPresentationResponse -> FromServerMessage
RspDocumentFormatting :: DocumentFormattingResponse -> FromServerMessage
RspDocumentRangeFormatting :: DocumentRangeFormattingResponse -> FromServerMessage
RspDocumentOnTypeFormatting :: DocumentOnTypeFormattingResponse -> FromServerMessage
RspRename :: RenameResponse -> FromServerMessage
RspFoldingRange :: FoldingRangeResponse -> FromServerMessage
RspExecuteCommand :: ExecuteCommandResponse -> FromServerMessage
RspError :: ErrorResponse -> FromServerMessage
RspWillSaveWaitUntil :: WillSaveWaitUntilTextDocumentResponse -> FromServerMessage
NotPublishDiagnostics :: PublishDiagnosticsNotification -> FromServerMessage
NotLogMessage :: LogMessageNotification -> FromServerMessage
NotShowMessage :: ShowMessageNotification -> FromServerMessage
NotTelemetry :: TelemetryNotification -> FromServerMessage
NotCancelRequestFromServer :: CancelNotificationServer -> FromServerMessage
instance Data.Aeson.Types.FromJSON.FromJSON Language.Haskell.LSP.Messages.FromServerMessage
instance Data.Aeson.Types.ToJSON.ToJSON Language.Haskell.LSP.Messages.FromServerMessage
instance GHC.Generics.Generic Language.Haskell.LSP.Messages.FromServerMessage
instance GHC.Show.Show Language.Haskell.LSP.Messages.FromServerMessage
instance GHC.Read.Read Language.Haskell.LSP.Messages.FromServerMessage
instance GHC.Classes.Eq Language.Haskell.LSP.Messages.FromServerMessage
instance Data.Aeson.Types.FromJSON.FromJSON Language.Haskell.LSP.Messages.FromClientMessage
instance Data.Aeson.Types.ToJSON.ToJSON Language.Haskell.LSP.Messages.FromClientMessage
instance GHC.Generics.Generic Language.Haskell.LSP.Messages.FromClientMessage
instance GHC.Show.Show Language.Haskell.LSP.Messages.FromClientMessage
instance GHC.Read.Read Language.Haskell.LSP.Messages.FromClientMessage
instance GHC.Classes.Eq Language.Haskell.LSP.Messages.FromClientMessage

module Language.Haskell.LSP.Capture
data Event
FromClient :: UTCTime -> FromClientMessage -> Event
FromServer :: UTCTime -> FromServerMessage -> Event
captureFromServer :: FromServerMessage -> Maybe FilePath -> IO ()
captureFromClient :: FromClientMessage -> Maybe FilePath -> IO ()
instance Data.Aeson.Types.FromJSON.FromJSON Language.Haskell.LSP.Capture.Event
instance Data.Aeson.Types.ToJSON.ToJSON Language.Haskell.LSP.Capture.Event
instance GHC.Generics.Generic Language.Haskell.LSP.Capture.Event
instance GHC.Classes.Eq Language.Haskell.LSP.Capture.Event
instance GHC.Show.Show Language.Haskell.LSP.Capture.Event

module Language.Haskell.LSP.Utility

-- | UTF8文字列をByteStringへの変換
str2bs :: String -> ByteString

-- | ByteStringをUTF8文字列への変換
bs2str :: ByteString -> String

-- | UTF8文字列をLazyByteStringへの変換
str2lbs :: String -> ByteString

-- | LazyByteStringをUTF8文字列への変換
lbs2str :: ByteString -> String
logs :: String -> IO ()
logm :: ByteString -> IO ()

module Language.Haskell.LSP.VFS
type VFS = Map Uri VirtualFile
data VirtualFile
VirtualFile :: Int -> YiString -> VirtualFile
[$sel:_version:VirtualFile] :: VirtualFile -> Int
[$sel:_text:VirtualFile] :: VirtualFile -> YiString
openVFS :: VFS -> DidOpenTextDocumentNotification -> IO VFS
changeFromClientVFS :: VFS -> DidChangeTextDocumentNotification -> IO VFS
changeFromServerVFS :: VFS -> ApplyWorkspaceEditRequest -> IO VFS
closeVFS :: VFS -> DidCloseTextDocumentNotification -> IO VFS

-- | Apply the list of changes. Changes should be applied in the order that
--   they are received from the client.
applyChanges :: YiString -> [TextDocumentContentChangeEvent] -> YiString
applyChange :: YiString -> TextDocumentContentChangeEvent -> YiString
deleteChars :: YiString -> Position -> Int -> YiString
addChars :: YiString -> Position -> Text -> YiString
changeChars :: YiString -> Position -> Int -> Text -> YiString
yiSplitAt :: Int -> Int -> YiString -> (YiString, YiString)
instance GHC.Show.Show Language.Haskell.LSP.VFS.VirtualFile

module Language.Haskell.LSP.Core
handleMessage :: Show c => InitializeCallback c -> TVar (LanguageContextData c) -> ByteString -> ByteString -> IO ()

-- | state used by the LSP dispatcher to manage the message loop
data LanguageContextData a
LanguageContextData :: !Int -> !Handlers -> !Options -> !SendFunc -> !VFS -> !DiagnosticStore -> !Maybe a -> !TVar Int -> LspFuncs a -> !Maybe FilePath -> ![WorkspaceFolder] -> LanguageContextData a
[resSeqDebugContextData] :: LanguageContextData a -> !Int
[resHandlers] :: LanguageContextData a -> !Handlers
[resOptions] :: LanguageContextData a -> !Options
[resSendResponse] :: LanguageContextData a -> !SendFunc
[resVFS] :: LanguageContextData a -> !VFS
[resDiagnostics] :: LanguageContextData a -> !DiagnosticStore
[resConfig] :: LanguageContextData a -> !Maybe a
[resLspId] :: LanguageContextData a -> !TVar Int
[resLspFuncs] :: LanguageContextData a -> LspFuncs a
[resCaptureFile] :: LanguageContextData a -> !Maybe FilePath
[resWorkspaceFolders] :: LanguageContextData a -> ![WorkspaceFolder]

-- | The Handler type captures a function that receives local read-only
--   state <tt>a</tt>, a function to send a reply message once encoded as a
--   ByteString, and a received message of type <tt>b</tt>
type Handler b = b -> IO ()

-- | The function in the LSP process that is called once the
--   <tt>initialize</tt> message is received. Message processing will only
--   continue once this returns, so it should create whatever processes are
--   needed.
type InitializeCallback c = (DidChangeConfigurationNotification -> Either Text c, LspFuncs c -> IO (Maybe ResponseError))

-- | Returned to the server on startup, providing ways to interact with the
--   client.
data LspFuncs c
LspFuncs :: !ClientCapabilities -> !IO (Maybe c) -> !SendFunc -> !Uri -> IO (Maybe VirtualFile) -> !PublishDiagnosticsFunc -> !FlushDiagnosticsBySourceFunc -> !IO LspId -> !Maybe FilePath -> !IO (Maybe [WorkspaceFolder]) -> LspFuncs c
[clientCapabilities] :: LspFuncs c -> !ClientCapabilities

-- | Derived from the DidChangeConfigurationNotification message via a
--   server-provided function.
[config] :: LspFuncs c -> !IO (Maybe c)
[sendFunc] :: LspFuncs c -> !SendFunc
[getVirtualFileFunc] :: LspFuncs c -> !Uri -> IO (Maybe VirtualFile)
[publishDiagnosticsFunc] :: LspFuncs c -> !PublishDiagnosticsFunc
[flushDiagnosticsBySourceFunc] :: LspFuncs c -> !FlushDiagnosticsBySourceFunc
[getNextReqId] :: LspFuncs c -> !IO LspId
[rootPath] :: LspFuncs c -> !Maybe FilePath
[getWorkspaceFolders] :: LspFuncs c -> !IO (Maybe [WorkspaceFolder])

-- | A function to send a message to the client
type SendFunc = FromServerMessage -> IO ()

-- | Callbacks from the language server to the language handler
data Handlers
Handlers :: !Maybe (Handler HoverRequest) -> !Maybe (Handler CompletionRequest) -> !Maybe (Handler CompletionItemResolveRequest) -> !Maybe (Handler SignatureHelpRequest) -> !Maybe (Handler DefinitionRequest) -> !Maybe (Handler TypeDefinitionRequest) -> !Maybe (Handler ImplementationRequest) -> !Maybe (Handler ReferencesRequest) -> !Maybe (Handler DocumentHighlightRequest) -> !Maybe (Handler DocumentSymbolRequest) -> !Maybe (Handler WorkspaceSymbolRequest) -> !Maybe (Handler CodeActionRequest) -> !Maybe (Handler CodeLensRequest) -> !Maybe (Handler CodeLensResolveRequest) -> !Maybe (Handler DocumentColorRequest) -> !Maybe (Handler ColorPresentationRequest) -> !Maybe (Handler DocumentFormattingRequest) -> !Maybe (Handler DocumentRangeFormattingRequest) -> !Maybe (Handler DocumentOnTypeFormattingRequest) -> !Maybe (Handler RenameRequest) -> !Maybe (Handler FoldingRangeRequest) -> !Maybe (Handler DocumentLinkRequest) -> !Maybe (Handler DocumentLinkResolveRequest) -> !Maybe (Handler ExecuteCommandRequest) -> !Maybe (Handler WillSaveWaitUntilTextDocumentRequest) -> !Maybe (Handler DidChangeConfigurationNotification) -> !Maybe (Handler DidOpenTextDocumentNotification) -> !Maybe (Handler DidChangeTextDocumentNotification) -> !Maybe (Handler DidCloseTextDocumentNotification) -> !Maybe (Handler DidSaveTextDocumentNotification) -> !Maybe (Handler DidChangeWatchedFilesNotification) -> !Maybe (Handler DidChangeWorkspaceFoldersNotification) -> !Maybe (Handler InitializedNotification) -> !Maybe (Handler WillSaveTextDocumentNotification) -> !Maybe (Handler CancelNotification) -> !Maybe (Handler BareResponseMessage) -> !Maybe (Handler InitializeRequest) -> !Maybe (Handler ExitNotification) -> Handlers
[hoverHandler] :: Handlers -> !Maybe (Handler HoverRequest)
[completionHandler] :: Handlers -> !Maybe (Handler CompletionRequest)
[completionResolveHandler] :: Handlers -> !Maybe (Handler CompletionItemResolveRequest)
[signatureHelpHandler] :: Handlers -> !Maybe (Handler SignatureHelpRequest)
[definitionHandler] :: Handlers -> !Maybe (Handler DefinitionRequest)
[typeDefinitionHandler] :: Handlers -> !Maybe (Handler TypeDefinitionRequest)
[implementationHandler] :: Handlers -> !Maybe (Handler ImplementationRequest)
[referencesHandler] :: Handlers -> !Maybe (Handler ReferencesRequest)
[documentHighlightHandler] :: Handlers -> !Maybe (Handler DocumentHighlightRequest)
[documentSymbolHandler] :: Handlers -> !Maybe (Handler DocumentSymbolRequest)
[workspaceSymbolHandler] :: Handlers -> !Maybe (Handler WorkspaceSymbolRequest)
[codeActionHandler] :: Handlers -> !Maybe (Handler CodeActionRequest)
[codeLensHandler] :: Handlers -> !Maybe (Handler CodeLensRequest)
[codeLensResolveHandler] :: Handlers -> !Maybe (Handler CodeLensResolveRequest)
[documentColorHandler] :: Handlers -> !Maybe (Handler DocumentColorRequest)
[colorPresentationHandler] :: Handlers -> !Maybe (Handler ColorPresentationRequest)
[documentFormattingHandler] :: Handlers -> !Maybe (Handler DocumentFormattingRequest)
[documentRangeFormattingHandler] :: Handlers -> !Maybe (Handler DocumentRangeFormattingRequest)
[documentTypeFormattingHandler] :: Handlers -> !Maybe (Handler DocumentOnTypeFormattingRequest)
[renameHandler] :: Handlers -> !Maybe (Handler RenameRequest)
[foldingRangeHandler] :: Handlers -> !Maybe (Handler FoldingRangeRequest)
[documentLinkHandler] :: Handlers -> !Maybe (Handler DocumentLinkRequest)
[documentLinkResolveHandler] :: Handlers -> !Maybe (Handler DocumentLinkResolveRequest)
[executeCommandHandler] :: Handlers -> !Maybe (Handler ExecuteCommandRequest)
[willSaveWaitUntilTextDocHandler] :: Handlers -> !Maybe (Handler WillSaveWaitUntilTextDocumentRequest)
[didChangeConfigurationParamsHandler] :: Handlers -> !Maybe (Handler DidChangeConfigurationNotification)
[didOpenTextDocumentNotificationHandler] :: Handlers -> !Maybe (Handler DidOpenTextDocumentNotification)
[didChangeTextDocumentNotificationHandler] :: Handlers -> !Maybe (Handler DidChangeTextDocumentNotification)
[didCloseTextDocumentNotificationHandler] :: Handlers -> !Maybe (Handler DidCloseTextDocumentNotification)
[didSaveTextDocumentNotificationHandler] :: Handlers -> !Maybe (Handler DidSaveTextDocumentNotification)
[didChangeWatchedFilesNotificationHandler] :: Handlers -> !Maybe (Handler DidChangeWatchedFilesNotification)
[didChangeWorkspaceFoldersNotificationHandler] :: Handlers -> !Maybe (Handler DidChangeWorkspaceFoldersNotification)
[initializedHandler] :: Handlers -> !Maybe (Handler InitializedNotification)
[willSaveTextDocumentNotificationHandler] :: Handlers -> !Maybe (Handler WillSaveTextDocumentNotification)
[cancelNotificationHandler] :: Handlers -> !Maybe (Handler CancelNotification)
[responseHandler] :: Handlers -> !Maybe (Handler BareResponseMessage)
[initializeRequestHandler] :: Handlers -> !Maybe (Handler InitializeRequest)
[exitNotificationHandler] :: Handlers -> !Maybe (Handler ExitNotification)

-- | Language Server Protocol options supported by the given language
--   server. These are automatically turned into capabilities reported to
--   the client during initialization.
data Options
Options :: Maybe TextDocumentSyncOptions -> Maybe CompletionOptions -> Maybe SignatureHelpOptions -> Maybe GotoOptions -> Maybe GotoOptions -> Maybe CodeLensOptions -> Maybe DocumentOnTypeFormattingOptions -> Maybe DocumentLinkOptions -> Maybe ColorOptions -> Maybe FoldingRangeOptions -> Maybe ExecuteCommandOptions -> Options
[textDocumentSync] :: Options -> Maybe TextDocumentSyncOptions
[completionProvider] :: Options -> Maybe CompletionOptions
[signatureHelpProvider] :: Options -> Maybe SignatureHelpOptions
[typeDefinitionProvider] :: Options -> Maybe GotoOptions
[implementationProvider] :: Options -> Maybe GotoOptions
[codeLensProvider] :: Options -> Maybe CodeLensOptions
[documentOnTypeFormattingProvider] :: Options -> Maybe DocumentOnTypeFormattingOptions
[documentLinkProvider] :: Options -> Maybe DocumentLinkOptions
[colorProvider] :: Options -> Maybe ColorOptions
[foldingRangeProvider] :: Options -> Maybe FoldingRangeOptions
[executeCommandProvider] :: Options -> Maybe ExecuteCommandOptions

defaultLanguageContextData :: Handlers -> Options -> LspFuncs c -> TVar Int -> SendFunc -> Maybe FilePath -> LanguageContextData c
makeResponseMessage :: RequestMessage ClientMethod req resp -> resp -> ResponseMessage resp
makeResponseError :: LspIdRsp -> ResponseError -> ResponseMessage ()

-- | 
--   <h6>===============================================================</h6>
--   
--   utility
--   
--   Logger
setupLogger :: Maybe FilePath -> [String] -> Priority -> IO ()
sendErrorResponseS :: SendFunc -> LspIdRsp -> ErrorCode -> Text -> IO ()
sendErrorLogS :: SendFunc -> Text -> IO ()
sendErrorShowS :: SendFunc -> Text -> IO ()

-- | The changes in a workspace edit should be applied from the end of the
--   file toward the start. Sort them into this order.
reverseSortEdit :: WorkspaceEdit -> WorkspaceEdit
instance Data.Default.Class.Default Language.Haskell.LSP.Core.Handlers
instance Data.Default.Class.Default Language.Haskell.LSP.Core.Options

module Language.Haskell.LSP.Control

-- | Convenience function for 'runWithHandles stdin stdout'.
run :: Show c => InitializeCallback c -> Handlers -> Options -> Maybe FilePath -> IO Int

-- | Starts listening and sending requests and responses at the specified
--   handles.
runWithHandles :: Show c => Handle -> Handle -> InitializeCallback c -> Handlers -> Options -> Maybe FilePath -> IO Int
