Safe Haskell | None |
---|---|
Language | Haskell2010 |
Language.Haskell.Tools.Daemon.Protocol
Description
This module declares the messages that can be sent from the client to the daemon engine and from the engine to the client.
Synopsis
- type FileDiff = [(Int, Int, String)]
- data UndoRefactor
- = RemoveAdded { }
- | RestoreRemoved { }
- | UndoChanges { }
- data ResponseMsg
- = KeepAliveResponse
- | HandshakeResponse {
- serverVersion :: [Int]
- | ErrorMessage { }
- | CompilationProblem {
- markers :: [Marker]
- errorHints :: [String]
- | DiffInfo { }
- | LoadingModules {
- modulesToLoad :: [FilePath]
- | LoadedModule { }
- | QueryResult {
- queryName :: String
- queryType :: String
- queryResult :: Value
- | UnusedFlags {
- unusedFlags :: [String]
- | Disconnected
- 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
- | PerformQuery {
- query :: String
- modulePath :: FilePath
- editorSelection :: String
- details :: [String]
- shutdownAfter :: Bool
- | UndoLast
- | Disconnect
- | ReLoad {
- addedModules :: [FilePath]
- changedModules :: [FilePath]
- removedModules :: [FilePath]
- | Stop
- data Marker = Marker {}
- data Severity
Documentation
data UndoRefactor Source #
Constructors
RemoveAdded | |
Fields | |
RestoreRemoved | |
Fields | |
UndoChanges | |
Fields |
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 | |
QueryResult | The result of querying the program representation. |
Fields
| |
UnusedFlags | Returns the flags that are not used by the engine. |
Fields
| |
Disconnected | The engine has closed the connection. |
Instances
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
| |
PerformQuery | Orders the engine to perform a query on the module given with the selection and details. |
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
Instances
Eq Marker | |
Show Marker | |
Generic Marker | |
ToJSON Marker | |
Defined in Language.Haskell.Tools.Refactor.Querying Methods toEncoding :: Marker -> Encoding toJSONList :: [Marker] -> Value toEncodingList :: [Marker] -> Encoding | |
type Rep Marker | |
Defined in Language.Haskell.Tools.Refactor.Querying type Rep Marker = D1 (MetaData "Marker" "Language.Haskell.Tools.Refactor.Querying" "haskell-tools-refactor-1.1.1.0-4hDiIQBBrTRH5RcrTGrIEl" False) (C1 (MetaCons "Marker" PrefixI True) (S1 (MetaSel (Just "location") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SrcSpan) :*: (S1 (MetaSel (Just "severity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Severity) :*: S1 (MetaSel (Just "message") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))) |
Instances
Eq Severity | |
Show Severity | |
Generic Severity | |
ToJSON Severity | |
Defined in Language.Haskell.Tools.Refactor.Querying Methods toEncoding :: Severity -> Encoding toJSONList :: [Severity] -> Value toEncodingList :: [Severity] -> Encoding | |
type Rep Severity | |
Defined in Language.Haskell.Tools.Refactor.Querying type Rep Severity = D1 (MetaData "Severity" "Language.Haskell.Tools.Refactor.Querying" "haskell-tools-refactor-1.1.1.0-4hDiIQBBrTRH5RcrTGrIEl" False) (C1 (MetaCons "Error" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Warning" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Info" PrefixI False) (U1 :: Type -> Type))) |