Safe Haskell | None |
---|---|
Language | Haskell2010 |
Language.Haskell.Tools.Daemon.Protocol
Contents
Description
This module declares the messages that can be sent from the client to the daemon engine and from the engine to the client.
- data ClientMessage
- = KeepAlive
- | Reset
- | Handshake {
- clientVersion :: [Int]
- | SetPackageDB { }
- | AddPackages {
- addedPathes :: [FilePath]
- | RemovePackages {
- removedPathes :: [FilePath]
- | SetWorkingDir { }
- | SetGHCFlags { }
- | PerformRefactoring {
- refactoring :: String
- modulePath :: FilePath
- editorSelection :: String
- details :: [String]
- shutdownAfter :: Bool
- diffMode :: Bool
- | UndoLast
- | Disconnect
- | ReLoad {
- addedModules :: [FilePath]
- changedModules :: [FilePath]
- removedModules :: [FilePath]
- | Stop
- data ResponseMsg
- = KeepAliveResponse
- | HandshakeResponse {
- serverVersion :: [Int]
- | ErrorMessage { }
- | CompilationProblem {
- markers :: [Marker]
- errorHints :: [String]
- | DiffInfo { }
- | LoadingModules {
- modulesToLoad :: [FilePath]
- | LoadedModule { }
- | UnusedFlags {
- unusedFlags :: [String]
- | Disconnected
- data Marker = Marker {}
- data Severity
- data UndoRefactor
- = RemoveAdded { }
- | RestoreRemoved { }
- | UndoChanges { }
- type FileDiff = [(Int, Int, String)]
Documentation
data ClientMessage Source #
The messages expected from the client.
Constructors
KeepAlive | A simple ping message to check that the server is running. |
Reset | A message that instructs the server to reset its internal state and re-load loaded packages. |
Handshake | Tells the client version and asks the servers version. |
Fields
| |
SetPackageDB | Sets the package database for the engine to use. |
AddPackages | Registers packages to the engine. They will be subject to subsequent refactorings. Will cause the packages to be loaded, resulting in LoadingModules, LoadedModule or CompilationProblem responses. |
Fields
| |
RemovePackages | Deregisters the given packages from the engine. They will not be subjects of further refactorings. |
Fields
| |
SetWorkingDir | Sets the working directory for the compilation. Important when compiling code that loads resources based on relative pathes. |
Fields | |
SetGHCFlags | Sets the compilation flags. The unused flags are returned via the UnusedFlags response. |
PerformRefactoring | Orders the engine to perform the refactoring on the module given
with the selection and details. Successful refactorings will cause re-loading of modules.
If |
Fields
| |
UndoLast | Asks the daemon to undo the last refactoring. |
Disconnect | Stops the engine. It replies with Disconnected. |
ReLoad | Instructs the engine to re-load a changed module. LoadingModules, LoadedModule responses may be sent. |
Fields
| |
Stop | Stops the server. OBSOLATE |
Instances
data ResponseMsg Source #
The possible responses that the server can give.
Constructors
KeepAliveResponse | A response to KeepAlive |
HandshakeResponse | Tells the version of the server. |
Fields
| |
ErrorMessage | An error message marking internal problems or user mistakes. TODO: separate internal problems and user mistakes. |
CompilationProblem | A response that tells there are errors in the source code given. |
Fields
| |
DiffInfo | Information about changes that would be caused by the refactoring. |
LoadingModules | The traversal of the project is done, now the engine is loading the given modules. |
Fields
| |
LoadedModule | The engine has loaded the given module. |
Fields | |
UnusedFlags | Returns the flags that are not used by the engine. |
Fields
| |
Disconnected | The engine has closed the connection. |
Instances
data UndoRefactor Source #
Constructors
RemoveAdded | |
Fields | |
RestoreRemoved | |
Fields | |
UndoChanges | |
Fields |
Instances